Re: [PATCH v2 2/2] mm/vmpressure: split v1 userspace eventfd code into vmpressure-v1.c

From: Shakeel Butt

Date: Mon Jun 29 2026 - 14:30:58 EST


On Mon, Jun 29, 2026 at 02:12:38PM -0400, Johannes Weiner wrote:
> On Mon, Jun 29, 2026 at 06:23:58PM +0100, Usama Arif wrote:
> >
> >
> > On 29/06/2026 17:48, Johannes Weiner wrote:
> > > On Mon, Jun 29, 2026 at 05:59:37AM -0700, Usama Arif wrote:
> > >> @@ -101,7 +101,7 @@ obj-$(CONFIG_DEVICE_MIGRATION) += migrate_device.o
> > >> obj-$(CONFIG_TRANSPARENT_HUGEPAGE) += huge_memory.o khugepaged.o
> > >> obj-$(CONFIG_PAGE_COUNTER) += page_counter.o
> > >> obj-$(CONFIG_LIVEUPDATE_MEMFD) += memfd_luo.o
> > >> -obj-$(CONFIG_MEMCG_V1) += memcontrol-v1.o
> > >> +obj-$(CONFIG_MEMCG_V1) += memcontrol-v1.o vmpressure-v1.o
> > >
> > > Might as well move the interface part to memcontrol-v1.c instead of
> > > creating a new file.
> > >
> >
> > I think it would make it easier once we move cgroup v2 off of
> > vmpressure. Then we can rename vmpressure-v1.c to just vmpressure.c
> > and gate it to CONFIG_MEMCG_V1. The other option would be everything
> > living in memcontrol-v1.c?
>
> Hm? I just mean move whatever you move into that new vmpressure-v1.c
> into memcontrol-v1.c instead.
>
> > I think its nice to keep it separate as
> > memcontrol-v1.c is already 2K+ lines and this is standalone feature
> > that can sit in a separate file.
>
> It's all deprecated code with no active development. Containing it and
> making it easy to see the footprint of the cgroup1 option is the
> higher priority, more than maintaining neat component separation.
>
> No need to work it naturally into the file either - decls/variables up
> top, functions somewhere further down etc. Just paste it into one
> contiguous vmpressure block under memcg1_oom_finish(). That's how that
> file is already structured with the other components in there.

Yup, this makes sense.