All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Tejun Heo <tj@kernel.org>
Cc: jiangshanlai@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: WARN_ON_ONCE() in process_one_work()?
Date: Tue, 3 Jul 2018 14:44:18 -0700	[thread overview]
Message-ID: <20180703214418.GF3593@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180703201205.GA72677@devbig577.frc2.facebook.com>

On Tue, Jul 03, 2018 at 01:12:05PM -0700, Tejun Heo wrote:
> Hello, Paul.
> 
> On Tue, Jul 03, 2018 at 09:40:44AM -0700, Paul E. McKenney wrote:
> > > I will apply this, but be advised that I have not seen that WARN_ON_ONCE()
> > > trigger since.  :-/
> > 
> > But I get a build error:
> > 
> > kernel/workqueue.o: In function `worker_attach_to_pool':
> > workqueue.c:(.text+0x63c): undefined reference to `cpuhp_target_state'
> > workqueue.c:(.text+0x647): undefined reference to `cpuhp_current_state'
> > /home/paulmck/public_git/linux-rcu/Makefile:1015: recipe for target 'vmlinux' failed
> > 
> > My guess is that the worker_attach_to_pool() code needs to change so
> > as to invoke cpuhp_current_state() and cpuhp_target_state() only in
> > CONFIG_HOTPLUG_CPU=y kernels, but I figured I should defer to you.
> 
> Just to clarify, the bug happened on a kernel with cpuhp enabled,
> right?

It seems to be a bit more complicated than that, despite my initial
confidence that I knew what was going on.  The build failed for these
rcutorture scenarios:

SRCU-N: (No idea!)

	CONFIG_RCU_TRACE=n
	CONFIG_SMP=y
	CONFIG_NR_CPUS=4
	CONFIG_HOTPLUG_CPU=y
	CONFIG_PREEMPT_NONE=y
	CONFIG_PREEMPT_VOLUNTARY=n
	CONFIG_PREEMPT=n

SRCU-t:  (Expected, CONFIG_SMP=n)
SRCU-u:  (Expected, CONFIG_SMP=n)
TASKS02:  (Expected, CONFIG_SMP=n)
TASKS03:  (Expected, CONFIG_HOTPLUG_CPU=n)
TINY01:  (Expected, CONFIG_SMP=n)
TINY02:  (Expected, CONFIG_SMP=n)
TREE01:  (No idea!)

	CONFIG_SMP=y
	CONFIG_PREEMPT_NONE=n
	CONFIG_PREEMPT_VOLUNTARY=n
	CONFIG_PREEMPT=y
	CONFIG_HZ_PERIODIC=n
	CONFIG_NO_HZ_IDLE=y
	CONFIG_NO_HZ_FULL=n
	CONFIG_RCU_FAST_NO_HZ=y
	CONFIG_RCU_TRACE=y
	CONFIG_HOTPLUG_CPU=y
	CONFIG_MAXSMP=y
	CONFIG_CPUMASK_OFFSTACK=y
	CONFIG_RCU_NOCB_CPU=y
	CONFIG_DEBUG_LOCK_ALLOC=n
	CONFIG_RCU_BOOST=n
	CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
	CONFIG_RCU_EXPERT=y

TREE02 didn't fail despite having CONFIG_HOTPLUG_CPU=n!
TREE03:  (Expected, CONFIG_HOTPLUG_CPU=n)
TREE04:  (Expected, CONFIG_HOTPLUG_CPU=n)

TREE07:  (No idea!)

	CONFIG_NR_CPUS=16
	CONFIG_PREEMPT_NONE=y
	CONFIG_PREEMPT_VOLUNTARY=n
	CONFIG_PREEMPT=n
	CONFIG_HZ_PERIODIC=n
	CONFIG_NO_HZ_IDLE=n
	CONFIG_NO_HZ_FULL=y
	CONFIG_RCU_FAST_NO_HZ=n
	CONFIG_RCU_TRACE=y
	CONFIG_HOTPLUG_CPU=y
	CONFIG_RCU_FANOUT=2
	CONFIG_RCU_FANOUT_LEAF=2
	CONFIG_DEBUG_LOCK_ALLOC=n
	CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
	CONFIG_RCU_EXPERT=y

TREE08:  (Expected, CONFIG_HOTPLUG_CPU=n)
TREE09:  (Expected, CONFIG_SMP=n)

Thoughts?

							Thanx, Paul


  reply	other threads:[~2018-07-03 21:42 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 19:29 WARN_ON_ONCE() in process_one_work()? Paul E. McKenney
2018-07-02 21:05 ` Tejun Heo
2018-07-03  4:05   ` Paul E. McKenney
2018-07-03 16:40     ` Paul E. McKenney
2018-07-03 20:12       ` Tejun Heo
2018-07-03 21:44         ` Paul E. McKenney [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-05-01 16:57 Paul E. McKenney
2017-05-01 18:38 ` Paul E. McKenney
2017-05-01 18:44   ` Tejun Heo
2017-05-01 18:58     ` Paul E. McKenney
2017-05-05 17:11       ` Paul E. McKenney
2017-06-13 20:58         ` Tejun Heo
2017-06-13 22:31           ` Paul E. McKenney
2017-06-14 15:15             ` Paul E. McKenney
2017-06-15 15:38               ` Paul E. McKenney
2017-06-16 17:36                 ` Paul E. McKenney
2017-06-17 11:53                   ` Tejun Heo
2017-06-17 17:31                     ` Paul E. McKenney
2017-06-18 10:40                       ` Tejun Heo
2017-06-20 16:45                         ` Paul E. McKenney
2017-06-21 15:30                           ` Paul E. McKenney
2017-06-23 16:41                             ` Paul E. McKenney
2017-06-27 16:27                               ` Paul E. McKenney
2017-05-01 18:42 ` Tejun Heo
2017-05-01 19:42   ` Steven Rostedt
2017-05-01 19:50     ` Tejun Heo
2017-05-01 20:02       ` Steven Rostedt

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=20180703214418.GF3593@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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 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.