lkml.org 
[lkml]   [2018]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] lockdep: fix fs_reclaim annotation
On Tue, Apr 24, 2018 at 03:58:34PM -0700, Omar Sandoval wrote:
> 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?

It's all mm/ code now... so I guess Andrew would be the one routing it.

\
 
 \ /
  Last update: 2018-04-25 09:10    [W:0.049 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site