lkml.org 
[lkml]   [2023]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 18/19] x86/resctrl: Add cpu offline callback for resctrl work
From
Hi James,

On 3/20/2023 10:26 AM, James Morse wrote:

> -static int resctrl_offline_cpu(unsigned int cpu)
> -{
> - struct rdtgroup *rdtgrp;
> struct rdt_resource *r;
>
> mutex_lock(&rdtgroup_mutex);
> + resctrl_offline_cpu(cpu);
> +
> for_each_capable_rdt_resource(r)
> domain_remove_cpu(cpu, r);
> - list_for_each_entry(rdtgrp, &rdt_all_groups, rdtgroup_list) {
> - if (cpumask_test_and_clear_cpu(cpu, &rdtgrp->cpu_mask)) {
> - clear_childcpus(rdtgrp, cpu);
> - break;
> - }
> - }
> clear_closid_rmid(cpu);
> mutex_unlock(&rdtgroup_mutex);
>

I find this and the previous patch to be very complicated. It is not clear
to me why resctrl_offline_cpu(cpu) is required to be before offline of domain.
Previous patch would not be needed if the existing order of operations
is maintained.

Reinette

\
 
 \ /
  Last update: 2023-04-06 01:49    [W:0.559 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site