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]
Message-ID: <CAC_TJvckhxwz9TxXgMSaiihHddY+AnEGqjLxvO6qF0eqTb5U8Q@mail.gmail.com>
Date:   Wed, 9 Aug 2023 08:54:23 -0700
From:   Kalesh Singh <kaleshsingh@...gle.com>
To:     David Hildenbrand <david@...hat.com>
Cc:     Charan Teja Kalla <quic_charante@...cinc.com>,
        akpm@...ux-foundation.org, zhaoyang.huang@...soc.com,
        yuzhao@...gle.com, surenb@...gle.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Multi-gen LRU: skip CMA pages when they are not eligible

On Wed, Aug 9, 2023 at 7:00 AM David Hildenbrand <david@...hat.com> wrote:
>
> On 09.08.23 10:05, Charan Teja Kalla wrote:
> > This patch is based on the commit 5da226dbfce3("mm: skip CMA pages when
> > they are not available") which skips cma pages reclaim when they are not
> > eligible for the current allocation context. In mglru, such pages are
> > added to the tail of the immediate generation to maintain better LRU
> > order, which is unlike the case of conventional LRU where such pages are
> > directly added to the head of the LRU list(akin to adding to head of the
> > youngest generation in mglru).
> >
> > No observable issue without this patch on MGLRU, but logically it make
> > sense to skip the CMA page reclaim when those pages can't be satisfied
> > for the current allocation context.
> >
> > Signed-off-by: Charan Teja Kalla <quic_charante@...cinc.com>

Reviewed-by: Kalesh Singh <kaleshsingh@...gle.com>

Thanks,
Kalesh

> > ---
> >   mm/vmscan.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/vmscan.c b/mm/vmscan.c
> > index b4329f9..6cbe921 100644
> > --- a/mm/vmscan.c
> > +++ b/mm/vmscan.c
> > @@ -4943,7 +4943,7 @@ static bool sort_folio(struct lruvec *lruvec, struct folio *folio, struct scan_c
> >       }
> >
> >       /* ineligible */
> > -     if (zone > sc->reclaim_idx) {
> > +     if (zone > sc->reclaim_idx || skip_cma(folio, sc)) {
> >               gen = folio_inc_gen(lruvec, folio, false);
> >               list_move_tail(&folio->lru, &lrugen->folios[gen][type][zone]);
> >               return true;
>
> Makes sense to me.
>
> --
> Cheers,
>
> David / dhildenb
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ