From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Warning in worker_enter_idle()
Date: Mon, 7 May 2012 13:55:16 -0700 [thread overview]
Message-ID: <20120507205516.GD21152@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120507194042.GG19417@google.com>
On Mon, May 07, 2012 at 12:40:42PM -0700, Tejun Heo wrote:
> Hello, Paul.
>
> On Sun, May 06, 2012 at 08:38:14AM -0700, Paul E. McKenney wrote:
> > Hello!
> >
> > The worker_enter_idle() is complaining that there all workers are idle,
> > but that there is work remaining:
> >
> > /* sanity check nr_running */
> > WARN_ON_ONCE(gcwq->nr_workers == gcwq->nr_idle &&
> > atomic_read(get_gcwq_nr_running(gcwq->cpu)));
> >
> > This is running on Power, .config attached. I must confess that I don't
> > see any sort of synchronization or memory barriers that would keep the
> > counts straight on a weakly ordered system. Or is there some clever
> > design constraint that prevents worker_enter_idle() from accessing other
> > CPUs' gcwq_nr_running variables?
>
> Workers are tied to global cpu workqueues (gcwqs). There's one gcwq
> per cpu and one unbound one, so yeah, workers access these counters
> under gcwq->lock. Atomic accesses to nr_running is depended on only
> while nr_idle is adjusted under gcwq->lock, so there shouldn't be a
> discrepancy there. Can you reproduce the problem? What was going on
> the system? Was CPU being brought up or down?
I was running rcutorture with CPU hotplug operations. It has happened
a couple of times on the .config that I attached, but never under any
of the other 13 .configs that I run.
Thanx, Paul
next prev parent reply other threads:[~2012-05-07 21:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-06 15:38 Warning in worker_enter_idle() Paul E. McKenney
2012-05-07 19:40 ` Tejun Heo
2012-05-07 20:55 ` Paul E. McKenney [this message]
2012-05-07 21:34 ` Tejun Heo
2012-05-14 22:12 ` [PATCH] workqueue: skip nr_running sanity check in worker_enter_idle() if trustee is active Tejun Heo
2012-05-14 22:41 ` Paul E. McKenney
2012-05-17 0:15 ` Paul E. McKenney
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=20120507205516.GD21152@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox