From: "Michal Koutný" <mkoutny-IBi9RG/b67k@public.gmane.org>
To: Vipin Sharma <vipinsh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Cc: thomas.lendacky-5C7GfCeVMHo@public.gmane.org,
tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
brijesh.singh-5C7GfCeVMHo@public.gmane.org,
jon.grimm-5C7GfCeVMHo@public.gmane.org,
eric.vantassell-5C7GfCeVMHo@public.gmane.org,
pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org,
frankja-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org,
borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org,
corbet-T1hC0tSOHrs@public.gmane.org,
seanjc-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
vkuznets-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
wanpengli-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org,
jmattson-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org,
tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org,
hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org,
gingell-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
rientjes-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
dionnaglaze-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC 1/2] cgroup: sev: Add misc cgroup controller
Date: Fri, 26 Feb 2021 15:23:42 +0100 [thread overview]
Message-ID: <YDkEbv9u3OBNpk6f@blackbook> (raw)
In-Reply-To: <YDf6bpSxX6I5xdqZ-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 937 bytes --]
On Thu, Feb 25, 2021 at 11:28:46AM -0800, Vipin Sharma <vipinsh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> 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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-02-26 14:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 19:55 [RFC 0/2] cgroup: New misc cgroup controller Vipin Sharma
[not found] ` <20210218195549.1696769-1-vipinsh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2021-02-18 19:55 ` [RFC 1/2] cgroup: sev: Add " Vipin Sharma
2021-02-23 18:24 ` Michal Koutný
2021-02-25 4:57 ` Vipin Sharma
[not found] ` <YDcuQFMbe5MaatBe-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2021-02-25 9:52 ` Michal Koutný
2021-02-25 19:28 ` Vipin Sharma
[not found] ` <YDf6bpSxX6I5xdqZ-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2021-02-26 14:23 ` Michal Koutný [this message]
2021-02-18 19:55 ` [RFC 2/2] cgroup: sev: Miscellaneous cgroup documentation Vipin Sharma
2021-02-19 19:02 ` Randy Dunlap
2021-02-24 23:13 ` Vipin Sharma
2021-02-23 18:24 ` [RFC 0/2] cgroup: New misc cgroup controller Michal Koutný
2021-02-25 0:06 ` Vipin Sharma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YDkEbv9u3OBNpk6f@blackbook \
--to=mkoutny-ibi9rg/b67k@public.gmane.org \
--cc=borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
--cc=bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org \
--cc=brijesh.singh-5C7GfCeVMHo@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=corbet-T1hC0tSOHrs@public.gmane.org \
--cc=dionnaglaze-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=eric.vantassell-5C7GfCeVMHo@public.gmane.org \
--cc=frankja-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org \
--cc=gingell-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
--cc=jmattson-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=jon.grimm-5C7GfCeVMHo@public.gmane.org \
--cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
--cc=kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=rientjes-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=seanjc-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=thomas.lendacky-5C7GfCeVMHo@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=vipinsh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=vkuznets-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=wanpengli-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org \
--cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).