[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <0F715281-1754-4D81-A71D-4AC20BC13095@gmail.com>
Date: Mon, 4 Aug 2025 17:50:56 +0300
From: Nadav Amit <nadav.amit@...il.com>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: Li Qiang <liqiang01@...inos.cn>,
Andrew Morton <akpm@...ux-foundation.org>,
David Hildenbrand <david@...hat.com>,
"open list:MEMORY MANAGEMENT" <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>,
Mike Rapoport <rppt@...nel.org>,
Suren Baghdasarya <surenb@...gle.com>,
Michal Hocko <mhocko@...e.com>
Subject: Re: [PATCH] mm: memory: Force-inline PTE/PMD zapping functions for
performance
> On 4 Aug 2025, at 16:59, Lorenzo Stoakes <lorenzo.stoakes@...cle.com> wrote:
>
> OK,
>
> So I hacked -fopt-info-inline-all into the mm/ Makefile in a rather quick and
> dirty way and it seems some stuff gets inlined locally, but we're mostly hitting
> the '--param max-inline-insns-single limit reached' limit here.
Yes, it does require further investigation. My point is that sprinkling
__always_inline is a slippery slope. You start with putting __always_inline on
zap_present_folio_ptes (as currently done), and then the caller becomes expensive.
Now you noticed that the caller to zap_present_folio_ptes is not getting inlined,
which is not surprising because it got the cost of the always-inlined callee,
so you put __always_inline there, and so on.
Powered by blists - more mailing lists