Re: RE: [PATCH v10 16/24] x86/resctrl: Add interface to the assign counter

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

 



Hi Tony,

On 12/13/2024 10:24 AM, Luck, Tony wrote:
It is right thing to continue assignment if one of the domain is out of
counters. In that case how about we save the error(say error_domain) and
continue. And finally return success if both ret and error_domain are zeros.

    return ret ?  ret : error_domain:

If there are many domains, then you might have 3 succeed and 5 fail.

I think the best you can do is return success if everything succeeded
and an error if any failed.

Yes. The above check should take care of this case.


You have the same issue if someone tries to update multiple things
with a single write to mbm_assign_control:

# cat > mbm_assign_control << EOF
c1/m78/0=t;1=l;
c1/m79/0=t;1=l
c1/m80/0=t;1=l;
c1/m81/0=t;1=l;
EOF

Those get processed in order, some may succeed, but once a domain
is out of counters the rest for that domain will fail.

Yes. I see the similar type of processing for schemata.
It is processed sequentially. If one fails, it returns immediately.

ret = rdtgroup_parse_resource(resname, tok, rdtgrp);
if (ret)
      goto out;

I feel it is ok to keep same level of processing.


Updates to schemata are handled in multiple passes to either have
all succeed or all fail. But the only problems that can occur are user
syntax/range issues. So it's a lot simpler.

For writes to mbm_assign_control I think it's okay to document that
some requests may have been applied even though the whole request
reports failure. The user can always read the file to check status.

Yes. We can document this.

-Tony





[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