public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: "B.Vinai Kumar" <vinaibangala2001@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Query on Linux process sheduling
Date: Sat, 24 Mar 2012 08:39:43 -0600	[thread overview]
Message-ID: <20120324083943.1db775e5@lwn.net> (raw)
In-Reply-To: <CAP=ejEsGRF2i0Rr_W8cNZgJ8W+PHzHNpVRsBtMTmfEiVro+Kjw@mail.gmail.com>

On Sat, 24 Mar 2012 17:25:41 +0530
"B.Vinai Kumar" <vinaibangala2001@gmail.com> wrote:

> I have embedded box running 2.6.28.9 linux kernel and running 6 Real

Wow...ancient history :)

> time task threads (With SCHED_RR as scheduling policy).
> Together all the 6 threads running is consuming around 85% of CPU,
> which is expected.
> 
> All the threads have a 10ms of cycle.
> 
> The issue is for every second I have observed that for 50ms these Real
> time task threads are not scheduling at all. During this 50ms
> the process swapper/idle task is being scheduled(pid 0).
> 
> Is this the behaviour is due to these values?
> 
> # cat /proc/sys/kernel/sched_rt_period_us
> 1000000
> # cat /proc/sys/kernel/sched_rt_runtime_us
> 950000

Indeed, you're on the right track.  The scheduler preserves a little bit
of time for non-RT tasks to give you a chance to recover if something goes
totally nuts.

> What changes can be done to the kernel so that the Real time task
> threads get scheduled in that 50ms interval too?

Setting those two knobs to the same value should do the trick, but it does
increase the risk of losing control of the system.  See
Documentation/scheduler/sched-rt-group.txt for more information on how
these knobs work.

jon

  reply	other threads:[~2012-03-24 14:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-24 11:55 Query on Linux process sheduling B.Vinai Kumar
2012-03-24 14:39 ` Jonathan Corbet [this message]
2012-04-02 13:00   ` B.Vinai Kumar

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=20120324083943.1db775e5@lwn.net \
    --to=corbet@lwn.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vinaibangala2001@gmail.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