diff options
-rw-r--r-- | kernel/workqueue.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index fe0745f54fcd..634251572fdd 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -80,7 +80,7 @@ enum { | |||
80 | WORKER_NOT_RUNNING = WORKER_PREP | WORKER_UNBOUND | | 80 | WORKER_NOT_RUNNING = WORKER_PREP | WORKER_UNBOUND | |
81 | WORKER_CPU_INTENSIVE, | 81 | WORKER_CPU_INTENSIVE, |
82 | 82 | ||
83 | NR_WORKER_POOLS = 2, /* # worker pools per gcwq */ | 83 | NR_STD_WORKER_POOLS = 2, /* # standard pools per cpu */ |
84 | 84 | ||
85 | BUSY_WORKER_HASH_ORDER = 6, /* 64 pointers */ | 85 | BUSY_WORKER_HASH_ORDER = 6, /* 64 pointers */ |
86 | 86 | ||
@@ -156,7 +156,7 @@ struct global_cwq { | |||
156 | DECLARE_HASHTABLE(busy_hash, BUSY_WORKER_HASH_ORDER); | 156 | DECLARE_HASHTABLE(busy_hash, BUSY_WORKER_HASH_ORDER); |
157 | /* L: hash of busy workers */ | 157 | /* L: hash of busy workers */ |
158 | 158 | ||
159 | struct worker_pool pools[NR_WORKER_POOLS]; | 159 | struct worker_pool pools[NR_STD_WORKER_POOLS]; |
160 | /* normal and highpri pools */ | 160 | /* normal and highpri pools */ |
161 | } ____cacheline_aligned_in_smp; | 161 | } ____cacheline_aligned_in_smp; |
162 | 162 | ||
@@ -255,7 +255,7 @@ EXPORT_SYMBOL_GPL(system_freezable_wq); | |||
255 | 255 | ||
256 | #define for_each_worker_pool(pool, gcwq) \ | 256 | #define for_each_worker_pool(pool, gcwq) \ |
257 | for ((pool) = &(gcwq)->pools[0]; \ | 257 | for ((pool) = &(gcwq)->pools[0]; \ |
258 | (pool) < &(gcwq)->pools[NR_WORKER_POOLS]; (pool)++) | 258 | (pool) < &(gcwq)->pools[NR_STD_WORKER_POOLS]; (pool)++) |
259 | 259 | ||
260 | #define for_each_busy_worker(worker, i, pos, gcwq) \ | 260 | #define for_each_busy_worker(worker, i, pos, gcwq) \ |
261 | hash_for_each(gcwq->busy_hash, i, pos, worker, hentry) | 261 | hash_for_each(gcwq->busy_hash, i, pos, worker, hentry) |
@@ -436,7 +436,7 @@ static bool workqueue_freezing; /* W: have wqs started freezing? */ | |||
436 | * try_to_wake_up(). Put it in a separate cacheline. | 436 | * try_to_wake_up(). Put it in a separate cacheline. |
437 | */ | 437 | */ |
438 | static DEFINE_PER_CPU(struct global_cwq, global_cwq); | 438 | static DEFINE_PER_CPU(struct global_cwq, global_cwq); |
439 | static DEFINE_PER_CPU_SHARED_ALIGNED(atomic_t, pool_nr_running[NR_WORKER_POOLS]); | 439 | static DEFINE_PER_CPU_SHARED_ALIGNED(atomic_t, pool_nr_running[NR_STD_WORKER_POOLS]); |
440 | 440 | ||
441 | /* | 441 | /* |
442 | * Global cpu workqueue and nr_running counter for unbound gcwq. The | 442 | * Global cpu workqueue and nr_running counter for unbound gcwq. The |
@@ -444,14 +444,14 @@ static DEFINE_PER_CPU_SHARED_ALIGNED(atomic_t, pool_nr_running[NR_WORKER_POOLS]) | |||
444 | * workers have WORKER_UNBOUND set. | 444 | * workers have WORKER_UNBOUND set. |
445 | */ | 445 | */ |
446 | static struct global_cwq unbound_global_cwq; | 446 | static struct global_cwq unbound_global_cwq; |
447 | static atomic_t unbound_pool_nr_running[NR_WORKER_POOLS] = { | 447 | static atomic_t unbound_pool_nr_running[NR_STD_WORKER_POOLS] = { |
448 | [0 ... NR_WORKER_POOLS - 1] = ATOMIC_INIT(0), /* always 0 */ | 448 | [0 ... NR_STD_WORKER_POOLS - 1] = ATOMIC_INIT(0), /* always 0 */ |
449 | }; | 449 | }; |
450 | 450 | ||
451 | static int worker_thread(void *__worker); | 451 | static int worker_thread(void *__worker); |
452 | static unsigned int work_cpu(struct work_struct *work); | 452 | static unsigned int work_cpu(struct work_struct *work); |
453 | 453 | ||
454 | static int worker_pool_pri(struct worker_pool *pool) | 454 | static int std_worker_pool_pri(struct worker_pool *pool) |
455 | { | 455 | { |
456 | return pool - pool->gcwq->pools; | 456 | return pool - pool->gcwq->pools; |
457 | } | 457 | } |
@@ -467,7 +467,7 @@ static struct global_cwq *get_gcwq(unsigned int cpu) | |||
467 | static atomic_t *get_pool_nr_running(struct worker_pool *pool) | 467 | static atomic_t *get_pool_nr_running(struct worker_pool *pool) |
468 | { | 468 | { |
469 | int cpu = pool->gcwq->cpu; | 469 | int cpu = pool->gcwq->cpu; |
470 | int idx = worker_pool_pri(pool); | 470 | int idx = std_worker_pool_pri(pool); |
471 | 471 | ||
472 | if (cpu != WORK_CPU_UNBOUND) | 472 | if (cpu != WORK_CPU_UNBOUND) |
473 | return &per_cpu(pool_nr_running, cpu)[idx]; | 473 | return &per_cpu(pool_nr_running, cpu)[idx]; |
@@ -1688,7 +1688,7 @@ static void rebind_workers(struct global_cwq *gcwq) | |||
1688 | * wq doesn't really matter but let's keep @worker->pool | 1688 | * wq doesn't really matter but let's keep @worker->pool |
1689 | * and @cwq->pool consistent for sanity. | 1689 | * and @cwq->pool consistent for sanity. |
1690 | */ | 1690 | */ |
1691 | if (worker_pool_pri(worker->pool)) | 1691 | if (std_worker_pool_pri(worker->pool)) |
1692 | wq = system_highpri_wq; | 1692 | wq = system_highpri_wq; |
1693 | else | 1693 | else |
1694 | wq = system_wq; | 1694 | wq = system_wq; |
@@ -1731,7 +1731,7 @@ static struct worker *alloc_worker(void) | |||
1731 | static struct worker *create_worker(struct worker_pool *pool) | 1731 | static struct worker *create_worker(struct worker_pool *pool) |
1732 | { | 1732 | { |
1733 | struct global_cwq *gcwq = pool->gcwq; | 1733 | struct global_cwq *gcwq = pool->gcwq; |
1734 | const char *pri = worker_pool_pri(pool) ? "H" : ""; | 1734 | const char *pri = std_worker_pool_pri(pool) ? "H" : ""; |
1735 | struct worker *worker = NULL; | 1735 | struct worker *worker = NULL; |
1736 | int id = -1; | 1736 | int id = -1; |
1737 | 1737 | ||
@@ -1761,7 +1761,7 @@ static struct worker *create_worker(struct worker_pool *pool) | |||
1761 | if (IS_ERR(worker->task)) | 1761 | if (IS_ERR(worker->task)) |
1762 | goto fail; | 1762 | goto fail; |
1763 | 1763 | ||
1764 | if (worker_pool_pri(pool)) | 1764 | if (std_worker_pool_pri(pool)) |
1765 | set_user_nice(worker->task, HIGHPRI_NICE_LEVEL); | 1765 | set_user_nice(worker->task, HIGHPRI_NICE_LEVEL); |
1766 | 1766 | ||
1767 | /* | 1767 | /* |