* [patch 5/13] speed up pte_chain locking on uniprocessors
@ 2002-07-28 7:32 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2002-07-28 7:32 UTC (permalink / raw)
To: Linus Torvalds; +Cc: lkml
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();
}
.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-07-28 7:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-28 7:32 [patch 5/13] speed up pte_chain locking on uniprocessors Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.