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

Commit 77e4bfbc authored by Andreas Mohr's avatar Andreas Mohr Committed by Linus Torvalds
Browse files

[PATCH] Small schedule() optimization



small schedule() microoptimization.

Signed-off-by: default avatarAndreas Mohr <andi@lisas.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 013d3868
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -2879,14 +2879,12 @@ asmlinkage void __sched schedule(void)
	 * schedule() atomically, we ignore that path for now.
	 * Otherwise, whine if we are scheduling when we should not be.
	 */
	if (likely(!current->exit_state)) {
		if (unlikely(in_atomic())) {
	if (unlikely(in_atomic() && !current->exit_state)) {
		printk(KERN_ERR "BUG: scheduling while atomic: "
			"%s/0x%08x/%d\n",
			current->comm, preempt_count(), current->pid);
		dump_stack();
	}
	}
	profile_hit(SCHED_PROFILING, __builtin_return_address(0));

need_resched: