Re: [RFC PATCH v2 0/3] BPF-based per-cgroup NUMA balancing mode selection
From: Gregory Price
Date: Wed Oct 14 2026 - 08:35:38 EST
On Wed, Oct 14, 2026 at 11:08:40AM +0800, Yafang Shao wrote:
> >
> > I also concur with Tejun that ops seems like overkill for this feature,
> > this seems like something that can already be managed.
>
> Tejun also suggested starting with a smaller kfunc rather than the
> heavyweight struct_ops, in a separate mailing list thread. I agree
> that this would be a good starting point.
>
> >
> > For example, why not add a new numa balancing mode bit that says
> > "enabled but only for explicitly opted in tasks" and then ignore the
> > global default mempolicy, e.g.:
> >
> > if (numab_mode & NUMA_BALANCING_OPT_IN &&
> > mpol != default &&
> > mpol.flags & MPOL_F_NUMA_BALANCING)
> > /* do balancing */
>
> Another option would be to add a cgroup::numab_mode field (without
> exposing a cgroupfs interface file for now) to implement per-cgroup
> numab mode. I will think it over, considering both your suggestion and
> Tejun's.
>
I don't have a strong feeling either way, if Tejun thinks a kfunc is
acceptable here then that's probably preferable to any new UAPI changes
until the value is proven.
Thank you for the consideration,
~Gregory