Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • kernel
  • sched
  • debug.c
Find file BlameHistoryPermalink
  • Hidetoshi Seto's avatar
    sched/debug: Initialize sd_sysctl_cpus if !CONFIG_CPUMASK_OFFSTACK · 351ea69c
    Hidetoshi Seto authored Jan 29, 2019
    [ Upstream commit 1ca4fa3a
    
     ]
    
    register_sched_domain_sysctl() copies the cpu_possible_mask into
    sd_sysctl_cpus, but only if sd_sysctl_cpus hasn't already been
    allocated (ie, CONFIG_CPUMASK_OFFSTACK is set).  However, when
    CONFIG_CPUMASK_OFFSTACK is not set, sd_sysctl_cpus is left
    uninitialized (all zeroes) and the kernel may fail to initialize
    sched_domain sysctl entries for all possible CPUs.
    
    This is visible to the user if the kernel is booted with maxcpus=n, or
    if ACPI tables have been modified to leave CPUs offline, and then
    checking for missing /proc/sys/kernel/sched_domain/cpu* entries.
    
    Fix this by separating the allocation and initialization, and adding a
    flag to initialize the possible CPU entries while system booting only.
    
    Tested-by: default avatarSyuuichirou Ishii <ishii.shuuichir@jp.fujitsu.com>
    Tested-by: default avatarTarumizu, Kohei <tarumizu.kohei@jp.fujitsu.com>
    Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Reviewed-by: default avatarMasayoshi Mizuma <m.mizuma@jp.fujitsu.com>
    Acked-by: default avatarJoe Lawrence <joe.lawrence@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Masayoshi Mizuma <msys.mizuma@gmail.com>
    Cc: Mike Galbraith <efault@gmx.de>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lkml.kernel.org/r/20190129151245.5073-1-msys.mizuma@gmail.com
    
    
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    351ea69c
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7