[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a4491b54-4e08-4bcc-bcd3-3bae20a490b2@suse.cz>
Date: Tue, 5 Aug 2025 15:15:26 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Li Qiang <liqiang01@...inos.cn>, akpm@...ux-foundation.org,
david@...hat.com
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com, rppt@...nel.org,
surenb@...gle.com, mhocko@...e.com
Subject: Re: [PATCH] mm: memory: Force-inline PTE/PMD zapping functions for
performance
On 8/5/25 2:04 PM, Li Qiang wrote:
> Ah, missed it after the performance numbers. As Vlastimil mentioned, I
> would have expected a bloat-o-meter output.
>
>>
>> My 2 cents is that usually it may be better to understand why it is
>> not inlined and address that (e.g., likely() hints or something else)
>> instead of blindly putting __always_inline. The __always_inline might
>> stay there for no reason after some code changes and therefore become
>> a maintenance burden. Concretely, in this case, where there is a single
>> caller, one can expect the compiler to really prefer to inline the
>> callees.
>
>>
>> Agreed, although the compiler is sometimes hard to convince to do the
>> right thing when dealing with rather large+complicated code in my
>> experience.
>
> Question 1: Will this patch increase the vmlinux size?
> Reply:
> Actually, the overall vmlinux size becomes smaller on x86_64:
> [root@...alhost linux_old1]# ./scripts/bloat-o-meter before.vmlinux after.vmlinux
> add/remove: 6/0 grow/shrink: 0/1 up/down: 4569/-4747 (-178)
> Function old new delta
> zap_present_ptes.constprop - 2696 +2696
> zap_pte_range - 1236 +1236
> zap_pmd_range.isra - 589 +589
> __pfx_zap_pte_range - 16 +16
> __pfx_zap_present_ptes.constprop - 16 +16
> __pfx_zap_pmd_range.isra - 16 +16
> unmap_page_range 5765 1018 -4747
> Total: Before=35379786, After=35379608, chg -0.00%
Is the before/after swapped here? This output suggests some functions
became NOT inlined.
If I'm right the output binary becomes slightly larger. But it doesn't
matter.
Powered by blists - more mailing lists