mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Li Zefan <lizefan@huawei.com>,
	containers@lists.linux-foundation.org, cgroups@vger.kernel.org,
	bsingharora@gmail.com, Kay Sievers <kay.sievers@vrfy.org>,
	lpoetter@redhat.com, linux-kernel@vger.kernel.org,
	dhaval.giani@gmail.com, workman-devel@redhat.com
Subject: Re: [Workman-devel] cgroup: status-quo and userland efforts
Date: Mon, 8 Apr 2013 11:16:07 -0700	[thread overview]
Message-ID: <20130408181607.GI3021@htj.dyndns.org> (raw)
In-Reply-To: <20130408175925.GE28292@redhat.com>

Hey, Vivek.

On Mon, Apr 08, 2013 at 01:59:26PM -0400, Vivek Goyal wrote:
> But using the library admin application should be able to query the
> full "paritition" hierarchy and their weigths and calculate % system
> resources. I think one problem there is cpu controller where % resoruce
> of a cgroup depends on tasks entities which are peer to group. But that's
> a kernel issue and not user space thing.

Yeah, we're gonna have to implement a different operation mode.

> So I am not sure what are potential problems with proposed model of
> configuration in workman. All the consumer managers still follow what
> libarary has told them to do.

Sure, if we assume everyone follows the rules and behaves nicely.
It's more about the general approach.  Allowing / encouraging sharing
or distributing control of cgroup hierarchy without forcing structure
and rigid control over it is likely to lead to confusion and
fragility.

> >  or maybe some other program just happened to choose the
> >   same name.
> 
> Two programs ideally would have their own sub hiearchy. And if not one
> of the programs should get the conflict when trying to create cgroup and
> should back-off or fail or give warning...

And who's responsible for deleting it?  What if the program crashes?

> > Who owns config knobs in that directory?
> 
> IIUC, workman was looking at two types of cgroups. Once called
> "partitions" which will be created by library at startup time and
> library manages the configuration (something like cgconfig.conf).
> 
> And individual managers create their own children groups for various
> services under that partition and control the config knobs for those
> services.
> 
> 			user-defined-partition
> 			     /    |    \
>                            virt1  virt2 virt3  
> 
> So user should be able to define a partition and control the configuration
> using workman lib. And if multiple virtual machines are being run in
> the partition, then they create their own cgroups and libvirt controls
> the properties of virt1, virt2, virt3 cgroups. I thought that was the
> the understanding when we dicussed ownership of config knobs las time.
> But things might have changed since last time. Workman folks should
> be able to shed light on this.

I just read the introduction doc and haven't delved into the API or
code so I could be off but why should there be multiple managers?
What's the benefit of that?  Wouldn't it make more sense to just have
a central arbitrator that everyone talks to?  What's the benefit of
distributing the responsiblities here?  It's not like we can put them
in different security domains.

> > * In many cases, resource distribution is system-wide policy decisions
> >   and determining what to do often requires system-wide knowledge.
> >   You can't provision memory limits without knowing what's available
> >   in the system and what else is going on in the system, and you want
> >   to be able to adjust them as situation and configuration changes.
> >   Without anybody having full picture of how resources are
> >   provisioned, how would any of that be possible?
> 
> I thought workman library will provide interfaces so that one can query
> and be able to construct the full system view.
> 
> Their doc says.
> 
> GList *workmanager_partition_get_children(WorkmanPartition *partition,
>                                             GError **error);
> 
> So I am assuming this can be used to construct the full partition
> hierarchy and associated resource allocation.

Sure, maybe it can be used as a building block.

> [..]
> > I think the only logical thing to do is creating a centralized
> > userland authority which takes full ownership of the cgroup filesystem
> > interface, gives it a sane structure,
> 
> Right now systemd seems to be giving initial structure. I guess we will
> require some changes where systemd itself runs in a cgroup and that
> allows one to create peer groups. Something like.
> 				
> 				root
> 				/  \
> 			   systemd other-groups

No, we need a single structured hierarchy which everyone uses
*including* systemd.

> > represents available resources
> > in a sane form, and makes policy decisions based on configuration and
> > requests.
> 
> Given the fact that library has view of full system resoruces (both
> persistent view and active view), shouldn't we just be able to extend
> the API to meet additional configuration or resource needs.

Maybe, I don't know.  It just looks like a weird approach to me.
Wouldn't it make more sense to implement it as a dbus service that
everyone talks to?  That's how our base system is structured these
days.  Why should this be any different?

Thanks.

-- 
tejun

  reply	other threads:[~2013-04-08 18:16 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-06  1:21 Tejun Heo
2013-04-08 13:46 ` Glauber Costa
2013-04-08 18:00   ` [Workman-devel] " Vivek Goyal
2013-04-08 18:26   ` Tejun Heo
2013-04-08 23:32   ` Lennart Poettering
2013-04-09  7:37     ` Glauber Costa
2013-04-09 19:11     ` Tejun Heo
2013-04-08 17:59 ` [Workman-devel] " Vivek Goyal
2013-04-08 18:16   ` Tejun Heo [this message]
2013-04-08 18:49     ` Tejun Heo
2013-04-08 19:11     ` Vivek Goyal
2013-04-08 19:20       ` Tejun Heo
2013-04-08 19:46         ` Vivek Goyal
2013-04-08 20:02           ` Tejun Heo
2013-04-09  9:50 ` Daniel P. Berrange
2013-04-09 19:38   ` Tejun Heo
2013-04-09 19:46     ` Tejun Heo
2013-04-09 21:04       ` Serge Hallyn
2013-04-09 21:11         ` Tejun Heo
2013-04-16 11:17 ` Li Zefan
2013-04-16 17:10   ` Tejun Heo
2013-04-17  1:29     ` Li Zefan
2013-04-22 21:26 ` Tim Hockin
2013-04-22 21:41   ` Tejun Heo
2013-04-22 22:33     ` Tim Hockin
2013-06-22 23:13       ` Tim Hockin
2013-06-25  0:01         ` Tejun Heo
2013-06-25  4:07           ` Tim Hockin
2013-06-26 21:20             ` Tejun Heo
2013-06-27  0:06               ` Tim Hockin
2013-06-26 23:14                 ` David Lang
2013-06-27  1:04                 ` Tejun Heo
2013-06-27  3:42                   ` Tim Hockin
2013-06-27 17:38                     ` Tejun Heo
2013-06-27 20:46                       ` Tim Hockin
2013-06-27 21:04                         ` Tejun Heo
2013-06-28 18:44                           ` Tim Hockin
2013-06-29 16:40                             ` Tejun Heo
2015-03-03 21:53                               ` Luke Leighton
2015-03-03 21:38                       ` Luke Leighton
2015-03-03 21:17                   ` Luke Leighton
2015-03-04  5:08                     ` David Lang
2015-03-04 11:27                       ` Luke Kenneth Casson Leighton
2015-03-04 20:08                         ` David Lang
2013-06-27  5:45               ` Mike Galbraith
2013-06-27 13:22                 ` Serge Hallyn
2013-06-27 15:29                   ` Tim Hockin
2013-06-27 16:18                     ` Serge Hallyn
2015-03-03 22:00                       ` Luke Leighton
2013-06-27 17:48                   ` Tejun Heo
2013-06-27 18:14                     ` Serge Hallyn
2013-06-27 18:45                       ` Tejun Heo
2013-06-27 18:51                         ` Serge Hallyn
2013-06-27 18:52                           ` Tejun Heo
2013-06-27 20:52                       ` Tim Hockin
2015-03-03 22:08                     ` Luke Leighton
2013-06-28  9:09                   ` [Workman-devel] " Daniel P. Berrange
2013-06-28 15:53                     ` Serge Hallyn
2013-06-28 18:58                       ` Tim Hockin
2015-03-03 22:20                       ` Luke Leighton
2013-06-27 18:01                 ` Tejun Heo
2013-06-28  3:46                   ` Mike Galbraith
2013-06-28  4:09                     ` Tejun Heo
2013-06-28  4:49                       ` Mike Galbraith
2013-06-28  5:01                         ` Tejun Heo
2013-06-28  6:00                           ` Mike Galbraith
2013-06-28 15:05                           ` Michal Hocko
2013-06-28 18:01                             ` [Workman-devel] " Vivek Goyal
2013-06-28 19:59                               ` Daniel P. Berrange
2013-06-28 22:40                                 ` Serge Hallyn
2013-06-28 22:43                                   ` Tejun Heo
2013-06-30 18:38                               ` Michal Hocko
2013-07-15 18:49                                 ` Vivek Goyal
2013-07-23 14:48                                   ` Michal Hocko
2013-06-28 18:30                             ` Tejun Heo
2013-06-28 18:53                             ` Tim Hockin
2013-06-29  1:48                               ` Lennart Poettering
2013-06-29  3:05                                 ` Tim Hockin
2013-06-30 19:39                                   ` Lennart Poettering
2013-07-01  6:06                                     ` Tim Hockin
2013-07-02 23:57                                     ` Thomas Gleixner
2013-07-03  0:44                                       ` Kay Sievers
2013-07-03  7:37                                         ` Borislav Petkov
2013-07-03  9:30                                         ` Thomas Gleixner
2013-07-09 23:12                                         ` Jiri Kosina
2013-07-03 17:11                                       ` James Bottomley
2013-06-28 19:18                   ` Andy Lutomirski
2013-06-28 19:36                     ` Serge Hallyn

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=20130408181607.GI3021@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=bsingharora@gmail.com \
    --cc=cgroups@vger.kernel.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=dhaval.giani@gmail.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=lpoetter@redhat.com \
    --cc=vgoyal@redhat.com \
    --cc=workman-devel@redhat.com \
    /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

all inboxes | Powered by JetHome®