Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350290
b: refs/heads/master
c: e6e380e
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed Jan 24, 2013
1 parent e4a521f commit 0c3f61f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a60dc39c016a65bfdbd05c43b3707962d5ed04c7
refs/heads/master: e6e380ed92555533740d5f670640f6f1868132de
9 changes: 5 additions & 4 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,15 @@ static bool workqueue_freezing; /* W: have wqs started freezing? */
*/
static DEFINE_PER_CPU(struct worker_pool [NR_STD_WORKER_POOLS],
cpu_std_worker_pools);
static DEFINE_PER_CPU_SHARED_ALIGNED(atomic_t, pool_nr_running[NR_STD_WORKER_POOLS]);
static DEFINE_PER_CPU_SHARED_ALIGNED(atomic_t [NR_STD_WORKER_POOLS],
cpu_std_pool_nr_running);

/*
* Standard worker pools and nr_running counter for unbound CPU. The pools
* have POOL_DISASSOCIATED set, and all workers have WORKER_UNBOUND set.
*/
static struct worker_pool unbound_std_worker_pools[NR_STD_WORKER_POOLS];
static atomic_t unbound_pool_nr_running[NR_STD_WORKER_POOLS] = {
static atomic_t unbound_std_pool_nr_running[NR_STD_WORKER_POOLS] = {
[0 ... NR_STD_WORKER_POOLS - 1] = ATOMIC_INIT(0), /* always 0 */
};

Expand Down Expand Up @@ -488,9 +489,9 @@ static atomic_t *get_pool_nr_running(struct worker_pool *pool)
int idx = std_worker_pool_pri(pool);

if (cpu != WORK_CPU_UNBOUND)
return &per_cpu(pool_nr_running, cpu)[idx];
return &per_cpu(cpu_std_pool_nr_running, cpu)[idx];
else
return &unbound_pool_nr_running[idx];
return &unbound_std_pool_nr_running[idx];
}

static struct cpu_workqueue_struct *get_cwq(unsigned int cpu,
Expand Down

0 comments on commit 0c3f61f

Please sign in to comment.