From: Anton Blanchard <anton@samba.org>
To: lkp@lists.01.org
Subject: Re: [PATCH] kthread: kthread_bind fails to enforce CPU affinity (fixes kernel BUG at kernel/smpboot.c:134!)
Date: Mon, 08 Dec 2014 15:46:38 +1100 [thread overview]
Message-ID: <20141208154638.37c1ec18@kryten> (raw)
In-Reply-To: <CA+55aFw6gMN5VxONPo9xtJA_+p2iLArSaK-m_4vDL+L07Z6vuA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 841 bytes --]
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
WARNING: multiple messages have this Message-ID (diff)
From: Anton Blanchard <anton@samba.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: yuyang.du@intel.com, Brian Norris <computersforpeace@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
Paul Turner <pjt@google.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Yuanhan Liu <yuanhan.liu@linux.intel.com>,
Steven Rostedt <rostedt@goodmis.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Benjamin Segall <bsegall@google.com>,
ppc-dev <linuxppc-dev@lists.ozlabs.org>,
Ingo Molnar <mingo@redhat.com>,
sp@datera.io, Daniel J Blueman <daniel@numascale.com>,
Tejun Heo <tj@kernel.org>,
subbaram@codeaurora.org,
Andrew Morton <akpm@linux-foundation.org>,
Wu Fengguang <fengguang.wu@intel.com>,
lkp@01.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] kthread: kthread_bind fails to enforce CPU affinity (fixes kernel BUG at kernel/smpboot.c:134!)
Date: Mon, 8 Dec 2014 15:46:38 +1100 [thread overview]
Message-ID: <20141208154638.37c1ec18@kryten> (raw)
In-Reply-To: <CA+55aFw6gMN5VxONPo9xtJA_+p2iLArSaK-m_4vDL+L07Z6vuA@mail.gmail.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: Anton Blanchard <anton@samba.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>, Tejun Heo <tj@kernel.org>,
Wu Fengguang <fengguang.wu@intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
yuyang.du@intel.com, lkp@01.org,
Yuanhan Liu <yuanhan.liu@linux.intel.com>,
Paul Turner <pjt@google.com>,
Benjamin Segall <bsegall@google.com>,
Daniel J Blueman <daniel@numascale.com>,
subbaram@codeaurora.org,
Brian Norris <computersforpeace@gmail.com>,
sp@datera.io,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
ppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] kthread: kthread_bind fails to enforce CPU affinity (fixes kernel BUG at kernel/smpboot.c:134!)
Date: Mon, 8 Dec 2014 15:46:38 +1100 [thread overview]
Message-ID: <20141208154638.37c1ec18@kryten> (raw)
In-Reply-To: <CA+55aFw6gMN5VxONPo9xtJA_+p2iLArSaK-m_4vDL+L07Z6vuA@mail.gmail.com>
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
next prev parent reply other threads:[~2014-12-08 4:46 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-08 3:27 [PATCH] kthread: kthread_bind fails to enforce CPU affinity (fixes kernel BUG at kernel/smpboot.c:134!) Anton Blanchard
2014-12-08 3:27 ` Anton Blanchard
2014-12-08 3:27 ` Anton Blanchard
2014-12-08 4:28 ` Linus Torvalds
2014-12-08 4:28 ` Linus Torvalds
2014-12-08 4:28 ` Linus Torvalds
2014-12-08 4:46 ` Anton Blanchard [this message]
2014-12-08 4:46 ` Anton Blanchard
2014-12-08 4:46 ` Anton Blanchard
2014-12-08 8:34 ` Ingo Molnar
2014-12-08 8:34 ` Ingo Molnar
2014-12-08 8:34 ` Ingo Molnar
2014-12-08 10:18 ` Anton Blanchard
2014-12-08 10:18 ` Anton Blanchard
2014-12-08 10:18 ` Anton Blanchard
2014-12-08 23:58 ` [PATCH] powerpc: secondary CPUs signal to master before setting active and online " Anton Blanchard
2014-12-08 23:58 ` Anton Blanchard
2014-12-08 23:58 ` Anton Blanchard
2014-12-09 20:54 ` Linus Torvalds
2014-12-09 20:54 ` Linus Torvalds
2014-12-09 20:54 ` Linus Torvalds
2014-12-10 14:08 ` Thomas Gleixner
2014-12-10 14:08 ` Thomas Gleixner
2014-12-10 14:08 ` Thomas Gleixner
2014-12-10 23:06 ` Michael Ellerman
2014-12-10 23:06 ` Michael Ellerman
2014-12-10 23:06 ` Michael Ellerman
2014-12-08 13:54 ` [PATCH] kthread: kthread_bind fails to enforce CPU affinity " Steven Rostedt
2014-12-08 13:54 ` Steven Rostedt
2014-12-08 13:54 ` Steven Rostedt
2014-12-09 2:24 ` Lai Jiangshan
2014-12-09 2:24 ` Lai Jiangshan
2014-12-09 2:24 ` Lai Jiangshan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141208154638.37c1ec18@kryten \
--to=anton@samba.org \
--cc=lkp@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.