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: <CAK1f24mN2jTuhhAq-KAZczdp9OPf90b5JRNiyszWNRt+n0aK=g@mail.gmail.com>
Date: Wed, 28 Feb 2024 09:46:21 +0800
From: Lance Yang <ioworker0@...il.com>
To: Barry Song <21cnbao@...il.com>
Cc: Christoph Hellwig <hch@...radead.org>, akpm@...ux-foundation.org, linux-mm@...ck.org, 
	linux-kernel@...r.kernel.org, Barry Song <v-songbaohua@...o.com>, 
	Ryan Roberts <ryan.roberts@....com>, David Hildenbrand <david@...hat.com>, 
	Yin Fengwei <fengwei.yin@...el.com>
Subject: Re: [PATCH] mm: export folio_pte_batch as a couple of modules might
 need it

On Wed, Feb 28, 2024 at 3:02 AM Barry Song <21cnbao@...il.com> wrote:
>
> On Wed, Feb 28, 2024 at 5:00 AM Christoph Hellwig <hch@...radead.org> wrote:
> >
> > On Tue, Feb 27, 2024 at 03:40:50PM +1300, Barry Song wrote:
> > > From: Barry Song <v-songbaohua@...o.com>
> > >
> > > madvise and some others might need folio_pte_batch to check if a range
> > > of PTEs are completely mapped to a large folio with contiguous physcial
> > > addresses. Let's export it for others to use.
> >
> > It doesn't look exported to me in the patch (and that's a good thing!).
> >
> > But even for making it non-static you probably want to include that in
> > the series actually making use of it.
>
> at least two parallel jobs[1][2] (maybe more ) need it right now.

+1

After kernel support for anonymous multi-size THP, PTE-mapped THP will
no longer be the exception. IMO, folio_pte_batch() is widely useful for checking
whether we're mapping all subpages of the large folio or not.

Thanks,
Lance

> Getting this one pulled in early
> will help build a common base for them and avoid duplicates&conflicts in them.
>
> [1] https://lore.kernel.org/linux-mm/20240118111036.72641-7-21cnbao@gmailcom/
> [2] https://lore.kernel.org/linux-mm/20240225123215.86503-1-ioworker0@gmail.com/
> >
> > > +extern int folio_pte_batch(struct folio *folio, unsigned long addr,
> > > +             pte_t *start_ptep, pte_t pte, int max_nr, fpb_t flags,
> > > +             bool *any_writable);
> >
> > no need for the extern here.
>
> Yes. this has been moved to internal.h as "static inline" in v2:
> https://lore.kernel.org/linux-mm/20240227104201.337988-1-21cnbao@gmail.com/
>
> Thanks
> Barry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ