mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	RT <linux-rt-users@vger.kernel.org>,
	Clark Williams <clark@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: workqueue code needing preemption disabled
Date: Mon, 18 Mar 2013 11:21:30 -0700	[thread overview]
Message-ID: <20130318182130.GA3042@htj.dyndns.org> (raw)
In-Reply-To: <1363626487.25967.186.camel@gandalf.local.home>

On Mon, Mar 18, 2013 at 01:08:07PM -0400, Steven Rostedt wrote:
> On Mon, 2013-03-18 at 09:43 -0700, Tejun Heo wrote:
> 
> > Making gcwq locks disable preemption would be much safer / easier, but
> > if that's not desirable, anything touching gcwq->idle_list would be a
> > good place to start - worker_enter_idle() and worker_leave_idle().
> > Hmmm... ignoring CPU hotplug, I think those two might just do it.
> > Give it a try?  How reproducible is the problem?
> 
> Not very :-( I triggered it twice on a 40 CPU box. It can go
> approximately 1 month before it triggers. And the box we are testing on
> is currently a loaner, and we have it on extension right now. Which
> means we wont have it much longer.
> 
> But perhaps that's the place to fix things.

I've been thinking about it and AFAICS the only way that BUG_ON()
could trigger from preemption is if preemption happens while the
idle_list head is becoming or stopping being empty.
ie. pool->worklist is half updated so list_empty() isn't true but the
first next entry is already pointing back to itself.  If there's a
crashdump, it shouldn't be too difficult to verify and wrapping the
above two functions should resolve it.

Thanks.

-- 
tejun

  reply	other threads:[~2013-03-18 18:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18 14:36 Steven Rostedt
2013-03-18 16:06 ` Tejun Heo
2013-03-18 16:23   ` Steven Rostedt
2013-03-18 16:27     ` Steven Rostedt
2013-03-18 16:30       ` Steven Rostedt
2013-03-18 16:43         ` Tejun Heo
2013-03-18 17:08           ` Steven Rostedt
2013-03-18 18:21             ` Tejun Heo [this message]
2013-03-18 18:57               ` Steven Rostedt
2013-03-18 19:06                 ` Tejun Heo
2013-03-18 19:19                   ` Steven Rostedt
2013-03-18 18:23           ` Steven Rostedt
2013-03-18 18:26             ` Tejun Heo
2013-03-18 18:35               ` Steven Rostedt
2013-03-18 16:27     ` Tejun Heo
2013-03-18 16:41       ` Steven Rostedt
2013-03-18 16:46         ` Tejun Heo

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=20130318182130.GA3042@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=clark@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®