mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Glyn Normington <gnormington@gopivotal.com>
Cc: linux-kernel@vger.kernel.org, Li Zefan <lizefan@huawei.com>
Subject: Re: [PATCH] control groups: documentation improvements
Date: Mon, 10 Mar 2014 10:20:14 -0400	[thread overview]
Message-ID: <20140310142014.GC25290@htj.dyndns.org> (raw)
In-Reply-To: <531DC971.6020208@gopivotal.com>

Hey,

On Mon, Mar 10, 2014 at 02:17:21PM +0000, Glyn Normington wrote:
> Then we missed how to create a hierarchy with no associated
> subsystems. The only way I can think of is to use mount, specify no
> subsystems on -o (which defaults to all the subsystems defined in
> the kernel), and run it in a kernel with no subsystems defined
> (which seems unlikely these days).
>
> Is that what you had in mind or is there some other way of creating
> a hierarchy with no subsystems attached?

Hierarchy name should be specified "-o name=" for hierarchies w/o any
controllers.

> >>Clarify that subsystems may be attached to multiple hierarchies,
> >>although this isn't very useful, and explain what happens.
> >And a subsystem may only be attached to a single hierarchy.
>
> Perhaps that's what should happen, but the following experiment
> demonstrates a subsystem being attached to two hierarchies:
> 
> $ pwd
> /home/vagrant
> $ mkdir mem1
> $ mkdir mem2
> $ sudo su
> # mount -t cgroup -o memory none /home/vagrant/mem1
> # mount -t cgroup -o memory none /home/vagrant/mem2
> # cd mem1
> # mkdir inst1
> # ls inst1
> cgroup.clone_children  memory.failcnt ...
> # ls ../mem2
> cgroup.clone_children  inst1 memory.limit_in_bytes ...
> # cd inst1
> # echo 1000000 > memory.limit_in_bytes
> # cat memory.limit_in_bytes
> 1003520
> # cat ../../mem2/inst1/memory.limit_in_bytes
> 1003520
> # echo $$ > tasks
> # cat tasks
> 1365
> 1409
> # cat ../../mem2/inst1/tasks
> 1365
> 1411

You're mounting the same hierarchy twice.  Those are two views into
the same hierarchy.

Thanks.

-- 
tejun

  reply	other threads:[~2014-03-10 14:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-10 11:39 Glyn Normington
2014-03-10 14:07 ` Tejun Heo
2014-03-10 14:17   ` Glyn Normington
2014-03-10 14:20     ` Tejun Heo [this message]
2014-03-13 16:04       ` Glyn Normington
2014-03-14  1:33         ` Li Zefan
2014-03-14 13:30           ` Glyn Normington
2014-03-14 14:01             ` Tejun Heo
2014-03-14 14:04               ` Glyn Normington
2014-04-02 12:43                 ` [PATCH v2] " Glyn Normington
2014-04-02 13:17                   ` [PATCH v3] " Glyn Normington
2014-04-16 21:00                     ` Tejun Heo
2014-04-17 10:46                       ` [PATCH v4] " Glyn Normington
2014-04-17 13:16                         ` Tejun Heo
2014-04-17 13:45                           ` Glyn Normington
2014-04-17 13:55                             ` Tejun Heo
2014-04-17 14:51                               ` Glyn Normington
2014-04-17 14:57                                 ` Tejun Heo

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=20140310142014.GC25290@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=gnormington@gopivotal.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.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®