All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Peter Williams <pwil3058@bigpond.net.au>
Cc: Andrew Morton <akpm@osdl.org>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Con Kolivas <kernel@kolivas.org>
Subject: Re: [PATCH] sched: Add SCHED_BGND (background) scheduling policy
Date: Wed, 5 Jul 2006 10:19:34 +0200	[thread overview]
Message-ID: <20060705081934.GA1898@elte.hu> (raw)
In-Reply-To: <44AB726B.8070602@bigpond.net.au>


* Peter Williams <pwil3058@bigpond.net.au> wrote:

> >>+static inline void inc_mutex_count(void)
> >>+{
> >>+	current->mutexes_held++;
> >>+}
> >>+
> >>+static inline void dec_mutex_count(void)
> >>+{
> >>+	current->mutexes_held--;
> >>+}
> >>+
> >
> >NACK! This whole patch is way too intrusive for such a relatively small 
> >gain.
> >
> >also, if something doesnt hold a mutex, it might still be unsafe to 
> >background it! For example if it holds a semaphore. Or an rwsem. Or any 
> >other kernel resource that has exclusion semantics.
> >
> >so unless this patch gets _much_ less complex and much less intrusive, 
> >we'll have to stay with SCHED_BATCH and nice +19.
> 
> This means being less strict but (as you imply) that may be not much 
> better than nice +19.  I'll have a look at it.

it's way too much pain for little gain.

> Of course, a comprehensive (as opposed to RT only) priority 
> inheritance mechanism would make the "safe/unsafe to background" 
> problem go away and make this patch very simple.  Any plans in that 
> direction?

that seems quite unlikely to happen. I think you are missing the biggest 
issue: for RT, if the priority inheritance mechanism does not extend to 
a given scheduling pattern it causes longer latencies, but no harm is 
done otherwise. But for SCHED_BGND we'd have to make sure _every_ place 
is priority-inversions safe - otherwise we risk a potential local DoS if 
a task with a critical resource is backgrounded! That's plain impossible 
to achieve.

	Ingo

  parent reply	other threads:[~2006-07-05  8:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-04 23:35 [PATCH] sched: Add SCHED_BGND (background) scheduling policy Peter Williams
2006-07-05  0:14 ` Con Kolivas
2006-07-05  0:49   ` Peter Williams
2006-07-05  0:52     ` Con Kolivas
2006-07-05  8:05     ` Andreas Mohr
2006-07-05 14:04       ` Jan Engelhardt
2006-07-05  0:44 ` Con Kolivas
2006-07-05  1:15   ` Peter Williams
2006-07-05  1:33     ` Con Kolivas
2006-07-05  4:20       ` Valdis.Kletnieks
2006-07-05  3:06   ` Peter Williams
2006-07-05  6:35 ` Ingo Molnar
2006-07-05  8:03   ` Peter Williams
2006-07-05  8:15     ` Arjan van de Ven
2006-07-05  8:19     ` Ingo Molnar [this message]
2006-07-05 17:40       ` Nick Piggin
2006-07-05 11:42 ` Mike Galbraith
2006-07-05 13:59   ` Peter Williams
2006-07-05 14:18     ` Peter Williams
2006-07-05 14:48     ` Mike Galbraith
2006-07-06 23:50       ` Peter Williams

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=20060705081934.GA1898@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@osdl.org \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=pwil3058@bigpond.net.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.