Re: SCHED_IDLE documentation

From: Michael Kerrisk
Date: Mon Mar 03 2008 - 07:32:17 EST


Ingo,

> > * What's the difference between SCHED_IDLE and SCHED_BATCH?
>
> SCHED_BATCH can still have nice levels from -20 to +19, it is a modified
> SCHED_OTHER/SCHED_NORMAL for "throughput oriented" workloads.

So, suppose we have two CPU intensive jobs, one SCHED_OTHER and the
other SCHED_BATCH. If they have the same nice value, will/should the
scheduler favour one over the other?

I've done some testing on 2.6.25-rc2, x86-32 for this case, and it
appears that the two jobs are treated the same by the scheduler (each
gets 50% of CPU). Is that expected behavior? If it is, can you give
an example where scheduling SCHED_OTHER versus SCHED_BATCH should show
a difference in the amount of CPU received by each process?

> SCHED_IDLE overrides the nice settings and it means a "super idle"
> workload.

Tested on 2.6.25-rc2, x86-32. Two CPU intensive jobs, one
SCHED_OTHER, nice=+19, the other SCHED_IDLE. The SCHED_OTHER job gets
~88% of CPU. So SCHED_IDLE does indeed give a "super low nice"
effect.

Cheers,

Michael

--
Michael Kerrisk
Maintainer of the Linux man-pages project
http://www.kernel.org/doc/man-pages/
Want to report a man-pages bug? Look here:
http://www.kernel.org/doc/man-pages/reporting_bugs.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/