lkml.org 
[lkml]   [2014]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] sched/deadline: Fix bad accounting of nr_running
On Tue, Feb 18, 2014 at 09:50:12PM -0500, Steven Rostedt wrote:
>
> > Rationale for this odd behavior is that, when a task is throttled, it
> > is removed only from the dl_rq, but we keep it on_rq (as this is not
> > a "full dequeue", that is the task is not actually sleeping). But, it
> > is also true that, while throttled a task behaves like it is sleeping
> > (e.g., its timer will fire on a new CPU if the old one is dead). So,
> > Steven's fix sounds also semantically correct.
>
> Actually, it seems that I was hitting it again, but this time getting a
> negative number. OK, after looking at the code a bit more, I think we
> should update the runqueue nr_running only when the task is officially
> enqueued and dequeued, and all accounting within, will not touch that
> number.

But if the task is throttled it should still very much decrement the
number. There's places that very much rely on nr_running be exactly the
number of runnable tasks.


\
 
 \ /
  Last update: 2014-02-19 10:21    [W:2.575 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site