Skip to content

Commit dbfe205

Browse files
DispatchCodeAlexander Gordeev
authored andcommitted
s390/diag324: Replace use of system_wq with system_percpu_wq
Currently if a user enqueue a work item using schedule_delayed_work() the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to schedule_work() that is using system_wq and queue_work(), that makes use again of WORK_CPU_UNBOUND. This lack of consistentcy cannot be addressed without refactoring the API. system_wq is a per-CPU worqueue, yet nothing in its name tells about that CPU affinity constraint, which is very often not required by users. Make it clear by renaming system_wq to system_percpu_wq. queue_work() / queue_delayed_work() mod_delayed_work() will now use the new per-cpu wq. The old wq will be kept for a few release cylces. Suggested-by: Tejun Heo <tj@kernel.org> Signed-off-by: Marco Crivellari <marco.crivellari@suse.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
1 parent f707d2f commit dbfe205

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/s390/kernel/diag/diag324.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static void pibwork_handler(struct work_struct *work)
116116
mutex_lock(&pibmutex);
117117
timedout = ktime_add_ns(data->expire, PIBWORK_DELAY);
118118
if (ktime_before(ktime_get(), timedout)) {
119-
mod_delayed_work(system_wq, &pibwork, nsecs_to_jiffies(PIBWORK_DELAY));
119+
mod_delayed_work(system_percpu_wq, &pibwork, nsecs_to_jiffies(PIBWORK_DELAY));
120120
goto out;
121121
}
122122
vfree(data->pib);
@@ -174,7 +174,7 @@ long diag324_pibbuf(unsigned long arg)
174174
pib_update(data);
175175
data->sequence++;
176176
data->expire = ktime_add_ns(ktime_get(), tod_to_ns(data->pib->intv));
177-
mod_delayed_work(system_wq, &pibwork, nsecs_to_jiffies(PIBWORK_DELAY));
177+
mod_delayed_work(system_percpu_wq, &pibwork, nsecs_to_jiffies(PIBWORK_DELAY));
178178
first = false;
179179
}
180180
rc = data->rc;

0 commit comments

Comments
 (0)