[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YFjg9+qGLMUoKj4h@google.com>
Date: Mon, 22 Mar 2021 11:24:55 -0700
From: Vipin Sharma <vipinsh@...gle.com>
To: Michal Koutný <mkoutny@...e.com>
Cc: Tejun Heo <tj@...nel.org>, rdunlap@...radead.org,
thomas.lendacky@....com, brijesh.singh@....com, jon.grimm@....com,
eric.vantassell@....com, pbonzini@...hat.com, hannes@...xchg.org,
frankja@...ux.ibm.com, borntraeger@...ibm.com, corbet@....net,
seanjc@...gle.com, vkuznets@...hat.com, wanpengli@...cent.com,
jmattson@...gle.com, joro@...tes.org, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, hpa@...or.com, gingell@...gle.com,
rientjes@...gle.com, dionnaglaze@...gle.com, kvm@...r.kernel.org,
x86@...nel.org, cgroups@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [Patch v3 0/2] cgroup: New misc cgroup controller
On Mon, Mar 15, 2021 at 08:10:09PM +0100, Michal Koutný wrote:
> On Fri, Mar 12, 2021 at 09:49:26AM -0800, Vipin Sharma <vipinsh@...gle.com> wrote:
> > I will add some more information in the cover letter of the next version.
> Thanks.
>
> > Each one coming up with their own interaction is a duplicate effort
> > when they all need similar thing.
> Could this be expressed as a new BPF hook (when allocating/freeing such
> a resource unit)?
>
> The decision could be made based on the configured limit or even some
> other predicate.
>
> (I saw this proposed already but I haven't seen some more reasoning
> whether it's worse/better. IMO, BPF hooks are "cheaper" than full-blown
> controllers, though it's still new user API.)
I am not much knowledgeable with BPF, so, I might be wrong here.
There are couple of things which might not be addressed with BPF:
1. Which controller to use in v1 case? These are not abstract resources
so in v1 where each controller have their own hierarchy it might not
be easy to identify the best controller.
2. It seems to me that we won't be able to abstract out a single BPF
program which can help with all of the resources types we are
planning to use, again, because it is not an abstract type like
network packets, and there will be different places in the source
code to use these resources.
To me a cgroup tends to give much easier and well integrated solution when it
comes to scheduling and limiting a resource with existing tools in a
cloud infrastructure.
>
>
> > As per my understanding this is the only for way for loadable modules
> > (kvm-amd in this case) to access Kernel APIs. Let me know if there is a
> > better way to do it.
> I understood the symbols are exported for such modularized builds.
> However, making them non-GPL exposes them to any out-of-tree modules,
> although, the resource types are supposed to stay hardcoded in the misc
> controller. So my point was to make them EXPORT_SYMBOL_GPL to mark
> they're just a means of implementing the modularized builds and not an
> API. (But they'd remain API for out-of-tree GPL modules anyway, so take
> this reasoning of mine with a grain of salt.)
>
I see, I will change it to GPL.
Thanks
Vipin
Powered by blists - more mailing lists