Re: [systemd-devel] Question: who should set up the cpuset cgroup

2013-09-22 Thread Gao feng
On 09/18/2013 12:56 AM, Lennart Poettering wrote:
 On Tue, 17.09.13 17:45, Lennart Poettering (lenn...@poettering.net) wrote:
 
 1, set up when systemd creates cpuset cgroup for machine.slice?
 2, the programs which create the machines?
 3, other ideas? kernel?

 I have the suspicion that we need to propagate this down from the root
 of the hierarchy as soon as a leaf sets a cpu set.

 Let's say the root has enabled all cpus (which is the default after
 all), and you enable only a subset for a leaf 2 levels down, but do not
 specify anything for the slice that is in the middle, then the cpuset of
 the root should be propagated down.
   
 Consider this hierarchy:

 -.slice 
/   \
   / \
 machine.slicesystemd.slice
  |
  |
 machine-customer1.slice
  |
  |
  a.scope

 If a.scope gets a cpuset assigned, and neither machine.slice nor
 machine-customer1.slice have any, then the cpuset of -.slice should be
 inherited into machine.slice and then further into
 machine-customer1.slice, if you follow what I mean?
 
 So I talked to Tejun about this too, and he said that cpuset is too
 broken in the kernel for us to wrap it right now in systemd. As soon as
 the kernel is fixed it will provide a proper propagation logic in the
 kernel natively anyway, so we shouldn't bother with this in userspace.
 

Glad to hear this. :)
Thanks!

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Question: who should set up the cpuset cgroup

2013-09-17 Thread Lennart Poettering
On Mon, 16.09.13 11:17, Gao feng (gaof...@cn.fujitsu.com) wrote:

 Hi
 
 I'm working on adding set cpuset cgroup support for systemd.
 this work almost finished. but I faced a problem.
 
 As we know, if we create a machine,the cgroup for this machine
 will be created as well. and the cgroup of this machine is a
 sub-directory of machine.slice(or other slices..). And if the
 cpuset of machine.slice is unset. the setting of cpuset for this
 machine will failed. since the cpuset.mems and cpuset.cpus of
 machine.slice is null.
 
 The question is who should set up the cpuset cgroup of machine.slice?
 
 1, set up when systemd creates cpuset cgroup for machine.slice?
 2, the programs which create the machines?
 3, other ideas? kernel?

I have the suspicion that we need to propagate this down from the root
of the hierarchy as soon as a leaf sets a cpu set.

Let's say the root has enabled all cpus (which is the default after
all), and you enable only a subset for a leaf 2 levels down, but do not
specify anything for the slice that is in the middle, then the cpuset of
the root should be propagated down.
  
Consider this hierarchy:

-.slice 
   /   \
  / \
machine.slicesystemd.slice
 |
 |
machine-customer1.slice
 |
 |
 a.scope

If a.scope gets a cpuset assigned, and neither machine.slice nor
machine-customer1.slice have any, then the cpuset of -.slice should be
inherited into machine.slice and then further into
machine-customer1.slice, if you follow what I mean?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Question: who should set up the cpuset cgroup

2013-09-17 Thread Lennart Poettering
On Tue, 17.09.13 17:45, Lennart Poettering (lenn...@poettering.net) wrote:

  1, set up when systemd creates cpuset cgroup for machine.slice?
  2, the programs which create the machines?
  3, other ideas? kernel?
 
 I have the suspicion that we need to propagate this down from the root
 of the hierarchy as soon as a leaf sets a cpu set.
 
 Let's say the root has enabled all cpus (which is the default after
 all), and you enable only a subset for a leaf 2 levels down, but do not
 specify anything for the slice that is in the middle, then the cpuset of
 the root should be propagated down.
   
 Consider this hierarchy:
 
 -.slice 
/   \
   / \
 machine.slicesystemd.slice
  |
  |
 machine-customer1.slice
  |
  |
  a.scope
 
 If a.scope gets a cpuset assigned, and neither machine.slice nor
 machine-customer1.slice have any, then the cpuset of -.slice should be
 inherited into machine.slice and then further into
 machine-customer1.slice, if you follow what I mean?

So I talked to Tejun about this too, and he said that cpuset is too
broken in the kernel for us to wrap it right now in systemd. As soon as
the kernel is fixed it will provide a proper propagation logic in the
kernel natively anyway, so we shouldn't bother with this in userspace.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Question: who should set up the cpuset cgroup

2013-09-15 Thread Gao feng
Hi

I'm working on adding set cpuset cgroup support for systemd.
this work almost finished. but I faced a problem.

As we know, if we create a machine,the cgroup for this machine
will be created as well. and the cgroup of this machine is a
sub-directory of machine.slice(or other slices..). And if the
cpuset of machine.slice is unset. the setting of cpuset for this
machine will failed. since the cpuset.mems and cpuset.cpus of
machine.slice is null.

The question is who should set up the cpuset cgroup of machine.slice?

1, set up when systemd creates cpuset cgroup for machine.slice?
2, the programs which create the machines?
3, other ideas? kernel?

Thanks!
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel