lkml.org 
[lkml]   [2019]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sched/fair: Optimize select_idle_cpu
From
Date

On 2019/12/12 23:04, Peter Zijlstra wrote:
> On Thu, Dec 12, 2019 at 10:41:02PM +0800, Cheng Jian wrote:
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index 08a233e97a01..16a29b570803 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -5834,6 +5834,7 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t
>> s64 delta;
>> int this = smp_processor_id();
>> int cpu, nr = INT_MAX, si_cpu = -1;
>> + struct cpumask cpus;
> NAK, you must not put a cpumask on stack.
>
> .

Hi, Peter

    I saw the same work in select_idle_core, and I was wondering why
the per_cpu variable was

needed for this yesterday. Now I think I probably understand : cpumask
may be too large,

putting it on the stack may cause overflow. Is this correct ?

    I'm sorry I made a mistake like this. I will fix it in v2

    Thank you very much.


        -- Cheng Jian



\
 
 \ /
  Last update: 2019-12-13 02:53    [W:0.081 / U:25.932 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site