public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>,
	Patrick McHardy <kaber@trash.net>, Ingo Molnar <mingo@elte.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Bharata B Rao <bharata@linux.vnet.ibm.com>,
	Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>,
	Balbir Singh <balbir@in.ibm.com>
Subject: Re: asterisk hangs with RT priority
Date: Wed, 24 Dec 2008 22:32:43 +0100	[thread overview]
Message-ID: <1230154363.24082.10.camel@lappy.programming.kicks-ass.net> (raw)
In-Reply-To: <20081224203747.GA32060@gondor.apana.org.au>

On Thu, 2008-12-25 at 07:37 +1100, Herbert Xu wrote:
> On Wed, Dec 24, 2008 at 07:12:25PM +0530, Dhaval Giani wrote:
> > 
> > Hmm. Do you have CONFIG_FAIR_USER_SCHED set on?
> 
> I can't find such a config option, but
> 
> $ grep SCHED .config
> CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
> CONFIG_GROUP_SCHED=y
> CONFIG_FAIR_GROUP_SCHED=y
> CONFIG_RT_GROUP_SCHED=y
> CONFIG_USER_SCHED=y
> # CONFIG_CGROUP_SCHED is not set

> CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
> CONFIG_SCHED_HRTICK=y

So you have uid-group scheduling and RT-group scheduling enabled (a
feature that's experimental for real and has never been enabled by
default), looking at the sys_setuid() code, the real uid change is done
by switch_uid() and that doesn't have a failable scheduler hook.

The thing is, I suspect the uid you switch to doesn't have a RT runtime
quota configured, therefore the RT task that gets placed in it by
switch_uid() doesn't get to run.

[ Please read Documentation/scheduler/sched-rt-group.txt
  when you enable RT group scheduling ]

The correct thing would be for switch_uid() (or set_user) to fail with
-EINVAL, much like cpu_cgroup_can_attach() currently does for cgroup
grouping.

After that it demonstrates a bug in your test program, which fails to
check errors ;-)



  reply	other threads:[~2008-12-24 21:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-18 16:10 asterisk hangs with RT priority Patrick McHardy
2008-05-20  9:59 ` Patrick McHardy
2008-12-24 11:36 ` Herbert Xu
2008-12-24 13:42   ` Dhaval Giani
2008-12-24 20:37     ` Herbert Xu
2008-12-24 21:32       ` Peter Zijlstra [this message]
2008-12-24 22:07         ` Herbert Xu
2008-12-25  7:52           ` 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=1230154363.24082.10.camel@lappy.programming.kicks-ass.net \
    --to=a.p.zijlstra@chello.nl \
    --cc=balbir@in.ibm.com \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=dhaval@linux.vnet.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=vatsa@linux.vnet.ibm.com \
    /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