Re: [PATCH v2 3/4] sched/numa: scan read-only file mappings in tiering mode

From: David Hildenbrand (Arm)

Date: Fri Sep 18 2026 - 11:19:18 EST


On 9/18/26 15:57, Gregory Price wrote:
> On Fri, Sep 18, 2026 at 02:58:36PM +0200, David Hildenbrand (Arm) wrote:
>>> +/*
>>> + * Read-only file-backed mappings are expected to be cache replicated between
>>> + * accessor nodes, so they are not worth sampling for placement. They can
>>> + * still strand on the slow tier like anything else.
>>> + */
>>> +static bool vma_is_ro_file(struct vm_area_struct *vma)
>>> +{
>>> + return vma->vm_file && (vma->vm_flags & (VM_READ | VM_WRITE)) == VM_READ;
>>
>>
>> MAP_PRIVATE can easily map a read-only file with write permissions. So the
>> function name is a bit misleading.
>>
>> This smells like a helper that should go next to other vma helpers and have
>> clear semantics.
>>
>
> No argument here. Would like to balance improvement vs backportable
> bugfix though. I broke out the name to try to make it at least a bit
> more readable.

I understand, but I am not asking about much.

Maybe Lorenzo can help us out.

/me summons Lorenzo

--
Cheers,

David