How exactly is that a problem? If you do an access to a page that has
the BE bit set, then whatever size operand you load, the CPU will do
the right thing. So that will just work. You'll only come a cropper if
you want to use memcpy() to copy the data around. But the application
may not need to do that.
> There is no easy solution to bi-endianness. Anybody who thinks there
> is is just sadly misguided. You should aim for having a systemwide
> endianness, anything else is just asking for trouble for absolutely
> no real gain.
That's not really true. I'm less concerned with the byte swapping
overhead. I'm more concerned about the ability to mmap() a huge file
in BE format (I can't change the format) and being able to randomly
bits of it without having to read the whole thing. Having to read the
entire file is a terrible performance suck.
If you don't like the BE-mapping idea, what about the other approach
of mmap()ing a special device that signals the process when a fresh
page is accessed, and discards the page when normally it would be
swapped out?
Regards,
Richard....
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/