Re: [PATCH 0/2] mm: memory-failure: fix HWPoison flag race with non-atomic page flag ops

From: Michael S. Tsirkin

Date: Mon Jun 29 2026 - 17:18:35 EST


On Mon, Jun 29, 2026 at 01:55:57PM -0700, Andi Kleen wrote:
> > > Or if there are actually more performant alternatives that we could use. (I
> > > still doubt that using atomics is ok in general)
> >
> > Right now I'm thinking of looking at something like stop_machine maybe.
>
> There can be (rare) cases where yoy get a lot of memory errors in a
> flood. While memory-failure doesn't need to be particularly optimized,
> it shouldn't be excessively slow or impact the rest of the machine.
>
> stop_machine is a big hammer that is likely to violate most of this.
>
> -Andi

We can maybe batch a bunch of these, and do stop machine once?

--
MST