[lkml]   [2010]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] sched: Buggy comparison in check_preempt_tick
On Fri, 2010-12-24 at 16:26 -0800, Venkatesh Pallipadi wrote:
> A preempt comparison line in check_preempt_tick has two bugs.
> * It compares signed and unsigned quantities, which breaks when signed
> quantity happens to be negative

Oops, that's a bug.

> * It compares runtime and vruntime, which breaks when there are niced tasks

This imho isn't.

vruntimes advance at different rates for differently weighted tasks, so
they're already weighted, as is ideal_runtime.

For wakeup preemption we use wakeup_gran() as the weighted ruler to
limit spread. This test just uses a different weighted ruler for the
same purpose at tick time, one already computed.

If you're a heavily niced task, you were very likely booted before you
got this far. If you haven't run for considerable wall time, you won't
get further, you keep on running. You only get booted if giving you a
full wall slice will spread vruntimes too much, for which you'll pay if
you keep running, and leftmost will pay now if we don't boot you.


 \ /
  Last update: 2010-12-25 08:53    [W:0.072 / U:0.788 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site