Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 024d4d4c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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()
parents 1acf93ca e1ff516a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -5851,11 +5851,14 @@ void __init sched_init_smp(void)
	/*
	 * There's no userspace yet to cause hotplug operations; hence all the
	 * CPU masks are stable and all blatant races in the below code cannot
	 * happen.
	 * happen. The hotplug lock is nevertheless taken to satisfy lockdep,
	 * but there won't be any contention on it.
	 */
	cpus_read_lock();
	mutex_lock(&sched_domains_mutex);
	sched_init_domains(cpu_active_mask);
	mutex_unlock(&sched_domains_mutex);
	cpus_read_unlock();

	/* Move init over to a non-isolated CPU */
	if (set_cpus_allowed_ptr(current, housekeeping_cpumask(HK_FLAG_DOMAIN)) < 0)
+2 −2
Original line number Diff line number Diff line
@@ -2400,8 +2400,8 @@ void task_numa_fault(int last_cpupid, int mem_node, int pages, int flags)
		local = 1;

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