Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1662684 > unrolled thread

[PATCH] sched/core: idle_task_exit() shouldn't use switch_mm_irqs_off()

Started byAndy Lutomirski <luto@kernel.org>
First post2017-06-09 20:50 +0200
Last post2017-06-11 12:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] sched/core: idle_task_exit() shouldn't use switch_mm_irqs_off() Andy Lutomirski <luto@kernel.org> - 2017-06-09 20:50 +0200
    [tip:sched/urgent] sched/core: Idle_task_exit() shouldn't use  switch_mm_irqs_off() tip-bot for Andy Lutomirski <tipbot@zytor.com> - 2017-06-11 12:10 +0200

#1662684 — [PATCH] sched/core: idle_task_exit() shouldn't use switch_mm_irqs_off()

FromAndy Lutomirski <luto@kernel.org>
Date2017-06-09 20:50 +0200
Subject[PATCH] sched/core: idle_task_exit() shouldn't use switch_mm_irqs_off()
Message-ID<tQx8R-55Y-11@gated-at.bofh.it>
idle_task_exit() can be called with IRQs on x86 on and therefore
should use switch_mm(), not switch_mm_irqs_off().

This doesn't seem to cause any problems right now, but it will
confuse my upcoming TLB flush changes.  Nonetheless, I think it
should be backported because it's trivial.  There won't be any
meaningful performance impact because idle_task_exit() is only
used when offlining a CPU.

Cc: stable@vger.kernel.org
Fixes: f98db6013c55 ("sched/core: Add switch_mm_irqs_off() and use it in the scheduler")
Cc: Borislav Petkov <bp@suse.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 803c3bc274c4..326d4f88e2b1 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5605,7 +5605,7 @@ void idle_task_exit(void)
 	BUG_ON(cpu_online(smp_processor_id()));
 
 	if (mm != &init_mm) {
-		switch_mm_irqs_off(mm, &init_mm, current);
+		switch_mm(mm, &init_mm, current);
 		finish_arch_post_lock_switch();
 	}
 	mmdrop(mm);
-- 
2.9.4

[toc] | [next] | [standalone]


#1663085 — [tip:sched/urgent] sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off()

Fromtip-bot for Andy Lutomirski <tipbot@zytor.com>
Date2017-06-11 12:10 +0200
Subject[tip:sched/urgent] sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off()
Message-ID<tR7YJ-3K5-3@gated-at.bofh.it>
In reply to#1662684
Commit-ID:  252d2a4117bc181b287eeddf848863788da733ae
Gitweb:     http://git.kernel.org/tip/252d2a4117bc181b287eeddf848863788da733ae
Author:     Andy Lutomirski <luto@kernel.org>
AuthorDate: Fri, 9 Jun 2017 11:49:15 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sun, 11 Jun 2017 10:58:17 +0200

sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off()

idle_task_exit() can be called with IRQs on x86 on and therefore
should use switch_mm(), not switch_mm_irqs_off().

This doesn't seem to cause any problems right now, but it will
confuse my upcoming TLB flush changes.  Nonetheless, I think it
should be backported because it's trivial.  There won't be any
meaningful performance impact because idle_task_exit() is only
used when offlining a CPU.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Fixes: f98db6013c55 ("sched/core: Add switch_mm_irqs_off() and use it in the scheduler")
Link: http://lkml.kernel.org/r/ca3d1a9fa93a0b49f5a8ff729eda3640fb6abdf9.1497034141.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 803c3bc..326d4f8 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5605,7 +5605,7 @@ void idle_task_exit(void)
 	BUG_ON(cpu_online(smp_processor_id()));
 
 	if (mm != &init_mm) {
-		switch_mm_irqs_off(mm, &init_mm, current);
+		switch_mm(mm, &init_mm, current);
 		finish_arch_post_lock_switch();
 	}
 	mmdrop(mm);

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web