speed up pte_chain locking on uniprocessors
PATCH 5/13 speed up pte_chain locking on uniprocessors
ifdef out some operations in pte_chain_lock() which are not necessary on uniprocessor.
page-flags.h | 4 ++++ 1 files changed, 4 insertions(+)
include/linux/page-flags.h renamed from include/linux/page-flags.h~SMP-pte_chain_lock +4 -0
@@ -240,16 +240,20 @@ static inline void pte_chain_lock(struct* attempt to acquire the lock bit. */ preempt_disable (); +#ifdef CONFIG_SMP while (test_and_set_bit (PG_chainlock, &page->flags)) {while (test_bit (PG_chainlock, &page->flags))cpu_relax (); } +#endif }static inline void pte_chain_unlock (struct page *page) { +#ifdef CONFIG_SMP smp_mb__before_clear_bit ();clear_bit (PG_chainlock, &page->flags); +#endif preempt_enable (); }
.