Re: [PATCH 08/12] mm/sparse: move __highest_used_section_nr handling

From: Oscar Salvador (SUSE)

Date: Thu Sep 10 2026 - 08:21:54 EST


On Thu, Sep 10, 2026 at 11:13:18AM +0200, David Hildenbrand (Arm) wrote:
> If you have something consuming __highest_used_section_nr while concurrently
> updating it, you might get torn reads/writes that mess up the value on the
> reader side.
>
> For example, mm/compaction.c consuming __highest_used_section_nr.

Right, but I guess that if we get a 'wild' value, at least we are
guarded by online_section_nr() performing the right thing?

Not really figthing anything here, just convincing myself :-)

But yes, I guess that we should fix this in case we add more consumers
of __highest_used_section_nr in the future.


--
Oscar Salvador
SUSE Labs