linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yang Shi <shy828301@gmail.com>
To: Aaron Lu <aaron.lu@intel.com>
Cc: Yin Fengwei <fengwei.yin@intel.com>,
	linux-mm@kvack.org, naoya.horiguchi@nec.com,
	 linmiaohe@huawei.com, willy@infradead.org, tony.luck@intel.com,
	 qiuxu.zhuo@intel.com
Subject: Re: [PATCH v2] mm: release private data before split THP
Date: Tue, 9 Aug 2022 09:45:59 -0700	[thread overview]
Message-ID: <CAHbLzkp0hTfWGyjFgns3gV0jwLoUUUT86osVWbyT8Co-98c5cw@mail.gmail.com> (raw)
In-Reply-To: <YvIkBnYDO5v2buu3@ziqianlu-Dell-Optiplex7000>

On Tue, Aug 9, 2022 at 2:08 AM Aaron Lu <aaron.lu@intel.com> wrote:
>
> On Tue, Aug 09, 2022 at 09:12:57AM +0800, Yin Fengwei wrote:
> > Hi Yang,
> >
> > On 2022/8/9 01:49, Yang Shi wrote:
> > > The GFP_KERNEL is fine for most THP split callsites except for the
> > > memory reclaim path since it might not allow certain flags to avoid
> > > recursion, for example, nested reclaim, issue I/O, etc. The most
> > > filesystems clear __GFP_FS. However it should not be a real life
> > > problem now since AFAIK just xfs supports large folios for now and xfs
> > > uses iomap release_folio() method which actually ignores gfp flags.
> > Thanks a lot for the valuable comments.
> >
> >
> > >
> > > So it sounds safer to follow the gfp convention used by
> > > xas_split_alloc() in the below. The best way is to pass in the gfp
> > > flag from the reclaimer IMO, but it seems overkilling at the moment.
> >
> > It's possible that the gfp used by xas_split_alloc has __GFP_FS/IO set.
> > What about to use current_gfp_context(gfp_as_xas_split_alloc)?
> >
>
> Sounds reasonable to me.
>
> Also, the gfp used by xas_split_alloc() should also be modified to:
> current_gfp_context(mapping_gfp_mask(mapping) & GFP_RECLAIM_MASK)?
> Since they are in the same context.

Good point, fine to me.


  reply	other threads:[~2022-08-09 16:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05  6:28 Yin Fengwei
2022-08-08 17:49 ` Yang Shi
2022-08-09  1:12   ` Yin Fengwei
2022-08-09  9:08     ` Aaron Lu
2022-08-09 16:45       ` Yang Shi [this message]
2022-08-09 23:55         ` Yin Fengwei

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=CAHbLzkp0hTfWGyjFgns3gV0jwLoUUUT86osVWbyT8Co-98c5cw@mail.gmail.com \
    --to=shy828301@gmail.com \
    --cc=aaron.lu@intel.com \
    --cc=fengwei.yin@intel.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-mm@kvack.org \
    --cc=naoya.horiguchi@nec.com \
    --cc=qiuxu.zhuo@intel.com \
    --cc=tony.luck@intel.com \
    --cc=willy@infradead.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