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

From: David Hildenbrand (Arm)

Date: Thu Sep 10 2026 - 09:50:24 EST


On 9/10/26 14:08, Oscar Salvador (SUSE) wrote:
> 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?

I guess so, I was assuming the only real scenario would be us missing to process
certain sections (which would usually not be the end of the world). Getting
larger values is unlikely when tearing reads/writes I think.

--
Cheers,

David