All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [patch 5/13] speed up pte_chain locking on uniprocessors
Date: Sun, 28 Jul 2002 00:32:48 -0700	[thread overview]
Message-ID: <3D439E20.5AEB8FBE@zip.com.au> (raw)



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();
 }
 

.

                 reply	other threads:[~2002-07-28  7:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D439E20.5AEB8FBE@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.