[patch 5/13] speed up pte_chain locking on uniprocessors

From: Andrew Morton (akpm@zip.com.au)
Date: Sun Jul 28 2002 - 02:32:48 EST


ifdef out some operations in pte_chain_lock() which are not necessary
on uniprocessor.

 page-flags.h | 4 ++++
 1 files changed, 4 insertions(+)

--- 2.5.29/include/linux/page-flags.h~SMP-pte_chain_lock Sat Jul 27 23:39:04 2002
+++ 2.5.29-akpm/include/linux/page-flags.h Sat Jul 27 23:39:04 2002
@@ -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();
 }
 

.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 30 2002 - 14:00:28 EST