Re: [PATCH] MAINTAINERS: group all VMA-related files into the VMA section

David Hildenbrand
2024-12-09T22:02:45Z

>>> To me I politely disagree with the assessment made here, but if a senior
>>> member of the kernel objects of course I'll withdraw it.
>>>
>>> But yeah I don't think that's workable. We will just have to hope that we
>>> notice mremap changes that might be problematic going forward, I might
>>> therefore update my lei settings accordingly...
>>>
>>
>> I have the feeling you take this personally; please don't.
>

Hi Lorenzo,

> Sure sorry it's text being a bad medium and this sort of thing _inevitably_
> being a fraught subject :)
>
> I have a great deal of respect for you so my imagining that you might think
> I couldn't do things in this area was slightly shocking, but I suspect this
> is, in fact, on reflection, not at all what you meant.

Not at all. The key problem here is that we have MM systemcalls, that
will involve multiple complex things. And the VMA handling is only one
of these things IMHO.

For example, I suck at VMA handling and wouldn't ever put my name on the
VMA section (vma.c). In contrast, I might consider myself a bit familiar
with mprotect() and madvise() handling besides the struct vm_struct
modifications.

And that was my point: the majority of the complex code in these files
is not the VMA handling (as in vma.c). Whereby in vma.c and mmap.c it
absolutely is.

VMA maintainers reviewing (and people expecting them to ack/nack!)
madvise() changes like MADV_COLD that really do nothing relevant with
VMAs is not particularly helpful.

I am also not a big fan of having too many maintainers listed, because a
file ends up falling into multiple sections -- how should a submitter in
the end know which ack actually counts, and which are required etc.

Maybe we can find a better way to structure things (either in the
MAINTAINER file or code-wise).

Or maybe I am just wrong.

(many of our files are currently structured around syscalls, and then as
explained, there is mm/huge_memory.c where we dumped some other parts)

>
> So sorry, I don't intend for this to be anything other than a functional
> converastion to determine how best for us to manage workload and avoid
> issues in future.

Sorry for misleading you.

>
> If you see my other mail with suggested ways forward, hopefully one of
> those will help ensure appropriate separation and distribution of
> workload/responsibility (am of course also open to whatever you might
> suggest!)
>

Yes, I'll try taking a look tomorrow.

>>
>> Maybe my other mail with "VMA users" vs. "basic VMA functionality" makes it
>> clearer what I mean.
>>
>> For example, mm/userfaultfd.c also performs VMA modifications. kernel/fork.c
>> does a bunch of that. I neither think these should go under VMA nor that it
>> should be split up.
>
> Yeah and I _hate_ that. I mean talk to me about fs/userfaultfd.c, but maybe
> only after a few pints :) Or bits of mm that live in fs, but vma-related
> and not...
>

:)

> But these are areas to fix.
>
>>
>> Maybe there is a better way to split up things or rework the code; likely
>> we'd want this code that works on VMAs to have a clean interface with the
>> core vma logic in vma.c, if the current way of handling it is a problem for
>> you.
>
> I think we probably need a compromise for the time being, and as I was
> saying to Jann I don't think it makes sense really to separate the VMA and
> page table bits from these files _except_ when we finally have a shared
> page table interface that we've spoken about before and perhaps we will
> collaborate on in future :)

In fork.c we split out the page table bits (into mm/memory.c), but left
the VMA bits in there ... :)

>
> The key point is so we avoid stepping on landmines when we discover
> something was merged in file X which we weren't cc'd on that breaks core
> feature Y we have been working on in the VMA part of the code.

In my experience, tracking files is not particularly helpful. People
will still not CC you, or do nasty stuff in files you are not tracking.

What I do is (well, besides screening most of linux-mm), is have a list
of magic names/keywords, and tag the mails.

This way, when someone uses the magic "COW" keyword, for example, or
calls mapcount functions, I get them put into a separate folder where I
can just briefly sanity check them.

--
Cheers,

David / dhildenb