[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878qkqslf2.fsf@linux.dev>
Date: Mon, 14 Jul 2025 10:59:45 -0700
From: Roman Gushchin <roman.gushchin@...ux.dev>
To: Hugh Dickins <hughd@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Johannes Weiner
<hannes@...xchg.org>, Shakeel Butt <shakeel.butt@...ux.dev>, Lorenzo
Stoakes <lorenzo.stoakes@...cle.com>, Michal Hocko <mhocko@...nel.org>,
David Hildenbrand <david@...hat.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: skip lru_note_cost() when scanning only file or anon
Hugh Dickins <hughd@...gle.com> writes:
> Roman, I'm expressing no opinion on your patch above, but please may I
> throw the patch below (against 6.16-rc) over the wall to you, to add as a
> 1/2 or 2/2 to yours (as it stands, it does conflict slightly with yours).
>
> My attention needs to be on other things; but five years ago in
> https://lore.kernel.org/linux-mm/alpine.LSU.2.11.2009211440570.5214@eggly.anvils/
> I noted how lru_note_cost() became more costly with per-memcg lru_lock,
> but did nothing about it at the time. Apparently now is the time.
>
> Thanks,
> Hugh
>
> [PATCH] mm: lru_note_cost_unlock_irq()
>
> Dropping a lock, just to demand it again for an afterthought, cannot be
> good if contended: convert lru_note_cost() to lru_note_cost_unlock_irq().
>
> Signed-off-by: Hugh Dickins <hughd@...gle.com>
Reviewed-by: Roman Gushchin <roman.gushchin@...ux.dev>
Tested-by: Roman Gushchin <roman.gushchin@...ux.dev>
Thanks, Hugh!
Actually your patch helps quite a lot with the lruvec lock contention
in my test, so I think we can stop looking at my change from the
performance point of view.
Powered by blists - more mailing lists