Is swap space endian-sensitive?
- Hey kernel experts - is the swap partition supposed to be endian-sensitive?
See the log exerpt below, 4th line (the swap space was "mkswap"d on
SlugOS/LE, this is from a SlugOS/BE kernel -- clearly it doesn't like the
magic number for the swap...) -- is this a bug (in which case I'll try to
fix it) or is this a feature?
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda2, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Unable to handle swap header version 16777216
Starting syslogd/klogd: done
> Hey kernel experts - is the swap partition supposed to be endian-sensitive?It's an endian-sensitive performance issue. A swap partition is not just
> (the swap space was "mkswap"d on SlugOS/LE, this is from a SlugOS/BE kernel)
> "Unable to handle swap header version 16777216"
a big blob of disk space with a label. A persistent on-disk data structure
allows for avoiding the use of bad blocks, etc., and there is a cost in
code space and complexity for making the storage and access endian-ambivalent.
For modern desktop and server machines the cost might be trivial, but for
embedded use everything matters. The workaround to allow for changing
endianness is to mkswap [just] before swapon, and you must be sure to perform
the mkswap with correct parameters.