Re: [tip:sched/core] sched/fair: Use rq_lock/unlock in online_fair_sched_group
From: Dietmar Eggemann
Date: Mon Aug 12 2019 - 05:56:18 EST
On 8/9/19 7:28 PM, Phil Auld wrote:
> On Fri, Aug 09, 2019 at 06:21:22PM +0200 Dietmar Eggemann wrote:
>> On 8/8/19 1:01 PM, tip-bot for Phil Auld wrote:
[...]
>> Shouldn't this be:
>>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index d9407517dae9..1054d2cf6aaa 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -10288,11 +10288,11 @@ void online_fair_sched_group(struct task_group
>> *tg)
>> for_each_possible_cpu(i) {
>> rq = cpu_rq(i);
>> se = tg->se[i];
>> - rq_lock(rq, &rf);
>> + rq_lock_irq(rq, &rf);
>> update_rq_clock(rq);
>> attach_entity_cfs_rq(se);
>> sync_throttle(tg, i);
>> - rq_unlock(rq, &rf);
>> + rq_unlock_irq(rq, &rf);
>> }
>> }
>>
>> Currently, you should get a 'inconsistent lock state' warning with
>> CONFIG_PROVE_LOCKING.
>
> Yes, indeed. Sorry about that. Maybe it can be fixed in tip before
> it gets any farther? Or do we need a new patch?
I think Peter is on holiday so maybe you can send a new patch and ask
Ingo or Thomas to replace your original patch on tip sched/core?