workqueue, freezer: unify spelling of 'freeze' + 'able' to 'freezable'
Subsystems (15)
Tejun Heo
maintainerPATCH 1/1 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'.
---
I'd like to push this through wq#fixes-2.6.38 branch as routing this type of changes through linux-next usually only increases the amount of conflicts. Rafael, can you please ack if you agree?
Thanks.
Documentation/workqueue.txt | 4 ++-- drivers/memstick/core/memstick.c | 2 +- drivers/misc/tifm_core.c | 2 +- drivers/misc/vmw_balloon.c | 2 +- drivers/mtd/nand/r852.c | 2 +- drivers/mtd/sm_ftl.c | 2 +- drivers/net/can/mcp251x.c | 2 +- drivers/tty/serial/max3100.c | 2 +- drivers/tty/serial/max3107.c | 2 +- fs/gfs2/glock.c | 4 ++-- fs/gfs2/main.c | 2 +- include/linux/freezer.h | 2 +- include/linux/sched.h | 2 +- include/linux/workqueue.h | 8 ++++---- kernel/power/main.c | 2 +- kernel/power/process.c | 6 +++--- kernel/workqueue.c | 24 ++++++++++++------------ 17 files changed, 35 insertions(+), 35 deletions(-)
Documentation/workqueue.txt +2 -2
@@ -190,9 +190,9 @@ resources, scheduled and executed. * Long running CPU intensive workloads which can be better managed by the system scheduler. - WQ_FREEZEABLE + WQ_FREEZABLE - A freezeable wq participates in the freeze phase of the system + A freezable wq participates in the freeze phase of the system suspend operations. Work items on the wq are drained and no new work item starts execution until thawed.
drivers/memstick/core/memstick.c +1 -1
@@ -621,7 +621,7 @@ static int __init memstick_init(void) {int rc; - workqueue =create_freezeable_workqueue ("kmemstick" ); + workqueue =create_freezable_workqueue ("kmemstick" );if (!workqueue)return -ENOMEM ;
drivers/misc/tifm_core.c +1 -1
@@ -329,7 +329,7 @@ static int __init tifm_init(void) {int rc; - workqueue =create_freezeable_workqueue ("tifm" ); + workqueue =create_freezable_workqueue ("tifm" );if (!workqueue)return -ENOMEM ;
drivers/misc/vmw_balloon.c +1 -1
@@ -785,7 +785,7 @@ static int __init vmballoon_init(void)if (x86_hyper != &x86_hyper_vmware)return -ENODEV ; - vmballoon_wq =create_freezeable_workqueue ("vmmemctl" ); + vmballoon_wq =create_freezable_workqueue ("vmmemctl" );if (!vmballoon_wq) {pr_err ("failed to create workqueue\n" );return -ENOMEM ;
drivers/mtd/nand/r852.c +1 -1
@@ -930,7 +930,7 @@ int r852_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)init_completion (&dev->dma_done); - dev->card_workqueue =create_freezeable_workqueue (DRV_NAME ); + dev->card_workqueue =create_freezable_workqueue (DRV_NAME );if (!dev->card_workqueue) goto error9;
drivers/mtd/sm_ftl.c +1 -1
@@ -1258,7 +1258,7 @@ static struct mtd_blktrans_ops sm_ftl_ops = {static __init int sm_module_init (void ) {int error =0 ; - cache_flush_workqueue =create_freezeable_workqueue ("smflush" ); + cache_flush_workqueue =create_freezable_workqueue ("smflush" );if (IS_ERR (cache_flush_workqueue))return PTR_ERR (cache_flush_workqueue);
drivers/net/can/mcp251x.c +1 -1
@@ -940,7 +940,7 @@ static int mcp251x_open(struct net_device *net) goto open_unlock; } - priv->wq =create_freezeable_workqueue ("mcp251x_wq" ); + priv->wq =create_freezable_workqueue ("mcp251x_wq" );INIT_WORK (&priv->tx_work, mcp251x_tx_work_handler);INIT_WORK (&priv->restart_work, mcp251x_restart_work_handler);
drivers/tty/serial/max3100.c +1 -1
@@ -601,7 +601,7 @@ static int max3100_startup(struct uart_port *port) s->rts =0 ;sprintf (b,"max3100-%d" , s->minor); - s->workqueue =create_freezeable_workqueue (b); + s->workqueue =create_freezable_workqueue (b);if (!s->workqueue) {dev_warn (&s->spi->dev,"cannot create workqueue\n" );return -EBUSY ;
drivers/tty/serial/max3107.c +1 -1
@@ -833,7 +833,7 @@ static int max3107_startup(struct uart_port *port) struct max3107_port *s = container_of(port, struct max3107_port, port);/* Initialize work queue */ - s->workqueue =create_freezeable_workqueue ("max3107" ); + s->workqueue =create_freezable_workqueue ("max3107" );if (!s->workqueue) {dev_err (&s->spi->dev,"Workqueue creation failed\n" );return -EBUSY ;
fs/gfs2/glock.c +2 -2
@@ -1779,11 +1779,11 @@ int __init gfs2_glock_init(void)#endif glock_workqueue =alloc_workqueue ("glock_workqueue" ,WQ_MEM_RECLAIM | -WQ_HIGHPRI |WQ_FREEZEABLE ,0 ); +WQ_HIGHPRI |WQ_FREEZABLE ,0 );if (IS_ERR (glock_workqueue))return PTR_ERR (glock_workqueue); gfs2_delete_workqueue =alloc_workqueue ("delete_workqueue" , -WQ_MEM_RECLAIM |WQ_FREEZEABLE , +WQ_MEM_RECLAIM |WQ_FREEZABLE ,0 );if (IS_ERR (gfs2_delete_workqueue)) {destroy_workqueue (glock_workqueue);
fs/gfs2/main.c +1 -1
@@ -144,7 +144,7 @@ static int __init init_gfs2_fs(void) error = -ENOMEM ; gfs_recovery_wq =alloc_workqueue ("gfs_recovery" , -WQ_MEM_RECLAIM |WQ_FREEZEABLE ,0 ); +WQ_MEM_RECLAIM |WQ_FREEZABLE ,0 );if (!gfs_recovery_wq) goto fail_wq;
include/linux/freezer.h +1 -1
@@ -109,7 +109,7 @@ static inline void freezer_count(void) }/* -* Check if the task should be counted as freezeable by the freezer +* Check if the task should be counted as freezable by the freezer */ static inline int freezer_should_skip (struct task_struct *p) {
include/linux/sched.h +1 -1
@@ -1744,7 +1744,7 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *#define PF_MCE_EARLY 0x08000000/* Early kill for mce process policy */ #define PF_MEMPOLICY 0x10000000/* Non-default NUMA mempolicy */ #define PF_MUTEX_TESTER 0x20000000/* Thread belongs to the rt mutex tester */ -#define PF_FREEZER_SKIP 0x40000000/* Freezer should not count it as freezeable */ +#define PF_FREEZER_SKIP 0x40000000/* Freezer should not count it as freezable */ #define PF_FREEZER_NOSIG 0x80000000/* Freezer won't send signals to it */ /*
include/linux/workqueue.h +4 -4
@@ -250,7 +250,7 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }enum {WQ_NON_REENTRANT =1 <<0 ,/* guarantee non-reentrance */ WQ_UNBOUND =1 <<1 ,/* not bound to any cpu */ -WQ_FREEZEABLE =1 <<2 ,/* freeze during suspend */ +WQ_FREEZABLE =1 <<2 ,/* freeze during suspend */ WQ_MEM_RECLAIM =1 <<3 ,/* may be used for memory reclaim */ WQ_HIGHPRI =1 <<4 ,/* high priority */ WQ_CPU_INTENSIVE =1 <<5 ,/* cpu instensive workqueue */
@@ -318,7 +318,7 @@ __alloc_workqueue_key(const char *name, unsigned int flags, int max_active,/** * alloc_ordered_workqueue - allocate an ordered workqueue * @name: name of the workqueue -* @flags: WQ_* flags (only WQ_FREEZEABLE and WQ_MEM_RECLAIM are meaningful) +* @flags: WQ_* flags (only WQ_FREEZABLE and WQ_MEM_RECLAIM are meaningful) * * Allocate an ordered workqueue. An ordered workqueue executes at * most one work item at any given time in the queued order. They are
@@ -335,8 +335,8 @@ alloc_ordered_workqueue(const char *name, unsigned int flags)#define create_workqueue (name) \ alloc_workqueue((name), WQ_MEM_RECLAIM, 1) -#define create_freezeable_workqueue (name) \ - alloc_workqueue((name), WQ_FREEZEABLE | WQ_UNBOUND | WQ_MEM_RECLAIM, 1) +#define create_freezable_workqueue (name) \ + alloc_workqueue((name), WQ_FREEZABLE | WQ_UNBOUND | WQ_MEM_RECLAIM, 1)#define create_singlethread_workqueue (name) \ alloc_workqueue((name), WQ_UNBOUND | WQ_MEM_RECLAIM, 1)
kernel/power/main.c +1 -1
@@ -326,7 +326,7 @@ EXPORT_SYMBOL_GPL(pm_wq);static int __init pm_start_workqueue (void ) { - pm_wq =alloc_workqueue ("pm" ,WQ_FREEZEABLE ,0 ); + pm_wq =alloc_workqueue ("pm" ,WQ_FREEZABLE ,0 );return pm_wq ?0 : -ENOMEM ; }
kernel/power/process.c +3 -3
@@ -22,7 +22,7 @@*/ #define TIMEOUT (20 * HZ) -static inline int freezeable (struct task_struct * p) +static inline int freezable (struct task_struct * p) { if ((p == current) || (p->flags & PF_NOFREEZE) ||
@@ -53,7 +53,7 @@ static int try_to_freeze_tasks(bool sig_only) todo =0 ;read_lock (&tasklist_lock); do_each_thread(g, p) { -if (frozen (p) || !freezeable (p)) +if (frozen (p) || !freezable (p))continue ;if (!freeze_task (p, sig_only))
@@ -167,7 +167,7 @@ static void thaw_tasks(bool nosig_only)read_lock (&tasklist_lock); do_each_thread(g, p) { -if (!freezeable (p)) +if (!freezable (p))continue ;if (nosig_only &&should_send_signal (p))
kernel/workqueue.c +12 -12
@@ -2965,7 +2965,7 @@ struct workqueue_struct *__alloc_workqueue_key(const char *name,*/ spin_lock (&workqueue_lock); -if (workqueue_freezing && wq->flags &WQ_FREEZEABLE ) +if (workqueue_freezing && wq->flags &WQ_FREEZABLE )for_each_cwq_cpu (cpu, wq)get_cwq (cpu, wq)->max_active =0 ;
@@ -3077,7 +3077,7 @@ void workqueue_set_max_active(struct workqueue_struct *wq, int max_active)spin_lock_irq (&gcwq->lock); -if (!(wq->flags &WQ_FREEZEABLE ) || +if (!(wq->flags &WQ_FREEZABLE ) || !(gcwq->flags &GCWQ_FREEZING ))get_cwq (gcwq->cpu, wq)->max_active = max_active;
@@ -3327,7 +3327,7 @@ static int __cpuinit trustee_thread(void *__gcwq)* want to get it over with ASAP - spam rescuers, wake up as * many idlers as necessary and create new ones till the * worklist is empty. Note that if the gcwq is frozen, there -* may be frozen works in freezeable cwqs. Don't declare +* may be frozen works in freezable cwqs. Don't declare * completion while frozen. */ while (gcwq->nr_workers != gcwq->nr_idle ||
@@ -3585,9 +3585,9 @@ EXPORT_SYMBOL_GPL(work_on_cpu);/** * freeze_workqueues_begin - begin freezing workqueues * -* Start freezing workqueues. After this function returns, all -* freezeable workqueues will queue new works to their frozen_works -* list instead of gcwq->worklist. +* Start freezing workqueues. After this function returns, all freezable +* workqueues will queue new works to their frozen_works list instead of +* gcwq->worklist. * * CONTEXT: * Grabs and releases workqueue_lock and gcwq->lock's.
@@ -3613,7 +3613,7 @@ void freeze_workqueues_begin(void)list_for_each_entry (wq, &workqueues, list) {struct cpu_workqueue_struct *cwq =get_cwq (cpu, wq); -if (cwq && wq->flags &WQ_FREEZEABLE ) +if (cwq && wq->flags &WQ_FREEZABLE ) cwq->max_active =0 ; }
@@ -3624,7 +3624,7 @@ void freeze_workqueues_begin(void) }/** -* freeze_workqueues_busy - are freezeable workqueues still busy? +* freeze_workqueues_busy - are freezable workqueues still busy? * * Check whether freezing is complete. This function must be called * between freeze_workqueues_begin() and thaw_workqueues().
@@ -3633,8 +3633,8 @@ void freeze_workqueues_begin(void)* Grabs and releases workqueue_lock. * * RETURNS: -* %true if some freezeable workqueues are still busy. %false if -* freezing is complete. +* %true if some freezable workqueues are still busy. %false if freezing +* is complete. */ bool freeze_workqueues_busy (void ) {
@@ -3654,7 +3654,7 @@ bool freeze_workqueues_busy(void)list_for_each_entry (wq, &workqueues, list) {struct cpu_workqueue_struct *cwq =get_cwq (cpu, wq); -if (!cwq || !(wq->flags &WQ_FREEZEABLE )) +if (!cwq || !(wq->flags &WQ_FREEZABLE ))continue ;BUG_ON (cwq->nr_active <0 );
@@ -3699,7 +3699,7 @@ void thaw_workqueues(void)list_for_each_entry (wq, &workqueues, list) {struct cpu_workqueue_struct *cwq =get_cwq (cpu, wq); -if (!cwq || !(wq->flags &WQ_FREEZEABLE )) +if (!cwq || !(wq->flags &WQ_FREEZABLE ))continue ;/* restore max_active and repopulate worklist */
Signature · 1 line
1.7.1
Quoted 14 lines · Tejun Heo
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 <[email protected]>Reported-by Alan Stern <[email protected]>Cc Dmitry Torokhov <[email protected]>Cc "Rafael J. Wysocki" <[email protected]>Cc David Woodhouse <[email protected]>Cc Alex Dubov <[email protected]>Cc "David S. Miller" <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Steven Whitehouse <[email protected]>
Quoted 4 lines
---
I'd like to push this through wq#fixes-2.6.38 branch as routing this type of changes through linux-next usually only increases the amount of conflicts. Rafael, can you please ack if you agree?
Sure.
Thanks,
Rafael
Quoted 365 lines
Documentation/workqueue.txt | 4 ++-- drivers/memstick/core/memstick.c | 2 +- drivers/misc/tifm_core.c | 2 +- drivers/misc/vmw_balloon.c | 2 +- drivers/mtd/nand/r852.c | 2 +- drivers/mtd/sm_ftl.c | 2 +- drivers/net/can/mcp251x.c | 2 +- drivers/tty/serial/max3100.c | 2 +- drivers/tty/serial/max3107.c | 2 +- fs/gfs2/glock.c | 4 ++-- fs/gfs2/main.c | 2 +- include/linux/freezer.h | 2 +- include/linux/sched.h | 2 +- include/linux/workqueue.h | 8 ++++---- kernel/power/main.c | 2 +- kernel/power/process.c | 6 +++--- kernel/workqueue.c | 24 ++++++++++++------------ 17 files changed, 35 insertions(+), 35 deletions(-)Documentation/workqueue.txt +2
-2@@ -190,9 +190,9 @@ resources, scheduled and executed. * Long running CPU intensive workloads which can be better managed by the system scheduler. - WQ_FREEZEABLE + WQ_FREEZABLE - A freezeable wq participates in the freeze phase of the system + A freezable wq participates in the freeze phase of the system suspend operations. Work items on the wq are drained and no new work item starts execution until thawed.drivers/memstick/core/memstick.c +1
-1@@ -621,7 +621,7 @@ static int __init memstick_init(void) {int rc; - workqueue =create_freezeable_workqueue ("kmemstick" ); + workqueue =create_freezable_workqueue ("kmemstick" );if (!workqueue)return -ENOMEM ;drivers/misc/tifm_core.c +1
-1@@ -329,7 +329,7 @@ static int __init tifm_init(void) {int rc; - workqueue =create_freezeable_workqueue ("tifm" ); + workqueue =create_freezable_workqueue ("tifm" );if (!workqueue)return -ENOMEM ;drivers/misc/vmw_balloon.c +1
-1@@ -785,7 +785,7 @@ static int __init vmballoon_init(void)if (x86_hyper != &x86_hyper_vmware)return -ENODEV ; - vmballoon_wq =create_freezeable_workqueue ("vmmemctl" ); + vmballoon_wq =create_freezable_workqueue ("vmmemctl" );if (!vmballoon_wq) {pr_err ("failed to create workqueue\n" );return -ENOMEM ;drivers/mtd/nand/r852.c +1
-1@@ -930,7 +930,7 @@ int r852_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)init_completion (&dev->dma_done); - dev->card_workqueue =create_freezeable_workqueue (DRV_NAME ); + dev->card_workqueue =create_freezable_workqueue (DRV_NAME );if (!dev->card_workqueue) goto error9;drivers/mtd/sm_ftl.c +1
-1@@ -1258,7 +1258,7 @@ static struct mtd_blktrans_ops sm_ftl_ops = {static __init int sm_module_init (void ) {int error =0 ; - cache_flush_workqueue =create_freezeable_workqueue ("smflush" ); + cache_flush_workqueue =create_freezable_workqueue ("smflush" );if (IS_ERR (cache_flush_workqueue))return PTR_ERR (cache_flush_workqueue);drivers/net/can/mcp251x.c +1
-1@@ -940,7 +940,7 @@ static int mcp251x_open(struct net_device *net) goto open_unlock; } - priv->wq =create_freezeable_workqueue ("mcp251x_wq" ); + priv->wq =create_freezable_workqueue ("mcp251x_wq" );INIT_WORK (&priv->tx_work, mcp251x_tx_work_handler);INIT_WORK (&priv->restart_work, mcp251x_restart_work_handler);drivers/tty/serial/max3100.c +1
-1@@ -601,7 +601,7 @@ static int max3100_startup(struct uart_port *port) s->rts =0 ;sprintf (b,"max3100-%d" , s->minor); - s->workqueue =create_freezeable_workqueue (b); + s->workqueue =create_freezable_workqueue (b);if (!s->workqueue) {dev_warn (&s->spi->dev,"cannot create workqueue\n" );return -EBUSY ;drivers/tty/serial/max3107.c +1
-1@@ -833,7 +833,7 @@ static int max3107_startup(struct uart_port *port) struct max3107_port *s = container_of(port, struct max3107_port, port);/* Initialize work queue */ - s->workqueue =create_freezeable_workqueue ("max3107" ); + s->workqueue =create_freezable_workqueue ("max3107" );if (!s->workqueue) {dev_err (&s->spi->dev,"Workqueue creation failed\n" );return -EBUSY ;fs/gfs2/glock.c +2
-2@@ -1779,11 +1779,11 @@ int __init gfs2_glock_init(void)#endif glock_workqueue =alloc_workqueue ("glock_workqueue" ,WQ_MEM_RECLAIM | -WQ_HIGHPRI |WQ_FREEZEABLE ,0 ); +WQ_HIGHPRI |WQ_FREEZABLE ,0 );if (IS_ERR (glock_workqueue))return PTR_ERR (glock_workqueue); gfs2_delete_workqueue =alloc_workqueue ("delete_workqueue" , -WQ_MEM_RECLAIM |WQ_FREEZEABLE , +WQ_MEM_RECLAIM |WQ_FREEZABLE ,0 );if (IS_ERR (gfs2_delete_workqueue)) {destroy_workqueue (glock_workqueue);fs/gfs2/main.c +1
-1@@ -144,7 +144,7 @@ static int __init init_gfs2_fs(void) error = -ENOMEM ; gfs_recovery_wq =alloc_workqueue ("gfs_recovery" , -WQ_MEM_RECLAIM |WQ_FREEZEABLE ,0 ); +WQ_MEM_RECLAIM |WQ_FREEZABLE ,0 );if (!gfs_recovery_wq) goto fail_wq;include/linux/freezer.h +1
-1@@ -109,7 +109,7 @@ static inline void freezer_count(void) }/* -* Check if the task should be counted as freezeable by the freezer +* Check if the task should be counted as freezable by the freezer */ static inline int freezer_should_skip (struct task_struct *p) {include/linux/sched.h +1
-1@@ -1744,7 +1744,7 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *#define PF_MCE_EARLY 0x08000000/* Early kill for mce process policy */ #define PF_MEMPOLICY 0x10000000/* Non-default NUMA mempolicy */ #define PF_MUTEX_TESTER 0x20000000/* Thread belongs to the rt mutex tester */ -#define PF_FREEZER_SKIP 0x40000000/* Freezer should not count it as freezeable */ +#define PF_FREEZER_SKIP 0x40000000/* Freezer should not count it as freezable */ #define PF_FREEZER_NOSIG 0x80000000/* Freezer won't send signals to it */ /* include/linux/workqueue.h +4
-4@@ -250,7 +250,7 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }enum {WQ_NON_REENTRANT =1 <<0 ,/* guarantee non-reentrance */ WQ_UNBOUND =1 <<1 ,/* not bound to any cpu */ -WQ_FREEZEABLE =1 <<2 ,/* freeze during suspend */ +WQ_FREEZABLE =1 <<2 ,/* freeze during suspend */ WQ_MEM_RECLAIM =1 <<3 ,/* may be used for memory reclaim */ WQ_HIGHPRI =1 <<4 ,/* high priority */ WQ_CPU_INTENSIVE =1 <<5 ,/* cpu instensive workqueue */ @@ -318,7 +318,7 @@ __alloc_workqueue_key(const char *name, unsigned int flags, int max_active,/** * alloc_ordered_workqueue - allocate an ordered workqueue * @name: name of the workqueue -* @flags: WQ_* flags (only WQ_FREEZEABLE and WQ_MEM_RECLAIM are meaningful) +* @flags: WQ_* flags (only WQ_FREEZABLE and WQ_MEM_RECLAIM are meaningful) * * Allocate an ordered workqueue. An ordered workqueue executes at * most one work item at any given time in the queued order. They are @@ -335,8 +335,8 @@ alloc_ordered_workqueue(const char *name, unsigned int flags)#define create_workqueue (name) \ alloc_workqueue((name), WQ_MEM_RECLAIM, 1) -#define create_freezeable_workqueue (name) \ - alloc_workqueue((name), WQ_FREEZEABLE | WQ_UNBOUND | WQ_MEM_RECLAIM, 1) +#define create_freezable_workqueue (name) \ + alloc_workqueue((name), WQ_FREEZABLE | WQ_UNBOUND | WQ_MEM_RECLAIM, 1)#define create_singlethread_workqueue (name) \ alloc_workqueue((name), WQ_UNBOUND | WQ_MEM_RECLAIM, 1)kernel/power/main.c +1
-1@@ -326,7 +326,7 @@ EXPORT_SYMBOL_GPL(pm_wq);static int __init pm_start_workqueue (void ) { - pm_wq =alloc_workqueue ("pm" ,WQ_FREEZEABLE ,0 ); + pm_wq =alloc_workqueue ("pm" ,WQ_FREEZABLE ,0 );return pm_wq ?0 : -ENOMEM ; }kernel/power/process.c +3
-3@@ -22,7 +22,7 @@*/ #define TIMEOUT (20 * HZ) -static inline int freezeable (struct task_struct * p) +static inline int freezable (struct task_struct * p) { if ((p == current) || (p->flags & PF_NOFREEZE) ||@@ -53,7 +53,7 @@ static int try_to_freeze_tasks(bool sig_only) todo =0 ;read_lock (&tasklist_lock); do_each_thread(g, p) { -if (frozen (p) || !freezeable (p)) +if (frozen (p) || !freezable (p))continue ;if (!freeze_task (p, sig_only))@@ -167,7 +167,7 @@ static void thaw_tasks(bool nosig_only)read_lock (&tasklist_lock); do_each_thread(g, p) { -if (!freezeable (p)) +if (!freezable (p))continue ;if (nosig_only &&should_send_signal (p))kernel/workqueue.c +12
-12@@ -2965,7 +2965,7 @@ struct workqueue_struct *__alloc_workqueue_key(const char *name,*/ spin_lock (&workqueue_lock); -if (workqueue_freezing && wq->flags &WQ_FREEZEABLE ) +if (workqueue_freezing && wq->flags &WQ_FREEZABLE )for_each_cwq_cpu (cpu, wq)get_cwq (cpu, wq)->max_active =0 ;@@ -3077,7 +3077,7 @@ void workqueue_set_max_active(struct workqueue_struct *wq, int max_active)spin_lock_irq (&gcwq->lock); -if (!(wq->flags &WQ_FREEZEABLE ) || +if (!(wq->flags &WQ_FREEZABLE ) || !(gcwq->flags &GCWQ_FREEZING ))get_cwq (gcwq->cpu, wq)->max_active = max_active;@@ -3327,7 +3327,7 @@ static int __cpuinit trustee_thread(void *__gcwq)* want to get it over with ASAP - spam rescuers, wake up as * many idlers as necessary and create new ones till the * worklist is empty. Note that if the gcwq is frozen, there -* may be frozen works in freezeable cwqs. Don't declare +* may be frozen works in freezable cwqs. Don't declare * completion while frozen. */ while (gcwq->nr_workers != gcwq->nr_idle ||@@ -3585,9 +3585,9 @@ EXPORT_SYMBOL_GPL(work_on_cpu);/** * freeze_workqueues_begin - begin freezing workqueues * -* Start freezing workqueues. After this function returns, all -* freezeable workqueues will queue new works to their frozen_works -* list instead of gcwq->worklist. +* Start freezing workqueues. After this function returns, all freezable +* workqueues will queue new works to their frozen_works list instead of +* gcwq->worklist. * * CONTEXT: * Grabs and releases workqueue_lock and gcwq->lock's. @@ -3613,7 +3613,7 @@ void freeze_workqueues_begin(void)list_for_each_entry (wq, &workqueues, list) {struct cpu_workqueue_struct *cwq =get_cwq (cpu, wq); -if (cwq && wq->flags &WQ_FREEZEABLE ) +if (cwq && wq->flags &WQ_FREEZABLE ) cwq->max_active =0 ; }@@ -3624,7 +3624,7 @@ void freeze_workqueues_begin(void) }/** -* freeze_workqueues_busy - are freezeable workqueues still busy? +* freeze_workqueues_busy - are freezable workqueues still busy? * * Check whether freezing is complete. This function must be called * between freeze_workqueues_begin() and thaw_workqueues(). @@ -3633,8 +3633,8 @@ void freeze_workqueues_begin(void)* Grabs and releases workqueue_lock. * * RETURNS: -* %true if some freezeable workqueues are still busy. %false if -* freezing is complete. +* %true if some freezable workqueues are still busy. %false if freezing +* is complete. */ bool freeze_workqueues_busy (void ) {@@ -3654,7 +3654,7 @@ bool freeze_workqueues_busy(void)list_for_each_entry (wq, &workqueues, list) {struct cpu_workqueue_struct *cwq =get_cwq (cpu, wq); -if (!cwq || !(wq->flags &WQ_FREEZEABLE )) +if (!cwq || !(wq->flags &WQ_FREEZABLE ))continue ;BUG_ON (cwq->nr_active <0 );@@ -3699,7 +3699,7 @@ void thaw_workqueues(void)list_for_each_entry (wq, &workqueues, list) {struct cpu_workqueue_struct *cwq =get_cwq (cpu, wq); -if (!cwq || !(wq->flags &WQ_FREEZEABLE )) +if (!cwq || !(wq->flags &WQ_FREEZABLE ))continue ;/* restore max_active and repopulate worklist */
Quoted 5 lines · Tejun Heo
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'.
Quoted 8 lines
Signed-off-by Tejun Heo <[email protected]>Reported-by Alan Stern <[email protected]>Cc Dmitry Torokhov <[email protected]>Cc "Rafael J. Wysocki" <[email protected]>Cc David Woodhouse <[email protected]>Cc Alex Dubov <[email protected]>Cc "David S. Miller" <[email protected]>Cc Greg Kroah-Hartman <[email protected]>
Dmitry Torokhov
Acked-byQuoted 15 lines · Greg KH
Quoted 5 lines · Tejun Heo
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'.
Quoted 8 lines
Signed-off-by Tejun Heo <[email protected]>Reported-by Alan Stern <[email protected]>Cc Dmitry Torokhov <[email protected]>Cc "Rafael J. Wysocki" <[email protected]>Cc David Woodhouse <[email protected]>Cc Alex Dubov <[email protected]>Cc "David S. Miller" <[email protected]>Cc Greg Kroah-Hartman <[email protected]>
Quoted 2 lines
Thanks for doing this Tejun.
Signature · 1 line
Dmitry