[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALPaoCgQQGEypbEz_YMsq9+grM9bEKprVz+iByDUPh85acRM4g@mail.gmail.com>
Date: Fri, 16 Dec 2022 16:12:45 +0100
From: Peter Newman <peternewman@...gle.com>
To: fenghua.yu@...el.com, reinette.chatre@...el.com
Cc: Babu.Moger@....com, bp@...en8.de, dave.hansen@...ux.intel.com,
eranian@...gle.com, gupasani@...gle.com, hpa@...or.com,
james.morse@....com, linux-kernel@...r.kernel.org,
mingo@...hat.com, tglx@...utronix.de, x86@...nel.org
Subject: Re: [PATCH v2 2/2] x86/resctrl: Implement rename op for mon groups
On Tue, Nov 29, 2022 at 1:02 PM Peter Newman <peternewman@...gle.com> wrote:
> diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> index 03b51543c26d..d6562d98b816 100644
> --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> @@ -3230,6 +3230,71 @@ static int rdtgroup_rmdir(struct kernfs_node *kn)
> return ret;
> }
>
> +static void mongrp_move(struct rdtgroup *rdtgrp, struct rdtgroup *new_prdtgrp)
> +{
> + struct rdtgroup *prdtgrp = rdtgrp->mon.parent;
> + struct task_struct *p, *t;
> +
> + WARN_ON(list_empty(&prdtgrp->mon.crdtgrp_list));
> + list_del(&rdtgrp->mon.crdtgrp_list);
> +
> + list_add_tail(&rdtgrp->mon.crdtgrp_list,
> + &new_prdtgrp->mon.crdtgrp_list);
> + rdtgrp->mon.parent = new_prdtgrp;
> +
> + read_lock(&tasklist_lock);
> + for_each_process_thread(p, t) {
> + if (is_closid_match(t, prdtgrp) && is_rmid_match(t, rdtgrp))
> + WRITE_ONCE(t->closid, new_prdtgrp->closid);
> + }
> + read_unlock(&tasklist_lock);
> +
> + update_closid_rmid(cpu_online_mask, NULL);
I will need to refresh this patch now that we're back to building an
update mask.
This will once again depend on
https://lore.kernel.org/lkml/20221216133125.3159406-1-peternewman@google.com/
Powered by blists - more mailing lists