All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] workqueue fixes for v4.3-rc5
@ 2015-10-13 21:49 Tejun Heo
  2015-10-14 16:30   ` Linus Torvalds
  0 siblings, 1 reply; 39+ messages in thread
From: Tejun Heo @ 2015-10-13 21:49 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Lai Jiangshan, Shaohua Li

Hello, Linus.

Single patch to fix delayed work being queued on the wrong CPU.  This
has been broken forever (v2.6.31+) but obviously doesn't trigger in
most configurations.

Thanks.

The following changes since commit 9ffecb10283508260936b96022d4ee43a7798b4c:

  Linux 4.3-rc3 (2015-09-27 07:50:08 -0400)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-4.3-fixes

for you to fetch changes up to 874bbfe600a660cba9c776b3957b1ce393151b76:

  workqueue: make sure delayed work run in local cpu (2015-09-30 13:06:46 -0400)

----------------------------------------------------------------
Shaohua Li (1):
      workqueue: make sure delayed work run in local cpu

 kernel/workqueue.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index ca71582..bcb14ca 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1458,13 +1458,13 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq,
 	timer_stats_timer_set_start_info(&dwork->timer);
 
 	dwork->wq = wq;
+	/* timer isn't guaranteed to run in this cpu, record earlier */
+	if (cpu == WORK_CPU_UNBOUND)
+		cpu = raw_smp_processor_id();
 	dwork->cpu = cpu;
 	timer->expires = jiffies + delay;
 
-	if (unlikely(cpu != WORK_CPU_UNBOUND))
-		add_timer_on(timer, cpu);
-	else
-		add_timer(timer);
+	add_timer_on(timer, cpu);
 }
 
 /**


^ permalink raw reply related	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2015-10-19  3:51 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-13 21:49 [GIT PULL] workqueue fixes for v4.3-rc5 Tejun Heo
2015-10-14 16:30 ` Linus Torvalds
2015-10-14 16:30   ` Linus Torvalds
2015-10-14 16:57   ` Tejun Heo
2015-10-14 16:57     ` Tejun Heo
2015-10-14 17:36     ` Linus Torvalds
2015-10-14 17:36       ` Linus Torvalds
2015-10-14 17:57       ` Christoph Lameter
2015-10-14 17:57         ` Christoph Lameter
2015-10-14 18:37         ` Linus Torvalds
2015-10-14 18:37           ` Linus Torvalds
2015-10-14 18:58           ` Christoph Lameter
2015-10-14 18:58             ` Christoph Lameter
2015-10-14 19:01           ` Linus Torvalds
2015-10-14 19:01             ` Linus Torvalds
2015-10-14 19:02       ` Tejun Heo
2015-10-14 19:02         ` Tejun Heo
2015-10-14 19:16         ` Linus Torvalds
2015-10-14 19:16           ` Linus Torvalds
2015-10-14 19:38           ` Tejun Heo
2015-10-14 19:38             ` Tejun Heo
2015-10-14 20:10             ` Linus Torvalds
2015-10-14 20:10               ` Linus Torvalds
2015-10-14 20:24               ` Tejun Heo
2015-10-14 20:24                 ` Tejun Heo
2015-10-19  3:51                 ` Mike Galbraith
2015-10-19  3:51                   ` Mike Galbraith
2015-10-16 19:51               ` [PATCH] vmstat_update: ensure work remains on the same core Chris Metcalf
2015-10-16 19:51                 ` Chris Metcalf
2015-10-16 19:54                 ` Linus Torvalds
2015-10-16 19:54                   ` Linus Torvalds
2015-10-14 18:03   ` [GIT PULL] workqueue fixes for v4.3-rc5 Christoph Lameter
2015-10-14 18:03     ` Christoph Lameter
2015-10-14 18:40     ` Linus Torvalds
2015-10-14 18:40       ` Linus Torvalds
2015-10-14 18:59       ` Christoph Lameter
2015-10-14 18:59         ` Christoph Lameter
2015-10-14 19:10         ` Linus Torvalds
2015-10-14 19:10           ` Linus Torvalds

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.