Skip to content

Commit 024d4d4

Browse files
committed
Merge branch 'sched/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Thomas Gleixner: "Two small scheduler fixes: - Take hotplug lock in sched_init_smp(). Technically not really required, but lockdep will complain other. - Trivial comment fix in sched/fair" * 'sched/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix a comment in task_numa_fault() sched/core: Take the hotplug lock in sched_init_smp()
2 parents 1acf93c + e1ff516 commit 024d4d4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

kernel/sched/core.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5851,11 +5851,14 @@ void __init sched_init_smp(void)
58515851
/*
58525852
* There's no userspace yet to cause hotplug operations; hence all the
58535853
* CPU masks are stable and all blatant races in the below code cannot
5854-
* happen.
5854+
* happen. The hotplug lock is nevertheless taken to satisfy lockdep,
5855+
* but there won't be any contention on it.
58555856
*/
5857+
cpus_read_lock();
58565858
mutex_lock(&sched_domains_mutex);
58575859
sched_init_domains(cpu_active_mask);
58585860
mutex_unlock(&sched_domains_mutex);
5861+
cpus_read_unlock();
58595862

58605863
/* Move init over to a non-isolated CPU */
58615864
if (set_cpus_allowed_ptr(current, housekeeping_cpumask(HK_FLAG_DOMAIN)) < 0)

kernel/sched/fair.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,8 +2400,8 @@ void task_numa_fault(int last_cpupid, int mem_node, int pages, int flags)
24002400
local = 1;
24012401

24022402
/*
2403-
* Retry task to preferred node migration periodically, in case it
2404-
* case it previously failed, or the scheduler moved us.
2403+
* Retry to migrate task to preferred node periodically, in case it
2404+
* previously failed, or the scheduler moved us.
24052405
*/
24062406
if (time_after(jiffies, p->numa_migrate_retry)) {
24072407
task_numa_placement(p);

0 commit comments

Comments
 (0)