[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241107112107.3rO2RTzX@linutronix.de>
Date: Thu, 7 Nov 2024 12:21:07 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Boqun Feng <boqun.feng@...il.com>
Cc: "Paul E. McKenney" <paulmck@...nel.org>,
Vlastimil Babka <vbabka@...e.cz>, Marco Elver <elver@...gle.com>,
linux-kernel@...r.kernel.org, kasan-dev@...glegroups.com,
linux-mm@...ck.org, sfr@...b.auug.org.au, longman@...hat.com,
cl@...ux.com, penberg@...nel.org, rientjes@...gle.com,
iamjoonsoo.kim@....com, akpm@...ux-foundation.org,
Tomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 2/2] scftorture: Use a lock-less list to free memory.
On 2024-11-04 17:00:19 [-0800], Boqun Feng wrote:
> Hi Sebastian,
Hi Boqun,
…
> I think this needs to be:
>
> scf_cleanup_free_list(cpu);
>
> or
>
> scf_cleanup_free_list(curcpu);
>
> because scfp->cpu is actually the thread number, and I got a NULL
> dereference:
>
> [ 14.219225] BUG: unable to handle page fault for address: ffffffffb2ff7210
Right. Replaced with cpu.
…
>
> Another thing is, how do we guarantee that we don't exit the loop
> eariler (i.e. while there are still callbacks on the list)? After the
> following scftorture_invoke_one(), there could an IPI pending somewhere,
> and we may exit this loop if torture_must_stop() is true. And that IPI
> might add its scf_check to the list but no scf_cleanup_free_list() is
> going to handle that, right?
Okay. Assuming that IPIs are done by the time scf_torture_cleanup is
invoked, I added scf_cleanup_free_list() for all CPUs there.
Reposted at
https://lore.kernel.org/20241107111821.3417762-1-bigeasy@linutronix.de
> Regards,
> Boqun
Sebastian
Powered by blists - more mailing lists