Messages in this thread | | | Date | Fri, 26 Feb 2021 15:23:42 +0100 | From | Michal Koutný <> | Subject | Re: [RFC 1/2] cgroup: sev: Add misc cgroup controller |
| |
On Thu, Feb 25, 2021 at 11:28:46AM -0800, Vipin Sharma <vipinsh@google.com> wrote: > My approach here is that it is the responsibility of the caller to: > 1. Check the return value and proceed accordingly. > 2. Ideally, let all of the usage be 0 before deactivating this resource > by setting capacity to 0 If the calling side can ensure itself that no new units of the resource are used from that moment on, then it can work this way -- but describe that in misc_cg_set_capacity() comment.
> Is the above change good? I think both alternatives would work. But the latter (as I see it now) would mandate dependency on CONFIG_CGROUP or it'd have to double the similar logic itself. So maybe keeping the caller responsible explicitly is simpler from this POV.
> Will there be any objection to extra information? IMO it's unnecessary (stating this just for consistency reasons), no strong opinion.
Michal [unhandled content-type:application/pgp-signature] | |