public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Zefan Li <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	Mike Galbraith
	<umgwanakikbuti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Cgroups <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] sched: Relax a restriction in sched_rt_can_attach()
Date: Tue, 5 May 2015 15:00:48 -0400	[thread overview]
Message-ID: <20150505190048.GY1971@htj.duckdns.org> (raw)
In-Reply-To: <alpine.DEB.2.11.1505052007140.4225@nanos>

Hello, Thomas.

On Tue, May 05, 2015 at 08:29:28PM +0200, Thomas Gleixner wrote:
> I fully agree and after reading through this thread I really have to
> say that this whole notion of relax the admission control and then try
> to magically converge to the resource limits is horrible in all
> aspects.

This comes down to controllers allowing limits to be configured
current usage.  We need to allow and define what happens in that
situation and moving a process into a full cgroup inherently follows
the same pattern albeit from the other direction.

> The idea of allowing overcommitment and magically converging to back
> to the limits yells heuristics all over the place and we all know how
> reliable heuristics are.

It's not magic heuristics.  This is a core part of normal operation.

> As Peter said several times: hard failure is good and desired. It's a
> very clear information on which people can act on. If the failures
> modes are nilly-willy today, as you wrote somewhere, then we need to
> fix that and make them consistent and understandable and not replace
> them by half baken heuristics which postpone the failure to some point
> where it is even less understandable.

There are no such magic heuristics because controllers need well
defined behaviors when current is above limit anyway and behave
exactly the same way no matter how that state is reached.  For
resources like RR slices, this doesn't work and that's why this is an
issue, so yeah this is the process of finding out what must be able to
fail.

> If there are issues with run-away problems, i.e. upping a resource
> limit which gets eaten up from the existing tasks before you can admit
> a new one, then your magic convergence thing is again the wrong
> answer. The right approach is:
> 
>       1) Up the limit and make a reservation at the same time
>       2) Admit the new task and allow it to consume the reservation
>       3) Set it effective

I don't really think this is a scenario we need to worry about.  If we
choose to fail migration, let's just fail it.  There's no point in
building a mechanism to work around malbehavior from its users.

> > Are you really going to force us to abandon cgroups and invent yet
> > another grouping thing?
> 
> Sigh no. I think cgroups can be fixed, if we just adhere to the basic
> principles of hierarchical resource management and remove/reject all
> magic "we'll fix that for you" nonsense.

So, let's do -EBUSY for hard resource failures which have to be exact.

Thanks.

-- 
tejun

  reply	other threads:[~2015-05-05 19:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04  0:54 [PATCH] sched: Relax a restriction in sched_rt_can_attach() Zefan Li
     [not found] ` <5546C34C.7050202-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-05-04  3:13   ` Mike Galbraith
     [not found]     ` <1430709236.3129.42.camel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-04  4:39       ` Zefan Li
     [not found]         ` <5546F80B.3070802-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-05-04  5:10           ` Mike Galbraith
     [not found]             ` <1430716247.3129.44.camel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-04  5:39               ` Mike Galbraith
     [not found]                 ` <1430717964.3129.62.camel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-04  9:11                   ` Zefan Li
     [not found]                     ` <554737AE.5040402-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-05-04 12:08                       ` Mike Galbraith
2015-05-04 12:37                       ` Peter Zijlstra
2015-05-04 14:09                         ` Mike Galbraith
     [not found]                           ` <1430748582.3166.16.camel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-05  3:46                             ` Zefan Li
     [not found]                               ` <55483CF8.8030908-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-05-05  6:02                                 ` Mike Galbraith
     [not found]                         ` <20150504123738.GZ21418-ndre7Fmf5hadTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2015-05-05  3:54                           ` Zefan Li
2015-05-05 14:10                             ` Peter Zijlstra
2015-05-05 14:18                               ` Tejun Heo
2015-05-05 15:19                                 ` Peter Zijlstra
2015-05-05 16:31                                   ` Tejun Heo
2015-05-05 19:00                                     ` Peter Zijlstra
     [not found]                                       ` <20150505190057.GR23123-ndre7Fmf5hadTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2015-05-05 19:06                                         ` Tejun Heo
     [not found]                                           ` <20150505190603.GZ1971-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2015-05-06  8:49                                             ` Peter Zijlstra
2015-05-05 14:41                         ` Tejun Heo
2015-05-05 15:11                           ` Peter Zijlstra
2015-05-05 16:13                             ` Tejun Heo
2015-05-05 16:50                               ` Peter Zijlstra
2015-05-05 18:29                                 ` Thomas Gleixner
2015-05-05 19:00                                   ` Tejun Heo [this message]
2015-05-06  9:12                                     ` Thomas Gleixner
2015-05-05 18:31                                 ` Tejun Heo
2015-05-05 14:09                   ` 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=20150505190048.GY1971@htj.duckdns.org \
    --to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=umgwanakikbuti-Re5JQEeQqe8AvxtiuMwx3w@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