From: Omar Sandoval <osandov@osandov.com>
To: Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
Ingo Molnar <mingo@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
kernel-team@fb.com
Subject: Re: [PATCH] lockdep: fix fs_reclaim annotation
Date: Tue, 24 Apr 2018 15:58:34 -0700 [thread overview]
Message-ID: <20180424225834.GB28295@vader> (raw)
In-Reply-To: <20180420081742.GC4064@hirez.programming.kicks-ass.net>
On Fri, Apr 20, 2018 at 10:17:42AM +0200, Peter Zijlstra wrote:
> On Sun, Apr 15, 2018 at 12:42:25AM -0700, Omar Sandoval wrote:
> > From: Omar Sandoval <osandov@fb.com>
> >
> > While revisiting my Btrfs swapfile series [1], I introduced a situation
> > in which reclaim would lock i_rwsem, and even though the swapon() path
> > clearly made GFP_KERNEL allocations while holding i_rwsem, I got no
> > complaints from lockdep. It turns out that the rework of the fs_reclaim
> > annotation was broken: if the current task has PF_MEMALLOC set, we don't
> > acquire the dummy fs_reclaim lock, but when reclaiming we always check
> > this _after_ we've just set the PF_MEMALLOC flag. In most cases, we can
> > fix this by moving the fs_reclaim_{acquire,release}() outside of the
> > memalloc_noreclaim_{save,restore}(), althought kswapd is slightly
> > different. After applying this, I got the expected lockdep splats.
> >
> > 1: https://lwn.net/Articles/625412/
> > Fixes: d92a8cfcb37e ("locking/lockdep: Rework FS_RECLAIM annotation")
> > Signed-off-by: Omar Sandoval <osandov@fb.com>
>
> Urgh, thanks for fixing that!
Is this going to go through the tip tree? Should Andrew take it?
next prev parent reply other threads:[~2018-04-24 22:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-15 7:42 [PATCH] lockdep: fix fs_reclaim annotation Omar Sandoval
2018-04-20 8:17 ` Peter Zijlstra
2018-04-24 22:58 ` Omar Sandoval [this message]
2018-04-25 7:09 ` Peter Zijlstra
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=20180424225834.GB28295@vader \
--to=osandov@osandov.com \
--cc=akpm@linux-foundation.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.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