diff options
author | Tejun Heo <tj@kernel.org> | 2011-02-16 03:25:31 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-02-16 11:48:59 -0500 |
commit | 58a69cb47ec6991bf006a3e5d202e8571b0327a4 (patch) | |
tree | 56abdf817649c352f70bff3263f9351ed6c42062 /kernel | |
parent | 7576958a9d5a4a677ad7dd40901cdbb6c1110c98 (diff) |
workqueue, freezer: unify spelling of 'freeze' + 'able' to 'freezable'
There are two spellings in use for 'freeze' + 'able' - 'freezable' and
'freezeable'. The former is the more prominent one. The latter is
mostly used by workqueue and in a few other odd places. Unify the
spelling to 'freezable'.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/main.c | 2 | ||||
-rw-r--r-- | kernel/power/process.c | 6 | ||||
-rw-r--r-- | kernel/workqueue.c | 24 |
3 files changed, 16 insertions, 16 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c index 7b5db6a8561e..701853042c28 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
@@ -326,7 +326,7 @@ EXPORT_SYMBOL_GPL(pm_wq); | |||
326 | 326 | ||
327 | static int __init pm_start_workqueue(void) | 327 | static int __init pm_start_workqueue(void) |
328 | { | 328 | { |
329 | pm_wq = alloc_workqueue("pm", WQ_FREEZEABLE, 0); | 329 | pm_wq = alloc_workqueue("pm", WQ_FREEZABLE, 0); |
330 | 330 | ||
331 | return pm_wq ? 0 : -ENOMEM; | 331 | return pm_wq ? 0 : -ENOMEM; |
332 | } | 332 | } |
diff --git a/kernel/power/process.c b/kernel/power/process.c index d6d2a10320e0..0cf3a27a6c9d 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c | |||
@@ -22,7 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | #define TIMEOUT (20 * HZ) | 23 | #define TIMEOUT (20 * HZ) |
24 | 24 | ||
25 | static inline int freezeable(struct task_struct * p) | 25 | static inline int freezable(struct task_struct * p) |
26 | { | 26 | { |
27 | if ((p == current) || | 27 | if ((p == current) || |
28 | (p->flags & PF_NOFREEZE) || | 28 | (p->flags & PF_NOFREEZE) || |
@@ -53,7 +53,7 @@ static int try_to_freeze_tasks(bool sig_only) | |||
53 | todo = 0; | 53 | todo = 0; |
54 | read_lock(&tasklist_lock); | 54 | read_lock(&tasklist_lock); |
55 | do_each_thread(g, p) { | 55 | do_each_thread(g, p) { |
56 | if (frozen(p) || !freezeable(p)) | 56 | if (frozen(p) || !freezable(p)) |
57 | continue; | 57 | continue; |
58 | 58 | ||
59 | if (!freeze_task(p, sig_only)) | 59 | if (!freeze_task(p, sig_only)) |
@@ -167,7 +167,7 @@ static void thaw_tasks(bool nosig_only) | |||
167 | 167 | ||
168 | read_lock(&tasklist_lock); | 168 | read_lock(&tasklist_lock); |
169 | do_each_thread(g, p) { | 169 | do_each_thread(g, p) { |
170 | if (!freezeable(p)) | 170 | if (!freezable(p)) |
171 | continue; | 171 | continue; |
172 | 172 | ||
173 | if (nosig_only && should_send_signal(p)) | 173 | if (nosig_only && should_send_signal(p)) |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 90a17ca2ad0b..88a3e34f51f6 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -2965,7 +2965,7 @@ struct workqueue_struct *__alloc_workqueue_key(const char *name, | |||
2965 | */ | 2965 | */ |
2966 | spin_lock(&workqueue_lock); | 2966 | spin_lock(&workqueue_lock); |
2967 | 2967 | ||
2968 | if (workqueue_freezing && wq->flags & WQ_FREEZEABLE) | 2968 | if (workqueue_freezing && wq->flags & WQ_FREEZABLE) |
2969 | for_each_cwq_cpu(cpu, wq) | 2969 | for_each_cwq_cpu(cpu, wq) |
2970 | get_cwq(cpu, wq)->max_active = 0; | 2970 | get_cwq(cpu, wq)->max_active = 0; |
2971 | 2971 | ||
@@ -3077,7 +3077,7 @@ void workqueue_set_max_active(struct workqueue_struct *wq, int max_active) | |||
3077 | 3077 | ||
3078 | spin_lock_irq(&gcwq->lock); | 3078 | spin_lock_irq(&gcwq->lock); |
3079 | 3079 | ||
3080 | if (!(wq->flags & WQ_FREEZEABLE) || | 3080 | if (!(wq->flags & WQ_FREEZABLE) || |
3081 | !(gcwq->flags & GCWQ_FREEZING)) | 3081 | !(gcwq->flags & GCWQ_FREEZING)) |
3082 | get_cwq(gcwq->cpu, wq)->max_active = max_active; | 3082 | get_cwq(gcwq->cpu, wq)->max_active = max_active; |
3083 | 3083 | ||
@@ -3327,7 +3327,7 @@ static int __cpuinit trustee_thread(void *__gcwq) | |||
3327 | * want to get it over with ASAP - spam rescuers, wake up as | 3327 | * want to get it over with ASAP - spam rescuers, wake up as |
3328 | * many idlers as necessary and create new ones till the | 3328 | * many idlers as necessary and create new ones till the |
3329 | * worklist is empty. Note that if the gcwq is frozen, there | 3329 | * worklist is empty. Note that if the gcwq is frozen, there |
3330 | * may be frozen works in freezeable cwqs. Don't declare | 3330 | * may be frozen works in freezable cwqs. Don't declare |
3331 | * completion while frozen. | 3331 | * completion while frozen. |
3332 | */ | 3332 | */ |
3333 | while (gcwq->nr_workers != gcwq->nr_idle || | 3333 | while (gcwq->nr_workers != gcwq->nr_idle || |
@@ -3585,9 +3585,9 @@ EXPORT_SYMBOL_GPL(work_on_cpu); | |||
3585 | /** | 3585 | /** |
3586 | * freeze_workqueues_begin - begin freezing workqueues | 3586 | * freeze_workqueues_begin - begin freezing workqueues |
3587 | * | 3587 | * |
3588 | * Start freezing workqueues. After this function returns, all | 3588 | * Start freezing workqueues. After this function returns, all freezable |
3589 | * freezeable workqueues will queue new works to their frozen_works | 3589 | * workqueues will queue new works to their frozen_works list instead of |
3590 | * list instead of gcwq->worklist. | 3590 | * gcwq->worklist. |
3591 | * | 3591 | * |
3592 | * CONTEXT: | 3592 | * CONTEXT: |
3593 | * Grabs and releases workqueue_lock and gcwq->lock's. | 3593 | * Grabs and releases workqueue_lock and gcwq->lock's. |
@@ -3613,7 +3613,7 @@ void freeze_workqueues_begin(void) | |||
3613 | list_for_each_entry(wq, &workqueues, list) { | 3613 | list_for_each_entry(wq, &workqueues, list) { |
3614 | struct cpu_workqueue_struct *cwq = get_cwq(cpu, wq); | 3614 | struct cpu_workqueue_struct *cwq = get_cwq(cpu, wq); |
3615 | 3615 | ||
3616 | if (cwq && wq->flags & WQ_FREEZEABLE) | 3616 | if (cwq && wq->flags & WQ_FREEZABLE) |
3617 | cwq->max_active = 0; | 3617 | cwq->max_active = 0; |
3618 | } | 3618 | } |
3619 | 3619 | ||
@@ -3624,7 +3624,7 @@ void freeze_workqueues_begin(void) | |||
3624 | } | 3624 | } |
3625 | 3625 | ||
3626 | /** | 3626 | /** |
3627 | * freeze_workqueues_busy - are freezeable workqueues still busy? | 3627 | * freeze_workqueues_busy - are freezable workqueues still busy? |
3628 | * | 3628 | * |
3629 | * Check whether freezing is complete. This function must be called | 3629 | * Check whether freezing is complete. This function must be called |
3630 | * between freeze_workqueues_begin() and thaw_workqueues(). | 3630 | * between freeze_workqueues_begin() and thaw_workqueues(). |
@@ -3633,8 +3633,8 @@ void freeze_workqueues_begin(void) | |||
3633 | * Grabs and releases workqueue_lock. | 3633 | * Grabs and releases workqueue_lock. |
3634 | * | 3634 | * |
3635 | * RETURNS: | 3635 | * RETURNS: |
3636 | * %true if some freezeable workqueues are still busy. %false if | 3636 | * %true if some freezable workqueues are still busy. %false if freezing |
3637 | * freezing is complete. | 3637 | * is complete. |
3638 | */ | 3638 | */ |
3639 | bool freeze_workqueues_busy(void) | 3639 | bool freeze_workqueues_busy(void) |
3640 | { | 3640 | { |
@@ -3654,7 +3654,7 @@ bool freeze_workqueues_busy(void) | |||
3654 | list_for_each_entry(wq, &workqueues, list) { | 3654 | list_for_each_entry(wq, &workqueues, list) { |
3655 | struct cpu_workqueue_struct *cwq = get_cwq(cpu, wq); | 3655 | struct cpu_workqueue_struct *cwq = get_cwq(cpu, wq); |
3656 | 3656 | ||
3657 | if (!cwq || !(wq->flags & WQ_FREEZEABLE)) | 3657 | if (!cwq || !(wq->flags & WQ_FREEZABLE)) |
3658 | continue; | 3658 | continue; |
3659 | 3659 | ||
3660 | BUG_ON(cwq->nr_active < 0); | 3660 | BUG_ON(cwq->nr_active < 0); |
@@ -3699,7 +3699,7 @@ void thaw_workqueues(void) | |||
3699 | list_for_each_entry(wq, &workqueues, list) { | 3699 | list_for_each_entry(wq, &workqueues, list) { |
3700 | struct cpu_workqueue_struct *cwq = get_cwq(cpu, wq); | 3700 | struct cpu_workqueue_struct *cwq = get_cwq(cpu, wq); |
3701 | 3701 | ||
3702 | if (!cwq || !(wq->flags & WQ_FREEZEABLE)) | 3702 | if (!cwq || !(wq->flags & WQ_FREEZABLE)) |
3703 | continue; | 3703 | continue; |
3704 | 3704 | ||
3705 | /* restore max_active and repopulate worklist */ | 3705 | /* restore max_active and repopulate worklist */ |