Re: [PATCH v4 1/2] x86/resctrl: Pass domain to target CPU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tony,

On 3/5/2024 8:37 AM, Luck, Tony wrote:
>> If I understand correctly that would always look for a valid "cpu"
>> even when none is needed. Not quite what I proposed but should
>> work. Just some wasted cycles in a non critical path. 
> 
> Reinette,
> 
> Sorry for misunderstanding. You are right. Assignment to msr_param.dom
> can also be deferred to the same point. Like this:
> 
>         list_for_each_entry(d, &r->domains, list) {
>                 hw_dom = resctrl_to_arch_dom(d);
>                 msr_param.res = NULL;
>                 for (t = 0; t < CDP_NUM_TYPES; t++) {
>                         cfg = &hw_dom->d_resctrl.staged_config[t];
>                         if (!cfg->have_new_ctrl)
>                                 continue;
> 
>                         idx = get_config_index(closid, t);
>                         if (cfg->new_ctrl == hw_dom->ctrl_val[idx])
>                                 continue;
>                         hw_dom->ctrl_val[idx] = cfg->new_ctrl;
> 
>                         if (!msr_param.res) {
>                                 msr_param.low = idx;
>                                 msr_param.high = msr_param.low + 1;
>                                 msr_param.res = r;
>                                 msr_param.dom = d;
>                                 cpu = cpumask_any(&d->cpu_mask);
>                         } else {
>                                 msr_param.low = min(msr_param.low, idx);
>                                 msr_param.high = max(msr_param.high, idx + 1);
>                         }
>                 }
>                 if (msr_param.res)
>                         smp_call_function_single(cpu, rdt_ctrl_update, &msr_param, 1);
>         }

This looks good to me. 

Thank you very much.

Reinette





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux