From: Dave Chinner <david@fromorbit.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>,
lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org,
linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>,
Rik van Riel <riel@surriel.com>
Subject: Re: [LSF/MM TOPIC] few MM topics
Date: Thu, 1 Feb 2018 10:41:26 +1100 [thread overview]
Message-ID: <20180131234126.oobqdp6ibcayduu3@destitution> (raw)
In-Reply-To: <20180131202438.GA21609@dhcp22.suse.cz>
On Wed, Jan 31, 2018 at 09:24:38PM +0100, Michal Hocko wrote:
> On Wed 31-01-18 11:21:04, Darrick J. Wong wrote:
> > On Wed, Jan 24, 2018 at 10:26:49AM +0100, Michal Hocko wrote:
> [...]
> > > - I would also love to talk to some FS people and convince them to move
> > > away from GFP_NOFS in favor of the new scope API. I know this just
> > > means to send patches but the existing code is quite complex and it
> > > really requires somebody familiar with the specific FS to do that
> > > work.
> >
> > Hm, are you talking about setting PF_MEMALLOC_NOFS instead of passing
> > *_NOFS to allocation functions and whatnot?
>
> yes memalloc_nofs_{save,restore}
>
> > Right now XFS will set it
> > on any thread which has a transaction open, but that doesn't help for
> > fs operations that don't have transactions (e.g. reading metadata,
> > opening files). I suppose we could just set the flag any time someone
> > stumbles into the fs code from userspace, though you're right that seems
> > daunting.
>
> I would really love to see the code to take the nofs scope
> (memalloc_nofs_save) at the point where the FS "critical" section starts
> (from the reclaim recursion POV).
We already do that - the transaction context in XFS is the critical
context, and we set PF_MEMALLOC_NOFS when we allocate a transaction
handle and remove it when we commit the transaction.
> This would both document the context
> and also limit NOFS allocations to bare minumum.
Yup, most of XFS already uses implicit GFP_NOFS allocation calls via
the transaction context process flag manipulation.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2018-01-31 23:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-24 9:26 [LSF/MM TOPIC] few MM topics Michal Hocko
2018-01-24 18:23 ` Mike Kravetz
2018-01-25 10:02 ` Michal Hocko
2018-01-25 9:37 ` Jan Kara
2018-01-31 19:21 ` Darrick J. Wong
2018-01-31 20:24 ` Michal Hocko
2018-01-31 23:41 ` Dave Chinner [this message]
2018-02-01 15:46 ` [Lsf-pc] " Michal Hocko
2018-02-01 22:47 ` Dave Chinner
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=20180131234126.oobqdp6ibcayduu3@destitution \
--to=david@fromorbit.com \
--cc=darrick.wong@oracle.com \
--cc=hannes@cmpxchg.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvme@lists.infradead.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=mhocko@kernel.org \
--cc=riel@surriel.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;
as well as URLs for NNTP newsgroup(s).