lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK1f24njK_=FFTZyCCcZYPosop=WU8WGZHZRtPOk6zJDp2SdCQ@mail.gmail.com>
Date: Thu, 25 Apr 2024 20:00:23 +0800
From: Lance Yang <ioworker0@...il.com>
To: David Hildenbrand <david@...hat.com>
Cc: ziy@...dia.com, 21cnbao@...il.com, akpm@...ux-foundation.org, 
	fengwei.yin@...el.com, linux-kernel@...r.kernel.org, linux-mm@...ck.org, 
	maskray@...gle.com, mhocko@...e.com, minchan@...nel.org, peterx@...hat.com, 
	ryan.roberts@....com, shy828301@...il.com, songmuchun@...edance.com, 
	wangkefeng.wang@...wei.com, willy@...radead.org, xiehuan09@...il.com, 
	zokeefe@...gle.com
Subject: Re: [PATCH v2 1/1] mm/vmscan: avoid split PMD-mapped THP during shrink_folio_list()

On Thu, Apr 25, 2024 at 5:25 PM David Hildenbrand <david@...hat.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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ