[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141208154638.37c1ec18@kryten>
Date: Mon, 8 Dec 2014 15:46:38 +1100
From: Anton Blanchard <anton@...ba.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
Tejun Heo <tj@...nel.org>,
Wu Fengguang <fengguang.wu@...el.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
yuyang.du@...el.com, lkp@...org,
Yuanhan Liu <yuanhan.liu@...ux.intel.com>,
Paul Turner <pjt@...gle.com>,
Benjamin Segall <bsegall@...gle.com>,
Daniel J Blueman <daniel@...ascale.com>,
subbaram@...eaurora.org,
Brian Norris <computersforpeace@...il.com>, sp@...era.io,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
ppc-dev <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [PATCH] kthread: kthread_bind fails to enforce CPU affinity
(fixes kernel BUG at kernel/smpboot.c:134!)
Hi Linus,
> The __set_task_cpu() function does various other things too:
>
> set_task_rq(p, cpu);
> #ifdef CONFIG_SMP
> /*
> * After ->cpu is set up to a new value, task_rq_lock(p, ...)
> can be
> * successfuly executed on another CPU. We must ensure that
> updates of
> * per-task data have been completed by this moment.
> */
> smp_wmb();
> task_thread_info(p)->cpu = cpu;
> p->wake_cpu = cpu;
> #endif
>
> which makes me worry about just setting the thread_info->cpu value.
> That set_task_rq() initializes various group scheduling things, an
> dthat whole "wake_cpu" thing seems relevant too.
Yeah, I would definitely like the scheduler guys to weigh in on this,
especially considering how difficult it can be to hit.
Anton
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists