linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Michal Hocko <mhocko@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Dave Chinner <david@fromorbit.com>
Subject: Re: implicit AOP_FLAG_NOFS for grab_cache_page_write_begin
Date: Fri, 17 Apr 2020 01:06:15 -0700	[thread overview]
Message-ID: <20200417080615.GA26880@infradead.org> (raw)
In-Reply-To: <20200417080003.GH26707@dhcp22.suse.cz>

On Fri, Apr 17, 2020 at 10:00:03AM +0200, Michal Hocko wrote:
> > commit aea1b9532143218f8599ecedbbd6bfbf812385e1
> > Author: Dave Chinner <dchinner@redhat.com>
> > Date:   Tue Jul 20 17:54:12 2010 +1000
> > 
> >     xfs: use GFP_NOFS for page cache allocation
> > 
> >     Avoid a lockdep warning by preventing page cache allocation from
> >     recursing back into the filesystem during memory reclaim.
> 
> Thanks for digging this up! The changelog is not really clear whether
> NOFS is to avoid false possitive lockup warnings or real ones. If the
> former then we have grown __GFP_NOLOCKDEP flag to workaround the problem
> if the later then can we use memalloc_nofs_{save,restore} in the xfs
> specific code please?

As far as I can tell we are never in a file system transaction in XFS
when allocating page cache pages.  We do, however usually have i_rwsem
locked (or back in the day the XFS-specific predecessor).  I'm not
sure what the current issues are, but maybe Dave remembers.  In doubt
we should try removing the flag and run heavy stress testing with
lockdep enabled and see if it screams.


      reply	other threads:[~2020-04-17  8:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15  7:02 implicit AOP_FLAG_NOFS for grab_cache_page_write_begin Michal Hocko
2020-04-17  7:29 ` Christoph Hellwig
2020-04-17  8:00   ` Michal Hocko
2020-04-17  8:06     ` Christoph Hellwig [this message]

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=20200417080615.GA26880@infradead.org \
    --to=hch@infradead.org \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).