xfs
[Top] [All Lists]

Re: [PATCH] Replace XFS bit functions with Linux functions

To: Andi Kleen <ak@xxxxxxx>
Subject: Re: [PATCH] Replace XFS bit functions with Linux functions
From: Russell Cattelan <cattelan@xxxxxxxxxxx>
Date: Wed, 03 Oct 2007 13:20:15 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <200710031958.13422.ak@suse.de>
References: <200710021010.58284.ak@suse.de> <470273C1.60300@thebarn.com> <200710031958.13422.ak@suse.de>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird 2.0.0.5 (X11/20070813)
Andi Kleen wrote:
I would like to keep thing abstracted enough such that it is won't be to
difficult keep to map to the FreeBSD bit functions.

It's no different to map linux bit functions to FreeBSD than mapping
XFS bit functions to FreeBSD. Besides I expect it has fls already -- that is actually a BSDism.


Yes but for the most part the common code does not play favorites
to linux or bsd or X in terms of which platform is favored. (with some execptions).
I have been working getting the freebsd xfs code based updated and I've come
across calls to spin_lock that may need to redone. I need to look at the XFS code
paths more to figure out which freebsd lock is needed.
For the most part freebsd tries not to use mutex spin_lock (disable interrupts and spin) since it is
more expensive that just mtx_lock (do not disable interrupts and spin for awhile then sleep)
and unless there is a good reason to disable interrupts they try avoiding doing so.


Playing favorites is kinda what has fueled this whole "ported half of irix to linux" FUD
that has dogged xfs forever.
So for the same reason that people complained about mapping irix calls to linux calls
I don't like the argument that linux calls should just be mapped to bsd calls.


And I agree with Dave the -1 adjustments are bit hard to follow and would
be better encapsulated in a inline call where it can be documented.

Having the xfs_ call in the common code would also allow the fbsd port to catch up with
this optimization as some point vs having to back stitch the current code into common layer
and eventually having to realign.


-Andi


Attachment: cattelan.vcf
Description: Vcard

<Prev in Thread] Current Thread [Next in Thread>