public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: Andrew Morton <akpm@zip.com.au>
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] generalized spin_lock_bit, take two
Date: 25 Jul 2002 09:29:21 -0700	[thread overview]
Message-ID: <1027614561.1697.11.camel@sinai> (raw)
In-Reply-To: <3D3F61A2.10661C93@zip.com.au>

On Wed, 2002-07-24 at 19:25, Andrew Morton wrote:

> I did some testing yesterday with fork/exec/exit-intensive
> workloads and the contention rate on pte_chain_lock was 0.3%,
> so the efficiency problems which Linus described are unlikely
> to bite us in this particular application.  But if the usage
> of spin_lock_bit() were to widen, some platforms may be impacted.

At this point (with Linus asking me to keep the "pte_chain_lock()"
interface) I do not really care so long as we not compile the actual
locking on UP.

Will you take this patch, then?

	Robert Love

diff -urN linux-2.5.28/include/linux/page-flags.h linux/include/linux/page-flags.h
--- linux-2.5.28/include/linux/page-flags.h	Wed Jul 24 14:03:21 2002
+++ linux/include/linux/page-flags.h	Thu Jul 25 09:27:01 2002
@@ -228,6 +228,8 @@
 #define ClearPageDirect(page)		clear_bit(PG_direct, &(page)->flags)
 #define TestClearPageDirect(page)	test_and_clear_bit(PG_direct, &(page)->flags)
 
+#ifdef CONFIG_SMP
+
 /*
  * inlines for acquisition and release of PG_chainlock
  */
@@ -253,6 +255,20 @@
 	preempt_enable();
 }
 
+#else
+
+static inline void pte_chain_lock(struct page *page)
+{
+	preempt_disable();
+}
+
+static inline void pte_chain_unlock(struct page *page)
+{
+	preempt_enable();
+}
+
+#endif
+
 /*
  * The PageSwapCache predicate doesn't use a PG_flag at this time,
  * but it may again do so one day.


      reply	other threads:[~2002-07-25 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-25  0:29 [PATCH] generalized spin_lock_bit, take two Robert Love
2002-07-25  2:25 ` Andrew Morton
2002-07-25 16:29   ` Robert Love [this message]

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=1027614561.1697.11.camel@sinai \
    --to=rml@tech9.net \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox