linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Lance Yang <ioworker0@gmail.com>
To: David Hildenbrand <david@redhat.com>
Cc: ziy@nvidia.com, 21cnbao@gmail.com, akpm@linux-foundation.org,
	 fengwei.yin@intel.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org,  maskray@google.com, mhocko@suse.com,
	minchan@kernel.org, peterx@redhat.com,  ryan.roberts@arm.com,
	shy828301@gmail.com, songmuchun@bytedance.com,
	 wangkefeng.wang@huawei.com, willy@infradead.org,
	xiehuan09@gmail.com,  zokeefe@google.com
Subject: Re: [PATCH v2 1/1] mm/vmscan: avoid split PMD-mapped THP during shrink_folio_list()
Date: Thu, 25 Apr 2024 20:00:23 +0800	[thread overview]
Message-ID: <CAK1f24njK_=FFTZyCCcZYPosop=WU8WGZHZRtPOk6zJDp2SdCQ@mail.gmail.com> (raw)
In-Reply-To: <e75b509a-bf4f-418c-a921-cf3383fc5929@redhat.com>

On Thu, Apr 25, 2024 at 5:25 PM David Hildenbrand <david@redhat.com> wrote:
>
> >> I was wondering if we can better integrate that into the pagewalk below.
> >>
> >> That is, don't do the TTU_SPLIT_HUGE_PMD immediately. Start the pagewalk
> >> first. If we walk a PMD, try to unmap it. Only if that fails, split it.
> >
> > Nice. Thanks for the suggestion!
> > I'll work on integrating it into the pagewalk as you suggested.
> >
> >>
> >> Less working on "vma + address" and instead directly on PMDs.
> >
> > Yes, some of the work on "vma + address" can be avoided :)
>
> Doing the conditional split while in the pagewalk will be the
> interesting bit to sort out (we temporarily have to drop the PTL and
> start once again from that now-PTE-mapped page table). But it should be
> a reasonable thing to have.

Yep, it's an interesting challenge for me, but definitely worth tackling ;)

>
> Please let us know if you run into bigger issues with that!

Thanks, I'll do my best to sort it out and reach out for help if needed :p

>
> See walk_pmd_range() as an inspiration where we call split_huge_pmd().

Thanks for your suggestion! I'll take a closer look at it.

Thanks again for clarifying!
Lance

>
> --
> Cheers,
>
> David / dhildenb
>


  reply	other threads:[~2024-04-25 12:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22  5:52 Lance Yang
2024-04-24  4:15 ` Matthew Wilcox
2024-04-24  7:17   ` David Hildenbrand
2024-04-24 15:57     ` Zi Yan
2024-04-24 15:58       ` David Hildenbrand
2024-04-25  4:17         ` Lance Yang
2024-04-25  8:50           ` Lance Yang
2024-04-25  9:01             ` David Hildenbrand
2024-04-25  9:21               ` Lance Yang
2024-04-25  9:25                 ` David Hildenbrand
2024-04-25 12:00                   ` Lance Yang [this message]
2024-04-24 15:46   ` Lance Yang
2024-04-24 21:20     ` Andrew Morton
2024-04-25  4:19       ` Lance Yang

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='CAK1f24njK_=FFTZyCCcZYPosop=WU8WGZHZRtPOk6zJDp2SdCQ@mail.gmail.com' \
    --to=ioworker0@gmail.com \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=fengwei.yin@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maskray@google.com \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=peterx@redhat.com \
    --cc=ryan.roberts@arm.com \
    --cc=shy828301@gmail.com \
    --cc=songmuchun@bytedance.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=willy@infradead.org \
    --cc=xiehuan09@gmail.com \
    --cc=ziy@nvidia.com \
    --cc=zokeefe@google.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