[lkml]   [2019]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] sched/fair: Optimize select_idle_cpu
On Fri, Dec 13, 2019 at 09:51:30AM +0800, chengjian (D) wrote:
> 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 ?

Yes, for instance when NR_CPUS=4096, struct cpumask ends up being 512
bytes, and that is _far_ too large for an on-stack variable, remember we
have relatively small fixed size stacks.

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