Re: [PATCH v4 2/3] x86/resctrl: Parameterize rdt_move_group_tasks() task matching

From: Peter Newman
Date: Thu Mar 30 2023 - 08:50:42 EST


Hi Reinette,

On Thu, Mar 23, 2023 at 7:02 PM Reinette Chatre
<reinette.chatre@xxxxxxxxx> wrote:
> On 3/8/2023 5:14 AM, Peter Newman wrote:
> > +/*
> > + * If @from is NULL, then all tasks in the systems are moved unconditionally
> > + * (used for teardown).
>
> Could this description be expanded to describe what the matching does? Just jumping
> in with the above sentence is quite cryptic.
>
> > + */
> > +static bool rmdir_match(struct task_struct *t, struct rdtgroup *from)
>
> Could the function's name please reflect what the function does as opposed to
> what the current users are doing at the time they call it? Perhaps
> something like "task_in_any_group()" (thinking ahead about a possible
> "task_in_mon_group()" for the next patch, please feel free to change).
> Also note that the "from" is another naming that reflects the usage as
> opposed to what the function does. It could just be "rdtgrp".

I read over the behavior of this function more carefully to try to come
up with a more descriptive name and realized that for MON groups it
behaves identically to the new one I created for rename().

The original rdt_move_group_tasks() was actually fine all along so I'm
just going to drop this patch.

-Peter