public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Juri Lelli <juri.lelli@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: tglx@linutronix.de, mingo@redhat.com, rostedt@goodmis.org,
	oleg@redhat.com, fweisbec@gmail.com, darren@dvhart.com,
	johan.eker@ericsson.com, p.faure@akatech.ch,
	linux-kernel@vger.kernel.org, claudio@evidence.eu.com,
	michael@amarulasolutions.com, fchecconi@gmail.com,
	tommaso.cucinotta@sssup.it, nicola.manica@disi.unitn.it,
	luca.abeni@unitn.it, dhaval.giani@gmail.com, hgu1972@gmail.com,
	paulmck@linux.vnet.ibm.com, raistlin@linux.it,
	insop.song@ericsson.com, liming.wang@windriver.com,
	jkacur@redhat.com, harald.gustafsson@ericsson.com
Subject: Re: [RFC][PATCH 00/15] sched: SCHED_DEADLINE v5
Date: Mon, 28 May 2012 11:06:25 +0200	[thread overview]
Message-ID: <4FC34011.4040505@gmail.com> (raw)
In-Reply-To: <1337942569.9783.183.camel@laptop>

Hi,

On 05/25/2012 12:42 PM, Peter Zijlstra wrote:
> On Wed, 2012-05-23 at 23:42 +0200, Juri Lelli wrote:
>> Still missing/incomplete:
>>    - (c)group based bandwidth management, and maybe scheduling;
>
> The b/w stuff for cgroups shouldn't be particularly hard, right? It
> shouldn't be more than ensuring the utilization sum of all children
> stays below the set value.
>
> Or am I missing something?
>

Yes, the sum of the bandwidths of entities (tasks and groups) belonging
to a group stays below its own set bandwidth. Actually, I quoted this
sentence from code that was included in previous versions (removed since
v3). I tried to build historical reasons why it was removed, but I failed
:-). Anyway, shouldn't be too hard to adapt that code to the new version
and see if it will raise any new concern.

>>    - bandwidth inheritance (to replace deadline/priority inheritance);
>
> Yes please, but this is somewhat longer term, I think the band-aids in
> place are sufficient to allow us to move fwd.
>

Yes, but I fear it could affect next point. Anyway, I agree that this is
something that I would consider long-term.

>>    - access control for non-root users (and related security concerns to
>>      address).
>
> Right, so could you detail what all is needed to allow regular users to
> create dl tasks?
>

Ok, I'll try to summarize what I think it would be a _minimal_ set of
requirements:

  o  define deadline(period) and runtime utilization caps; as it was in v3,
     RLIMIT_DLDLINE would be the minimum value a user task can use as its
     own deadline, while (as you pointed out) RLIMIT_DLRTIME would be a per
     user utilization cap, but it would also be tracked in user_struct to
     enforce a max utilization cap per user.
  
  o  At server parameters change/destruction some mechanism is needed to
     prevent possible attacks such as (ref. Tommaso's paper):

        - an app creates a task with an associated server;
        - when the runtime (budget) is about to be exhausted, the app
          destroys the server, returning the task to the default sched
          policy;
        - then, the app immediately creates a new server for the task,
          and keeps repeating the loop over and over.

     A possible solution is that, whenever a server is destroyed, the
     system doesn't completely forget about its existence, but it must
     continue to consider its utilization as not available until the
     next server period expired.
  
  o  The only "big problem" I fear is related to the current deadline
     inheritance mechanism. As Steven pointed out during the last review,
     a task could force more bandwidth than was allowed if:

        - it takes a futex;
        - it is boosted while holding it;
        - never releases the futex;

     and this is sadly achievable since, if boosted, a task inherits top
     waiter parameters and the enforcement mechanism is temporarily
     disabled for it.
  
Thanks and regards,

- Juri

  parent reply	other threads:[~2012-05-28  9:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-23 21:42 [RFC][PATCH 00/15] sched: SCHED_DEADLINE v5 Juri Lelli
2012-05-23 21:42 ` [PATCH 01/15] math128: Introduce various 128bit primitives Juri Lelli
2012-05-23 21:42 ` [PATCH 02/15] math128, x86_64: Implement {mul,add}_u128 in 64bit asm Juri Lelli
2012-05-23 21:42 ` [PATCH 03/15] sched: add sched_class->task_dead Juri Lelli
2012-05-23 21:42 ` [PATCH 04/15] sched: add extended scheduling interface Juri Lelli
2012-05-23 21:42 ` [PATCH 05/15] sched: SCHED_DEADLINE structures & implementation Juri Lelli
2012-05-23 21:42 ` [PATCH 06/15] sched: SCHED_DEADLINE SMP-related data structures & logic Juri Lelli
2012-05-23 21:42 ` [PATCH 07/15] sched: SCHED_DEADLINE avg_update accounting Juri Lelli
2012-05-23 21:42 ` [PATCH 08/15] sched: add period support for -deadline tasks Juri Lelli
2012-05-23 21:42 ` [PATCH 09/15] sched: add schedstats " Juri Lelli
2012-05-23 21:42 ` [PATCH 10/15] sched: add latency tracing " Juri Lelli
2012-05-23 21:42 ` [PATCH 11/15] rtmutex: turn the plist into an rb-tree Juri Lelli
2012-05-23 21:42 ` [PATCH 12/15] sched: drafted deadline inheritance logic Juri Lelli
2012-05-23 21:42 ` [PATCH 13/15] sched: add bandwidth management for sched_dl Juri Lelli
2012-05-25 10:38   ` Peter Zijlstra
2012-05-26 11:07     ` Juri Lelli
2012-05-29  9:58       ` Peter Zijlstra
2012-05-29 12:18         ` Juri Lelli
2012-05-29 12:31           ` Peter Zijlstra
2012-05-30 15:34             ` Juri Lelli
2012-05-23 21:42 ` [PATCH 14/15] sched: speed up -dl pushes with a push-heap Juri Lelli
2012-05-23 21:42 ` [PATCH 15/15] sched: add sched_dl documentation Juri Lelli
2012-05-25 10:42 ` [RFC][PATCH 00/15] sched: SCHED_DEADLINE v5 Peter Zijlstra
2012-05-25 11:04   ` Thomas Gleixner
2012-05-28  9:06   ` Juri Lelli [this message]
2012-05-29 10:07     ` Peter Zijlstra

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=4FC34011.4040505@gmail.com \
    --to=juri.lelli@gmail.com \
    --cc=claudio@evidence.eu.com \
    --cc=darren@dvhart.com \
    --cc=dhaval.giani@gmail.com \
    --cc=fchecconi@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=harald.gustafsson@ericsson.com \
    --cc=hgu1972@gmail.com \
    --cc=insop.song@ericsson.com \
    --cc=jkacur@redhat.com \
    --cc=johan.eker@ericsson.com \
    --cc=liming.wang@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.abeni@unitn.it \
    --cc=michael@amarulasolutions.com \
    --cc=mingo@redhat.com \
    --cc=nicola.manica@disi.unitn.it \
    --cc=oleg@redhat.com \
    --cc=p.faure@akatech.ch \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=raistlin@linux.it \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tommaso.cucinotta@sssup.it \
    /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