From: Andrew Morton <akpm@zip.com.au>
To: Robert Love <rml@tech9.net>
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] generalized spin_lock_bit, take two
Date: Wed, 24 Jul 2002 19:25:38 -0700 [thread overview]
Message-ID: <3D3F61A2.10661C93@zip.com.au> (raw)
In-Reply-To: 1027556989.927.1646.camel@sinai
Robert Love wrote:
>
> Andrew and Linus,
>
> The attached patch implements bit-sized spinlocks via the following
> interfaces:
>
> spin_lock_bit(int nr, unsigned long * lock)
> spin_unlock_bit(int nr, unsigned long * lock)
>
> to abstract the current VM pte_chain locking and to fix the problem
> where the locks are not compiled away on UP.
>
Do we really want to introduce another locking primitive?
pte_chain_lock is special, because we have so many struct page's,
and open-coding that locking is a good way to express that
specialness. But if we go and formalise "spin_lock_bit" then
everyone will start using them, and that's not necessarily
a thing we want to happen?
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.
-
next prev parent reply other threads:[~2002-07-25 2:14 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 [this message]
2002-07-25 16:29 ` Robert Love
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=3D3F61A2.10661C93@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=rml@tech9.net \
--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.