From: Tejun Heo <tj@kernel.org>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Warning in worker_enter_idle()
Date: Mon, 7 May 2012 12:40:42 -0700 [thread overview]
Message-ID: <20120507194042.GG19417@google.com> (raw)
In-Reply-To: <20120506153814.GA25681@linux.vnet.ibm.com>
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?
Thanks.
--
tejun
next prev parent reply other threads:[~2012-05-07 19:40 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 [this message]
2012-05-07 20:55 ` Paul E. McKenney
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=20120507194042.GG19417@google.com \
--to=tj@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
/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