linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Query on Linux process sheduling
@ 2012-03-24 11:55 B.Vinai Kumar
  2012-03-24 14:39 ` Jonathan Corbet
  0 siblings, 1 reply; 3+ messages in thread
From: B.Vinai Kumar @ 2012-03-24 11:55 UTC (permalink / raw)
  To: linux-kernel

Hi Guys,

I have embedded box running 2.6.28.9 linux kernel and running 6 Real
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

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

Thanks,
Vinai.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Query on Linux process sheduling
  2012-03-24 11:55 Query on Linux process sheduling B.Vinai Kumar
@ 2012-03-24 14:39 ` Jonathan Corbet
  2012-04-02 13:00   ` B.Vinai Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Corbet @ 2012-03-24 14:39 UTC (permalink / raw)
  To: B.Vinai Kumar; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Query on Linux process sheduling
  2012-03-24 14:39 ` Jonathan Corbet
@ 2012-04-02 13:00   ` B.Vinai Kumar
  0 siblings, 0 replies; 3+ messages in thread
From: B.Vinai Kumar @ 2012-04-02 13:00 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: linux-kernel

Hi Jon,

Thanks for reply.

As you said all the real time process are scheduled in the 50ms, when
I set the period time value and run time value to "950000" us.

What is the risk when we change the default values?

When I completely disabled this feature. (by writing "-1" to run time
value), then also I see all the real time process are always
scheduled.

Thanks,
Vinai.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-02 13:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-24 11:55 Query on Linux process sheduling B.Vinai Kumar
2012-03-24 14:39 ` Jonathan Corbet
2012-04-02 13:00   ` B.Vinai Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).