lkml.org 
[lkml]   [2016]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Crashes with 874bbfe600a6 in 3.18.25
On Wed 03-02-16 11:59:01, Tejun Heo wrote:
> On Wed, Feb 03, 2016 at 05:48:52PM +0100, Michal Hocko wrote:
[...]
> > anything and add_timer_on also for WORK_CPU_UNBOUND is really required
> > then we should at least preserve WORK_CPU_UNBOUND in dwork->cpu so that
> > __queue_work can actually move on to the local CPU properly and handle
> > the offline cpu properly.
>
> delayed_work->cpu is determined on queueing time. Dealing with
> offlined cpus at execution is completley fine. There's no need to
> "preserve" anything.

I've seen you have posted a fix in the mean time but just for my
understading. Why the following is not an appropriate fix?

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index c579dbab2e36..52bb11cf20d1 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1459,9 +1459,9 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq,

dwork->wq = wq;
/* timer isn't guaranteed to run in this cpu, record earlier */
+ dwork->cpu = cpu;
if (cpu == WORK_CPU_UNBOUND)
cpu = raw_smp_processor_id();
- dwork->cpu = cpu;
timer->expires = jiffies + delay;

add_timer_on(timer, cpu);
Thanks!
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2016-02-04 08:01    [W:2.696 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site