From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: kernel test robot <oliver.sang@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
oe-lkp@lists.linux.dev, lkp@intel.com,
linux-kernel@vger.kernel.org,
"Paul E. McKenney" <paulmck@kernel.org>,
rcu@vger.kernel.org
Subject: Re: [linus:master] [sched, x86] 476e8583ca: WARNING:at_kernel/rcu/update.c:#torture_sched_setaffinity
Date: Tue, 26 Nov 2024 15:30:24 +0100 [thread overview]
Message-ID: <20241126143024.EKo6QfKL@linutronix.de> (raw)
In-Reply-To: <202411252253.e39d77c6-lkp@intel.com>
On 2024-11-25 22:29:09 [+0800], kernel test robot wrote:
> Hello,
Hi,
> by this commit, we see the config has below diff:
>
> --- /pkg/linux/x86_64-randconfig-161-20241120/gcc-12/35772d627b55cc7fb4f33bae57c564a25b3121a9/.config 2024-11-22 17:03:32.458344665 +0800
> +++ /pkg/linux/x86_64-randconfig-161-20241120/gcc-12/476e8583ca16eecec0a3a28b6ee7130f4e369389/.config 2024-11-22 17:02:59.440805587 +0800
> @@ -121,9 +121,11 @@ CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
> # end of BPF subsystem
>
> CONFIG_PREEMPT_BUILD=y
> -CONFIG_PREEMPT_NONE=y
> +CONFIG_ARCH_HAS_PREEMPT_LAZY=y
> +# CONFIG_PREEMPT_NONE is not set
> # CONFIG_PREEMPT_VOLUNTARY is not set
> # CONFIG_PREEMPT is not set
> +CONFIG_PREEMPT_LAZY=y
> # CONFIG_PREEMPT_RT is not set
> CONFIG_PREEMPT_COUNT=y
> CONFIG_PREEMPTION=y
>
…
> commit: 476e8583ca16eecec0a3a28b6ee7130f4e369389 ("sched, x86: Enable Lazy preemption")
…
> runtime: 300s
> test: cpuhotplug
> torture_type: trivial
…
> [ 150.797530][ T445] ------------[ cut here ]------------
> [ 150.797915][ T445] torture_sched_setaffinity: sched_setaffinity(445) returned -22
> [ 150.798353][ T445] WARNING: CPU: 0 PID: 445 at kernel/rcu/update.c:535 torture_sched_setaffinity (kernel/rcu/update.c:535 (discriminator 3))
I've been staring at this, and this is actually fine. Your config changes
from CONFIG_PREEMPT_NONE to CONFIG_PREEMPT_LAZY which implies
CONFIG_PREEMPTION. The trivial RCU test there does sched_setaffinity()
while preemption is enabled and CPU-hotplug runs in the background. So
you get what you expect either by an attempt to move to a CPU which is
no longer valid or by getting migrated to another CPU in the middle of
your operation.
This is all fine. You need to update your config file or your test.
Sebastian
next prev parent reply other threads:[~2024-11-26 14:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 14:29 [linus:master] [sched, x86] 476e8583ca: WARNING:at_kernel/rcu/update.c:#torture_sched_setaffinity kernel test robot
2024-11-26 14:30 ` Sebastian Andrzej Siewior [this message]
2024-11-26 16:17 ` Paul E. McKenney
2024-12-03 6:03 ` Oliver Sang
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=20241126143024.EKo6QfKL@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-lkp@lists.linux.dev \
--cc=oliver.sang@intel.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox