Re: [RFC PATCH 0/9] introduce PGTY_mgt_entry page_type
From: Huang, Ying
Date: Thu Jul 24 2025 - 21:37:24 EST
Huan Yang <link@xxxxxxxx> writes:
> 在 2025/7/24 17:15, Lorenzo Stoakes 写道:
[snip]
>> On Thu, Jul 24, 2025 at 04:44:28PM +0800, Huan Yang wrote:
>>> Summary
>>> ==
>>> This patchset reuses page_type to store migrate entry count during the
>>> period from migrate entry setup to removal, enabling accelerated VMA
>>> traversal when removing migrate entries, following a similar principle to
>>> early termination when folio is unmapped in try_to_migrate.
>>>
>>> In my self-constructed test scenario, the migration time can be reduced
>>> from over 150+ms to around 30+ms, achieving nearly a 70% performance
>>> improvement. Additionally, the flame graph shows that the proportion of
>>> remove_migration_ptes can be reduced from 80%+ to 60%+.
>> This sounds completely contrived. I don't even know if you have a use case
>> here.
>
> The test case I provided does have an amplified effect, but the
> optimization it demonstrates is real. It's just that when scaled up to
> the system level, the effect becomes difficult to observe.
>
It's more important to sell your problems than selling your code :-)
If you cannot prove that the optimization has some practical effect,
it's hard to persuade others for increased complexity.
---
Best Regards,
Huang, Ying