Re: [linus:master] [x86] 4817f70c25: stress-ng.mmapaddr.ops_per_sec 63.0% regression
From: Rik van Riel
Date: Wed Jan 29 2025 - 11:15:01 EST
On Wed, 2025-01-29 at 16:12 +0000, Matthew Wilcox wrote:
> On Wed, Jan 29, 2025 at 10:59:20AM -0500, Rik van Riel wrote:
> > Below is a tentative fix for the issue. It is kind of a big hammer,
> > and maybe the RCU people have a better idea on how to solve this
> > problem, but it may be worth giving this a try to see if it helps
> > with the regression you identified.
>
> Perhaps better to do:
>
> +++ b/mm/page_alloc.c
> @@ -97,8 +97,8 @@ static DEFINE_MUTEX(pcp_batch_high_lock);
> * On SMP, spin_trylock is sufficient protection.
> * On PREEMPT_RT, spin_trylock is equivalent on both SMP and UP.
> */
> -#define pcp_trylock_prepare(flags) do { } while (0)
> -#define pcp_trylock_finish(flag) do { } while (0)
> +#define pcp_trylock_prepare(flags) rcu_read_lock()
> +#define pcp_trylock_finish(flag) rcu_reada_unlock()
> #else
>
> /* UP spin_trylock always succeeds so disable IRQs to prevent re-
> entrancy. */
>
> with appropriate comment changes
>
Agreed. Assuming this change even works :)
Paul, does this look like it could do the trick,
or do we need something else to make RCU freeing
happy again?
--
All Rights Reversed.