Skip to content

Commit

Permalink
sched: micro-optimize mmdrop()
Browse files Browse the repository at this point in the history
micro-optimize mmdrop(). Improves schedule()'s assembly a bit.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Jul 9, 2007
1 parent 9c4801c commit 6fb43d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 6fb43d7

Please sign in to comment.