Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101764
b: refs/heads/master
c: fabb657
h: refs/heads/master
v: v3
  • Loading branch information
Maxim Shchetynin authored and Benjamin Herrenschmidt committed Jul 9, 2008
1 parent abc6910 commit 99eb8a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 88b90c96b787ecb5c72384b6873468f814cce650
refs/heads/master: fabb657005edbbcb0d13ee49a40f1f4b042a1d19
6 changes: 6 additions & 0 deletions trunk/arch/powerpc/platforms/cell/spufs/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ void spuctx_switch_state(struct spu_context *ctx,
struct timespec ts;
struct spu *spu;
enum spu_utilization_state old_state;
int node;

ktime_get_ts(&ts);
curtime = timespec_to_ns(&ts);
Expand All @@ -1015,6 +1016,11 @@ void spuctx_switch_state(struct spu_context *ctx,
spu->stats.times[old_state] += delta;
spu->stats.util_state = new_state;
spu->stats.tstamp = curtime;
node = spu->node;
if (old_state == SPU_UTIL_USER)
atomic_dec(&cbe_spu_info[node].busy_spus);
if (new_state == SPU_UTIL_USER);
atomic_inc(&cbe_spu_info[node].busy_spus);
}
}

Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-powerpc/spu.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ struct cbe_spu_info {
struct list_head spus;
int n_spus;
int nr_active;
atomic_t busy_spus;
atomic_t reserved_spus;
};

Expand Down

0 comments on commit 99eb8a9

Please sign in to comment.