Re: [RFC 2/5] sched: Add CPU rate soft caps

From: Mike Galbraith
Date: Fri May 26 2006 - 07:29:19 EST


On Fri, 2006-05-26 at 21:17 +1000, Con Kolivas wrote:
> On Friday 26 May 2006 21:15, Mike Galbraith wrote:
> > On Fri, 2006-05-26 at 20:48 +1000, Con Kolivas wrote:
> > > On Friday 26 May 2006 14:20, Peter Williams wrote:
> > > > 3. Enforcement of caps is not as strict as it could be in order to
> > > > reduce the possibility of a task being starved of CPU while holding
> > > > an important system resource with resultant overall performance
> > > > degradation. In effect, all runnable capped tasks will get some amount
> > > > of CPU access every active/expired swap cycle. This will be most
> > > > apparent for small or zero soft caps.
> > >
> > > The array swap happens very frequently if there are nothing but heavily
> > > cpu bound tasks, which is not an infrequent workload. I doubt the zero
> > > caps are very effective in that environment.
> >
> > Hmm. I think that came out kinda back-assward. You meant "the array
> > swap happens very frequently _unless_..." No?
>
> No I didn't. If all you are doing is compiling code then the array swap will
> happen often as they will always use up their full timeslice and expire.
> Therefore an array swap will follow shortly afterwards.

Afterward being possibly ages. Frequent array switch happens when you
have mostly sleepy processes, not cpu bound. But whatever.

> > But anyway, I can't think of any reason to hold back an uncontested
> > resource.
>
> If you are compiling applications it's a contested resource.

These zero capped tasks are at the bottom of the heap. They won't be
selected if there's any other runnable task, so it's not contested.

-Mike

-
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/