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] [thread-next>] [day] [month] [year] [list]
Date: Thu, 18 Apr 2024 20:09:17 +0800
From: Lance Yang <ioworker0@...il.com>
To: David Hildenbrand <david@...hat.com>
Cc: akpm@...ux-foundation.org, ryan.roberts@....com, 21cnbao@...il.com, 
	mhocko@...e.com, fengwei.yin@...el.com, zokeefe@...gle.com, 
	shy828301@...il.com, xiehuan09@...il.com, wangkefeng.wang@...wei.com, 
	songmuchun@...edance.com, peterx@...hat.com, minchan@...nel.org, 
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v9 3/4] mm/memory: add any_dirty optional pointer to folio_pte_batch()

On Thu, Apr 18, 2024 at 8:00 PM David Hildenbrand <david@...hat.com> wrote:
>
> On 18.04.24 12:57, Lance Yang wrote:
> > This commit adds the any_dirty pointer as an optional parameter to
> > folio_pte_batch() function. By using both the any_young and any_dirty pointers,
> > madvise_free can make smarter decisions about whether to clear the PTEs when
> > marking large folios as lazyfree.
> >
> > Suggested-by: David Hildenbrand <david@...hat.com>
> > Signed-off-by: Lance Yang <ioworker0@...il.com>
> > ---
> >   mm/internal.h | 12 ++++++++++--
> >   mm/madvise.c  | 19 ++++++++++++++-----
> >   mm/memory.c   |  4 ++--
> >   3 files changed, 26 insertions(+), 9 deletions(-)
> >
> > diff --git a/mm/internal.h b/mm/internal.h
> > index c6483f73ec13..daa59cef85d7 100644
> > --- a/mm/internal.h
> > +++ b/mm/internal.h
> > @@ -134,6 +134,8 @@ static inline pte_t __pte_batch_clear_ignored(pte_t pte, fpb_t flags)
> >    *            first one is writable.
> >    * @any_young: Optional pointer to indicate whether any entry except the
> >    *            first one is young.
> > + * @any_dirty: Optional pointer to indicate whether any entry except the
> > + *             first one is dirty.
> >    *
>

Hey David,

Thanks for taking time to review!

> I was also wondering if we should make that function return a
> pte+nr_pages, instead of only nr_pages, and then simply have the
> function, based on new flags, merge data into the original PTE.
>

Nice, good idea!

> But let's do that separately.

Yep, let's do that separately :p

>
> Acked-by: David Hildenbrand <david@...hat.com>

Thanks again for the review!
Lance

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ