lkml.org 
[lkml]   [2020]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched/core: Fix reset-on-fork from RT with uclamp
On Tuesday 14 Apr 2020 at 12:21:28 (-0400), Joel Fernandes wrote:
> Shouldn't this be conditional on p->sched_reset_on_fork instead of deleting
> the code?

Right, it's not obvious from the diff, but this code _is_ conditional on
p->sched_reset_on_fork already. This is what the whole function looks
like with my patch applied:

---8<---
static void uclamp_fork(struct task_struct *p)
{
enum uclamp_id clamp_id;

for_each_clamp_id(clamp_id)
p->uclamp[clamp_id].active = false;

if (likely(!p->sched_reset_on_fork))
return;

for_each_clamp_id(clamp_id) {
unsigned int clamp_value = uclamp_none(clamp_id);

uclamp_se_set(&p->uclamp_req[clamp_id], clamp_value, false);
}
}
--->8---

Thanks,
Quentin

\
 
 \ /
  Last update: 2020-04-14 18:27    [W:0.200 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site