]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sched: micro-optimize mmdrop()
authorIngo Molnar <mingo@elte.hu>
Mon, 9 Jul 2007 16:52:01 +0000 (18:52 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 9 Jul 2007 16:52:01 +0000 (18:52 +0200)
micro-optimize mmdrop(). Improves schedule()'s assembly a bit.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/sched.h

index 785ec8465bd39a8e12fef5c72f756afae27a33b5..cfb680585ab8bd87762fe3e9b2bedfb404882760 100644 (file)
@@ -1514,7 +1514,7 @@ extern struct mm_struct * mm_alloc(void);
 extern void FASTCALL(__mmdrop(struct mm_struct *));
 static inline void mmdrop(struct mm_struct * mm)
 {
-       if (atomic_dec_and_test(&mm->mm_count))
+       if (unlikely(atomic_dec_and_test(&mm->mm_count)))
                __mmdrop(mm);
 }