From: Tejun Heo <tj@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Prarit Bhargava <prarit@redhat.com>,
linux-edac@vger.kernel.org,
Doug Thompson <dougthompson@xmission.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] edac, poll timeout cannot be zero
Date: Wed, 12 Feb 2014 10:16:57 -0500 [thread overview]
Message-ID: <20140212151657.GL24490@htj.dyndns.org> (raw)
In-Reply-To: <20140212150748.GE5121@pd.tnic>
Hello,
On Wed, Feb 12, 2014 at 04:07:48PM +0100, Borislav Petkov wrote:
> While testing, however, I keep seeing the splat below and that's:
>
> if (WARN_ON(!list_empty(&work->entry))) {
> spin_unlock(&pwq->pool->lock);
> return;
> }
>
> and there seems to be some interference with edac_mc_workq_setup()
> which does mod_delayed_work() and then the workqueue callback
> edac_mc_workq_function() which does queue_delayed_work().
>
> What I'm seeing in the splat is that when the timer fires to run the
> delayed work, __queue_work() complains that the work list is not empty
> even though we've done mod_delayed_work() which is supposed to cancel
> any pending work.
>
> Tejun, any ideas what's happening? Do we need synchronization here or do
> you have a _sync version of mod_delayed_work() which makes sure any work
> is cancelled?
No, you don't need to. All workqueue operations should be able to
synchronize with each other.
> Or does this mean that once the work is getting queued from the timer
> callback delayed_work_timer_fn, it cannot be cancelled anymore? Or
> something else I'm missing...?
Looking at edac_mc_workq_setup().... it contains INIT_DELAYED_WORK().
Does this race with other workqueue operations on the work item? If
so, it of course breaks. It's like doing spin_lock_init() while other
spinlock operations are in progress.
Thanks.
--
tejun
next prev parent reply other threads:[~2014-02-12 15:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 20:05 [PATCH] edac, poll timeout cannot be zero Prarit Bhargava
2014-02-12 15:07 ` Borislav Petkov
2014-02-12 15:16 ` Tejun Heo [this message]
2014-02-12 15:57 ` Borislav Petkov
2014-02-12 16:23 ` Tejun Heo
2014-02-12 16:36 ` Borislav Petkov
2014-02-12 17:22 ` [PATCH] EDAC: Correct workqueue setup path Borislav Petkov
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=20140212151657.GL24490@htj.dyndns.org \
--to=tj@kernel.org \
--cc=bp@alien8.de \
--cc=dougthompson@xmission.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prarit@redhat.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