[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a954a83b-ff3c-1fc2-a70e-7d1482502ed6@linux.ibm.com>
Date: Tue, 25 Feb 2020 13:46:19 +0530
From: Parth Shah <parth@...ux.ibm.com>
To: Pavan Kondeti <pkondeti@...eaurora.org>
Cc: linux-kernel@...r.kernel.org, peterz@...radead.org,
mingo@...hat.com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, qais.yousef@....com,
chris.hyser@...cle.com, patrick.bellasi@...bug.net,
valentin.schneider@....com, David.Laight@...LAB.COM,
pjt@...gle.com, pavel@....cz, tj@...nel.org,
dhaval.giani@...cle.com, qperret@...gle.com,
tim.c.chen@...ux.intel.com
Subject: Re: [PATCH v4 2/4] sched/core: Propagate parent task's latency
requirements to the child task
On 2/25/20 12:02 PM, Pavan Kondeti wrote:
> On Mon, Feb 24, 2020 at 02:29:16PM +0530, Parth Shah wrote:
>> Clone parent task's latency_nice attribute to the forked child task.
>>
>> Reset the latency_nice value to default value when the child task is
>> set to sched_reset_on_fork.
>>
>> Signed-off-by: Parth Shah <parth@...ux.ibm.com>
>> Reviewed-by: Qais Yousef <qais.yousef@....com>
>> ---
>> kernel/sched/core.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
>> index 377ec26e9159..65b6c00d6dac 100644
>> --- a/kernel/sched/core.c
>> +++ b/kernel/sched/core.c
>> @@ -2860,6 +2860,9 @@ int sched_fork(unsigned long clone_flags, struct task_struct *p)
>> */
>> p->prio = current->normal_prio;
>>
>> + /* Propagate the parent's latency requirements to the child as well */
>> + p->latency_nice = current->latency_nice;
>> +
>> uclamp_fork(p);
>>
>> /*
>> @@ -2876,6 +2879,7 @@ int sched_fork(unsigned long clone_flags, struct task_struct *p)
>> p->prio = p->normal_prio = __normal_prio(p);
>> set_load_weight(p, false);
>>
>> + p->latency_nice = DEFAULT_LATENCY_NICE;
>> /*
>> * We don't need the reset flag anymore after the fork. It has
>> * fulfilled its duty:
>> --
>> 2.17.2
>>
>
> LGTM.
>
> latency_nice value initialization is missing for the init_task.
good catch. Will add that part too. Thanks for pointing out.
- Parth
>
> Thanks,
> Pavan
>
Powered by blists - more mailing lists