public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: Christoph Lameter <cl@linux.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] __ffs64()
Date: Thu, 23 Apr 2009 09:22:03 +0100	[thread overview]
Message-ID: <1240474923.3396.7.camel@localhost.localdomain> (raw)
In-Reply-To: <alpine.DEB.1.10.0904221654370.32682@qirst.com>

Hi,

On Wed, 2009-04-22 at 16:59 -0400, Christoph Lameter wrote:
> On Wed, 22 Apr 2009, Steven Whitehouse wrote:
> 
> > I'd like to add a new bitop, __ffs64() which I need in order to fix a
> > bug in GFS2. The question is, where should it go?
> 
> I think the location is right.
> 
> > On 64 bit arches, __ffs64() would be a synonym for __ffs(), but on 32
> > bit arches it degenerates to a conditional plus a call to __ffs(). I'm
> > assuming that there would not be a lot of point in optimising this
> > operation on 32 bit arches even if such an instruction was available, so
> > that I should do something like the below patch.
> >
> > Does that seem reasonable, or should I give it a separate header file
> > under asm-generic/bitops/ like some of the similar operations? It looks
> > like I'd have to touch a lot of other files if I were to go that route,
> 
> One issue may be that some 32 bit architectures have a better way of doing
> 64 bit ffs.
> 
Yes, thats what I was worried about. I don't have a wide enough
knowledge of the different architectures to make a judgement about
whether this is likely or not.

I guess maybe the right thing to do is to leave it as I did it in the
patch and if an arch wants to create its own implementation, then it
could be moved at that stage.

Steve.



  reply	other threads:[~2009-04-23  8:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22 15:46 [RFC] __ffs64() Steven Whitehouse
2009-04-22 20:46 ` Willy Tarreau
2009-04-22 20:59 ` Christoph Lameter
2009-04-23  8:22   ` Steven Whitehouse [this message]
2009-04-23  9:07     ` Benny Halevy

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=1240474923.3396.7.camel@localhost.localdomain \
    --to=swhiteho@redhat.com \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    /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