All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>, "Rafael J. Wysocki" <rjw@sisk.pl>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] workqueue: relax lockdep annotation on flush_work()
Date: Mon, 03 Jan 2011 10:31:31 +0100	[thread overview]
Message-ID: <1294047091.2016.38.camel@laptop> (raw)
In-Reply-To: <20101229125711.GL488@htj.dyndns.org>

On Wed, 2010-12-29 at 13:57 +0100, Tejun Heo wrote:
> Currently, the lockdep annotation in flush_work() requires exclusive
> access on the workqueue the target work is queued on and triggers
> warning if a work is trying to flush another work on the same
> workqueue; however, this is no longer true as workqueues can now
> execute multiple works concurrently.
> 
> This patch adds lock_map_acquire_read() and make process_one_work()
> hold read access to the workqueue while executing a work and
> start_flush_work() check for write access if concurrnecy level is one
> and read access if higher.
> 
> This better represents what's going on and removes spurious lockdep
> warnings which are triggered by fake dependency chain created through
> flush_work().

Is this still true in the low memory situation where we're running the
emergency thread? I can imagine the emergency thread trying to flush
itself isn't really a good thing.

  parent reply	other threads:[~2011-01-03  9:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-29 12:57 [PATCH] workqueue: relax lockdep annotation on flush_work() Tejun Heo
2010-12-29 14:20 ` Rafael J. Wysocki
2011-01-03  9:31 ` Peter Zijlstra [this message]
2011-01-03 14:17   ` [PATCH UPDATED] " Tejun Heo
2011-01-03 14:54     ` Peter Zijlstra
2011-01-03 15:00       ` Tejun Heo
2011-01-03 15:14         ` Peter Zijlstra
2011-01-03 15:20           ` Tejun Heo
2011-01-03 15:29             ` Peter Zijlstra
2011-01-03 21:25             ` Rafael J. Wysocki
2011-01-09 22:34               ` 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=1294047091.2016.38.camel@laptop \
    --to=peterz@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rjw@sisk.pl \
    --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.