lkml.org 
[lkml]   [2015]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 3/7] sched: Allow balance callbacks for check_class_changed()
On Tue, Jun 02, 2015 at 07:27:19PM +0300, Kirill Tkhai wrote:
> > + * task_dead_dl() will cancel our timer if we happen to die while
> > + * its still pending.
>
> task_dead_dl() is called for tasks of deadline class only. So if we do that,
> the timer may be executed after final task's dead.

Indeed; sleep deprived brain misses the obvious :/

I can't seem to come up with anything much better than pulling that
hrtimer_cancel() into finish_task_switch(), however sad that is.

Something like:

for_each_class(class) {
if (class->task_dead)
class->task_dead(prev);
}

Would be nicest, but will slow down the common case. And a callback list
has the downside of having to preallocate entries for every task,
causing mostly pointless memory overhead.




\
 
 \ /
  Last update: 2015-06-03 10:01    [W:0.122 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site