mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul Menage" <menage@google.com>
To: "Ranjit Manomohan" <ranjitm@google.com>
Cc: "Thomas Graf" <tgraf@suug.ch>,
	davem@davemloft.net, akpm@linux-foundation.org, kaber@trash.net,
	lizf@cn.fujitsu.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] Traffic control cgroups subsystem
Date: Wed, 10 Sep 2008 16:04:43 -0700	[thread overview]
Message-ID: <6599ad830809101604o71b2fb82k2aca1eb0fd8ab6d8@mail.gmail.com> (raw)
In-Reply-To: <166fe7950809101556q61cb7e30m2d5e758304618f61@mail.gmail.com>

On Wed, Sep 10, 2008 at 3:56 PM, Ranjit Manomohan <ranjitm@google.com> wrote:
>>
>> The big disadvantage of this method is that it does not allow to change
>> the classid for sockets which already exist. It inherits the classid
>> at socket creation time and then sticks to it. So if you want to follow
>> this approach I'd suggest to at least store a reference to the cgroup
>> state and reference count it properly.
>>
>
> I had considered adding support for moving tasks between cgroups by
> going through all the open fds of the task and updating the sockets
> (in the cgroup attach method). It is a very heavy weight operation and
> not considered a common use case (and even undesirable at times) so I
> dropped the idea. I can add it back in if it is considered essential.
>

That's a bit different from what Thomas is suggesting (I think).

There are three options:

a) socket acquires class id at creation time from its creator task or
its parent socket. So the class id is fixed for the lifetime of the
socket

b) socket acquires a reference to a cgroup at creation time, from its
creator task or its parent socket. So the class id can be updated by
changing the cgroup's class id, but the cgroup of the socket can't be
changed. This can prevent the cgroup from being properly destroyed.

c) socket acquires a reference to a cgroup at creation time, and can
be moved to a different cgroup when tasks that reference it move
between cgroups.

Our patches use option a. Option c is too heavyweight IMO, and has
vague semantics for exactly when movement should occur. Option b
*could* be useful, if you wanted to be able to share class ids between
cgroups, *and* shuffle the sharing relationships around on the fly. I
think that Thomas is suggestion option b. I'm not sure that I see a
concrete use case for it though - Thomas, what use cases did you see?

Paul

  parent reply	other threads:[~2008-09-10 23:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-10 17:42 Ranjit Manomohan
2008-09-10 22:01 ` Thomas Graf
2008-09-10 22:56   ` Ranjit Manomohan
2008-09-10 23:00     ` David Miller
2008-09-10 23:14       ` Ranjit Manomohan
2008-09-10 23:04     ` Paul Menage [this message]
2008-09-10 23:24       ` Thomas Graf
2008-09-10 23:31         ` Paul Menage
2008-09-10 23:45           ` Thomas Graf
2008-09-10 23:51             ` Paul Menage
2008-09-11  0:07               ` Thomas Graf
2008-09-11  0:09                 ` Paul Menage
2008-09-10 23:53             ` Paul Menage
  -- strict thread matches above, loose matches on Subject: below --
2008-08-22  0:55 Ranjit Manomohan
2008-08-22  2:11 ` Li Zefan
2008-07-24 23:35 Ranjit Manomohan
2008-07-18 21:28 Ranjit Manomohan
2008-07-21  9:26 ` Li Zefan
2008-07-21 14:04 ` Patrick McHardy

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=6599ad830809101604o71b2fb82k2aca1eb0fd8ab6d8@mail.gmail.com \
    --to=menage@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=netdev@vger.kernel.org \
    --cc=ranjitm@google.com \
    --cc=tgraf@suug.ch \
    /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®