Re: [PATCH v14 29/32] fs/resctrl: Introduce the interface to modify assignments in a group

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

 



Hi Babu,

On 7/1/25 7:18 PM, Moger, Babu wrote:
> On 6/25/2025 6:38 PM, Reinette Chatre wrote:
>> On 6/13/25 2:05 PM, Babu Moger wrote:

>>
>> Apart from simplifying the code an additional benefit is to avoid
>> (ab)use case where user/bot may write:
>>     # echo "mbm_total_bytes:*=_;*=e;*=_" > /sys/fs/resctrl/mbm_L3_assignments
>>
> 
> Why should we restrict this?

I see it as unnecessary churn that can easily be avoided.

> 
>>> +    } else if (!id_str || kstrtoul(id_str, 10, &dom_id)) {
>>> +        rdt_last_cmd_puts("Missing domain id\n");
>>> +        return -EINVAL;
>>> +    }
>>> +
>>> +    /* Verify if the dom_id is valid */
>>> +    found = false;
>>> +    list_for_each_entry(d, &r->mon_domains, hdr.list) {
>>> +        if (d->hdr.id == dom_id) {
>>
>> Similarly, resctrl_get_assign_state() (new name TBD) can be
>> called directly and "found" can be dropped.
> 
> I think we still need to know if the domain id matched or not.

Of course, and when the domain ID matches, just call 
resctrl_get_assign_state()/rdtgroup_modify_assign_state()

> 
> I think it is better to call resctrl_get_assign_state()(now rdtgroup_modify_assign_state()) at once place. Code is easy to follow.

This is not clear to me. Will surely take a look at how this turned out.

> 
> I have taken care of most of the stuff. You can review again in next version.

ok, thank you.

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