Linux Container Development
 help / color / mirror / Atom feed
From: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
To: Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] new cgroup controller "fork"
Date: Fri, 04 Nov 2011 11:03:41 +0800	[thread overview]
Message-ID: <4EB3560D.7000002@cn.fujitsu.com> (raw)
In-Reply-To: <4EB30DAF.4090704-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>

于 2011年11月04日 05:54, Glauber Costa 写道:
> On 11/03/2011 06:13 PM, Brian K. White wrote:
>> On 11/3/2011 3:25 PM, Glauber Costa wrote:
>>> On 11/03/2011 05:20 PM, Max Kellermann wrote:
>>>> On 2011/11/03 20:03, Alan Cox<alan@lxorguk.ukuu.org.uk> wrote:
>>>>> Sure - I'm just not seeing that a whole separate cgroup for it is
>>>>> appropriate or a good plan. Anyone doing real resource management needs
>>>>> the rest of the stuff anyway.
>>>>
>>>> Right. When I saw Frederic's controller today, my first thought was
>>>> that one could move the fork limit code over into that controller. If
>>>> we reach a consensus that this would be a good idea, and would have
>>>> chances to get merged, I could probably take some time to refactor my
>>>> code.
>>>>
>>>> Max
>>> I'd advise you to take a step back and think if this is really needed.
>>> As Alan pointed out, the really expensive resource here is already being
>>> constrained by Frederic's controller.
>>
>> I think this really is a different knob that is nice to have as long as
>> it doesn't cost much. It's a way to set a max lifespan in a way that
>> isn't really addressed by the other controls. (I could absolutely be
>> missing something.)
>>
>> I think Max explained the issue clearly enough.
> 
> He did, indeed.
> 
>> It doesn't matter that the fork itself is supposedly so cheap.
>>
>> It's still nice to have a way to say, you may not fork/die/fork/die/fork
>> in a race.
>>
>> What's so unimaginable about having a process that you know needs a lot
>> of cpu and ram or other resources to do it's job, and you expressly want
>> to allow it to take as much of those resources as it can, but you know
>> it has no need to fork, so if it forks, _that_ is the only indication of
>> a problem, so you may only want to block it based on that.
>>
>> Sure many other processes would legitimately fork/die/fork/die a lot
>> while never exceeding a few total concurrent tasks, and for them you
>> would not want to set any such fork limit. So what?
>>
> As I said previously, he knows his use cases better than anyone else.
> If a use case can be found in which the summation of cpu+task controllers is not enough, and if this is implemented as an option to the task controller, and does not make it:
> 1) confusing,
> 2) more expensive,
> 
> then I don't see why not we shouldn't take it.

Quoted from Lennart's reply in another mail thread:

"Given that shutting down some services might involve forking off a few
things (think: a shell script handling shutdown which forks off a couple
of shell utilities) we'd want something that is between "from now on no
forking at all" and "unlimited forking". This could be done in many
different ways: we'd be happy if we could do time-based rate limiting,
but we'd also be fine with defining a certain budget of additional forks
a cgroup can do (i.e. "from now on you can do 50 more forks, then you'll
get EPERM)."

(http://lkml.org/lkml/2011/10/19/468)

The last sentence suggests he might like this fork controller.

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/containers

  parent reply	other threads:[~2011-11-04  3:03 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03 16:22 [PATCH] new cgroup controller "fork" Max Kellermann
     [not found] ` <20111103162238.27609.11515.stgit-Rjmu19FXx3rR8JxBgnUBv+rzNCUFrscg@public.gmane.org>
2011-11-03 16:43   ` Frederic Weisbecker
     [not found]     ` <20111103164302.GE8198-oHC15RC7JGTpAmv0O++HtFaTQe2KTcn/@public.gmane.org>
2011-11-03 17:16       ` Max Kellermann
     [not found]         ` <20111103171645.GA27887-Rjmu19FXx3rR8JxBgnUBv+rzNCUFrscg@public.gmane.org>
2011-11-03 17:26           ` Glauber Costa
     [not found]             ` <4EB2CEB2.7050800-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-11-03 17:48               ` Max Kellermann
     [not found]                 ` <20111103174809.GA28108-Rjmu19FXx3rR8JxBgnUBv+rzNCUFrscg@public.gmane.org>
2011-11-03 17:50                   ` Glauber Costa
     [not found]                     ` <4EB2D451.4010607-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-11-03 18:30                       ` Max Kellermann
     [not found]                         ` <20111103183018.GA28318-Rjmu19FXx3rR8JxBgnUBv+rzNCUFrscg@public.gmane.org>
2011-11-03 18:34                           ` Glauber Costa
2011-11-03 16:43   ` Glauber Costa
     [not found]     ` <4EB2C4A5.6000406-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-11-03 16:59       ` Max Kellermann
2011-11-03 17:05         ` Frederic Weisbecker
2011-11-03 18:21         ` Alan Cox
     [not found]           ` <20111103182101.5037c1e5-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2011-11-03 18:51             ` Max Kellermann
2011-11-03 18:56               ` Glauber Costa
     [not found]                 ` <4EB2E3E6.6070401-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-11-03 20:08                   ` Matt Helsley
2011-11-03 19:03               ` Alan Cox
     [not found]                 ` <20111103190330.02590426-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2011-11-03 19:20                   ` Max Kellermann
2011-11-03 19:25                     ` Glauber Costa
     [not found]                       ` <4EB2EA93.2050206-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-11-03 20:13                         ` Brian K. White
     [not found]                           ` <4EB2F5CF.5010604-goxB3+SAe6wAvxtiuMwx3w@public.gmane.org>
2011-11-03 21:54                             ` Glauber Costa
     [not found]                               ` <4EB30DAF.4090704-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-11-04  3:03                                 ` Li Zefan [this message]
     [not found]                                   ` <4EB3560D.7000002-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-11-04  4:37                                     ` KAMEZAWA Hiroyuki
2011-11-04 13:11                                     ` Glauber Costa
2011-11-04 13:59                                     ` Lennart Poettering
     [not found]                                   ` <4EB3E47E.2080003@parallels.com>
     [not found]                                     ` <4EB3E47E.2080003-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-11-04 13:38                                       ` Max Kellermann
2011-11-04 16:43                                       ` Brian K. White
2011-11-03 17:31   ` richard -rw- weinberger
  -- strict thread matches above, loose matches on Subject: below --
2011-02-17 13:31 Max Kellermann
     [not found] ` <20110217133152.4043.94951.stgit-Rjmu19FXx3rR8JxBgnUBv+rzNCUFrscg@public.gmane.org>
2011-02-17 13:50   ` KAMEZAWA Hiroyuki
2011-02-18  0:59   ` Paul Menage
     [not found] ` <20110217225010.7f79b412.kamezawa.hiroyu@jp.fujitsu.com>
     [not found]   ` <20110217225010.7f79b412.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2011-02-17 14:09     ` Max Kellermann
     [not found] ` <AANLkTi=X7rHEy9yOngogs_OQ69FJeZeQRSwvFdgnbWxo@mail.gmail.com>
     [not found]   ` <AANLkTi=X7rHEy9yOngogs_OQ69FJeZeQRSwvFdgnbWxo-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-18  9:26     ` Max Kellermann

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=4EB3560D.7000002@cn.fujitsu.com \
    --to=lizf-bthxqxjhjhxqfuhtdcdx3a@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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