Re: [linus:master] [x86] 4817f70c25: stress-ng.mmapaddr.ops_per_sec 63.0% regression

From: Qi Zheng
Date: Tue Jan 28 2025 - 10:59:29 EST




On 2025/1/28 21:42, David Hildenbrand wrote:
On 28.01.25 14:28, Peter Zijlstra wrote:
On Tue, Jan 28, 2025 at 12:39:51PM +0100, David Hildenbrand wrote:
On 28.01.25 12:31, Peter Zijlstra wrote:

I recall a recent series to select MMU_GATHER_RCU_TABLE_FREE on x86
unconditionally (@Peter, @Rik).

Those changes should not have made it to Linus yet.

/me updates git and checks...

nope, nothing changed there ... yet

Sorry, I wasn't quite clear. CONFIG_PT_RECLAIM made it upstream, which has
"select MMU_GATHER_RCU_TABLE_FREE" in kconfig.

So I'm wondering if the degradation we see in this report is due to
MMU_GATHER_RCU_TABLE_FREE being selected by CONFIG_PT_RECLAIM, and we'd get
the same result (degradation) when unconditionally enabling
MMU_GATHER_RCU_TABLE_FREE.

Ah, yes, put a RHEL based config (as is the case here) should already
have it selected due to PARAVIRT.

Ah, right. Most distros will just have it enabled either way.

But that would then mean that MMU_GATHER_RCU_TABLE_FREE is not the cause

In addition, commit 718b13861d22 ("x86: mm: free page table pages by RCU instead of semi RCU")
also made a change, that is, when freeing a single page table pages, use
RCU to free the page table page instead of sending the IPI.

But in theory this should not cause performance regression, and I have
tested the performance of munmap with bpftrace and found no regression.

for the regression here, and something else is going wrong.

It looks like it, I will investigate it carefully.

Thanks!