Initial filesystem design synopsis.

Rupert Pigott darkb00ng at
Mon Feb 26 14:05:38 PST 2007

On Mon, 26 Feb 2007 08:26:55 -0800, Matthew Dillon wrote:

> :Hi, I was wondering if you'd considered making HAMMER endian neutral. I
> :think that would be a very good thing.
> :~Robert
>      The answer is both yes and no.  It is clearly important to make the
>      filesystem endian-neutral, which is accomplished by placing an endian
>      control field in the segment header.  When the segment is created,

I have always wondered about the endian neutral thing.

It seems somewhat pointless to me. In a setup where you are swapping
file systems between big and little endian boxes conversion will go on,
you're not saving anything over the long run. The cost of conversion
should be trivial in this day and age, particularly when weighed against
the cost of I/O.

In fact it seems to me as though predicating the conversion process
on a runtime variable would actually cost *more* than making the
conversion decision at compile time. As a pernickerty point there
would be a little more code to go wrong and more test cases to chase.

This lappy (Intel U1400) can endian swap 512k 32bit words in 10ms,
compiled with -O0 and profiled with gprof, and sub 10ms with -O2
(really should check the .asm but I don't have the time right now).

Please correct me if I am wrong ! :)


More information about the Kernel mailing list