public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: 'Christoph Lameter' <clameter@sgi.com>
Cc: 'Nick Piggin' <nickpiggin@yahoo.com.au>,
	Zoltan Menyhart <Zoltan.Menyhart@free.fr>,
	akpm@osdl.org, linux-kernel@vger.kernel.org,
	linux-ia64@vger.kernel.org
Subject: RE: Fix unlock_buffer() to work the same way as bit_unlock()
Date: Wed, 29 Mar 2006 01:39:37 +0000	[thread overview]
Message-ID: <200603290139.k2T1d1g00702@unix-os.sc.intel.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0603281644270.16702@schroedinger.engr.sgi.com>
In-Reply-To: <Pine.LNX.4.64.0603271953150.7469@schroedinger.engr.sgi.com>

Christoph Lameter wrote on Tuesday, March 28, 2006 4:47 PM
> > Why not make unlock_buffer use test_and_clear_bit()?  Utilizing it's implied
> > full memory fence and throw away the return value?  OK, OK, this is obscured.
> > Then introduce clear_bit_memory_fence API or some sort.
> 
> Only for IA64's sake? Better clean up the bitops as you suggested earlier. 
> The open ended acquires there leaves a weird feeling.
> 
> Something like this? (builds fine not tested yet)

It's warm and fuzzy feeling with changes in set_bit(), clear_bit(), and
change_bit().  The API never meant to have implied memory fence in them.
Though the usage might be assuming one way or the other because of x86
semantics.

How many of these things are used as (1) simple atomic op, (2) lock,
(3) unlock, and (4) full fence?

clear_bit  - 1,070 hits
Set_bit    - 1,450 hits
Change_bit -     8 hits

The effect of changing them to full memory fence could be wide spread. Though
I don't have any numbers yet to say how much it will matter for performance.

- Ken

  parent reply	other threads:[~2006-03-29  1:39 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-28  3:59 Fix unlock_buffer() to work the same way as bit_unlock() Christoph Lameter
2006-03-28  8:10 ` Nick Piggin
2006-03-28 18:53 ` Chen, Kenneth W
2006-03-28 21:42   ` Zoltan Menyhart
2006-03-28 23:48     ` Christoph Lameter
2006-03-29  0:07       ` Nick Piggin
2006-03-29  2:23         ` Christoph Lameter
2006-03-29  2:35           ` Nick Piggin
2006-03-29 10:57       ` Zoltan Menyhart
2006-03-29  0:12 ` Chen, Kenneth W
2006-03-29  0:27 ` Chen, Kenneth W
2006-03-29  0:47   ` Christoph Lameter
2006-03-29  1:39 ` Chen, Kenneth W [this message]
2006-03-29 12:16   ` Zoltan Menyhart
2006-03-30  1:56     ` Nick Piggin
2006-03-29  6:46 ` Chen, Kenneth W
2006-03-29  7:11   ` Christoph Lameter
2006-03-30  1:34   ` Nick Piggin
2006-03-29  6:50 ` Chen, Kenneth W
2006-03-30  1:36   ` Nick Piggin
2006-03-29 18:33 ` Boehm, Hans
2006-03-29 19:11   ` Grant Grundler
2006-03-29 19:31 ` Boehm, Hans
2006-03-29 22:17   ` Christoph Lameter
2006-03-29 22:56 ` Boehm, Hans
2006-03-29 23:33   ` Christoph Lameter
2006-03-30  8:43     ` Zoltan Menyhart
2006-03-30  8:55       ` Nick Piggin
2006-03-30 19:11         ` Christoph Lameter
2006-03-30 17:17       ` Christoph Lameter
2006-03-29 23:49 ` Chen, Kenneth W
2006-03-29 23:50   ` Christoph Lameter
2006-03-29 23:50   ` Grant Grundler
     [not found] ` <442AA13B.3050104@bull.net>
2006-03-30  1:57   ` Nick Piggin
2006-03-30 17:57 ` Boehm, Hans
2006-03-30 18:17   ` Christoph Lameter
2006-03-30 22:17 ` Boehm, Hans
2006-03-30 22:26 ` Boehm, Hans

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=200603290139.k2T1d1g00702@unix-os.sc.intel.com \
    --to=kenneth.w.chen@intel.com \
    --cc=Zoltan.Menyhart@free.fr \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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