Re: [PATCH] optional non-interactive mode for cpu scheduler

From: Con Kolivas
Date: Tue Nov 02 2004 - 08:07:30 EST


Ingo Molnar wrote:
* Con Kolivas <kernel@xxxxxxxxxxx> wrote:


optional non-interactive mode for cpu scheduler


i think the following scheme would work better:

- introduce a new SCHED_CPUBOUND policy
- return ->static_prio + 5 for such tasks
- keep their timeslice based off ->static_prio

the point is this: such tasks would thus be automatically and
perpetually considered 'CPU hogs'. Applications cannot abuse this
mechanism because they get the maximum 'penalty'.

and as a bonus, no magic sysctl and inherently more flexibility.

(note that this scheme has advantages above nice +5 because nice +5
still has the interactivity stuff on which can create priority
fluctuations and may thus affect workloads.)

if you agree with this scheme, would you be interested in implementing
this?

The better cpu proportion guarantee without low latency of such a policy would be desirable to video encoding in the background while capturing in the foreground as one immediately recognisable purpose, and there are likely numerous others, so I agree it's a good idea.

However the non-interactive mode addresses a number of different needs that seem to have come up. Specifically:
I have had users report great success with such a mode on my own scheduler in multiple X session setups where very choppy behaviour occurs in mainline.
Many high performance computing people do not wish interactivity code modifying their choice of latency/distribution - admittedly this is a soft one.

What are your thoughts on this?

Con

Attachment: signature.asc
Description: OpenPGP digital signature