[lkml]   [2001]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [SOLVED + PATCH]: documented Oops running big-endian reiserfs on parisc architecture
   From: Andi Kleen <>
Date: 04 Sep 2001 11:44:30 +0200

Jeff Mahoney <> writes:

> I did kick around the idea of making those macros the default accessors for
> the deh_state member (which is the only place they're used), but it unfairly
> penalizes arches that don't need them.

On archs that don't need them {get,put}_unaligned should be just normal
assignments. They are certainly on i386.

I can also almost guarentee you that the x86 will sometimes not
execute these bitops atomically on SMP.

We had some obscure bug on SMP/x86 years ago, and Linus discovered
that removing an unaligned spinlock or bitop made the problem go away.

Reiserfs is broken and needs to be fixed.

If you make the unaligned accessors there the default for everyone,
you solve the problem _AND_ there is no penalization. Look at what
the compiler makes of the code generated, it is going to be almost
entirely identical. The compiler should be able to compute it all
via constants. If not, oh you get 1 or 2 instructions here or
there, and that is MINISCULE compared to the cost of the atomic
operation itself.

What's more, you will have less QA'ing to do, since this code will
always be in use and thus tested.

FACT: Doing bitops on something not "long" aligned is a bug and
will always be a bug. You must fix it.

David S. Miller

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:02    [W:0.067 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site