lkml.org 
[lkml]   [2015]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched, autogroup: Fix failure when writing to cpu.rt_runtime_us
> Subject: sched, autogroup: Fix failure to set cpu.rt_runtime_us
> From: Peter Zijlstra <peterz@infradead.org>
> Date: Mon Feb 9 11:53:18 CET 2015
>
> Because task_group() uses a cache of autogroup_task_group(), whoes
> output depends on sched_class, switching classes can generate
> problems.
>
> In particular, when started as fair, the cache points to the
> autogroup, so when switching to RT the tg_rt_schedulable() test fails
> for every cpu.rt_{runtime,period}_us change because now the autogroup
> has tasks and no runtime.
>
> Furthermore, going back to the previous semantics of varying
> task_group() with sched_class has the down-side that the sched_debug
> output varies as well, even though the task really is in the
> autogroup.
>
> Therefore add an autogroup exception to tg_has_rt_tasks() -- such that
> both (all) task_group() usages in sched/core now have one. And remove
> all the remnants of the variable task_group() output.
>
> Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
> Cc: Stefan Bader <stefan.bader@canonical.com>
> Reported-by: Zefan Li <lizefan@huawei.com>
> Fixes: 8323f26ce342 ("sched: Fix race in task_group()")
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>

Both patches look good to me.

Thanks!



\
 
 \ /
  Last update: 2015-02-10 02:41    [W:0.076 / U:3.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site