Messages in this thread | | | Date | Tue, 14 Apr 2020 17:27:13 +0100 | From | Quentin Perret <> | Subject | Re: [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
| |