Re: swap storage alignment and stride size

From: Martin K. Petersen
Date: Thu Dec 16 2010 - 18:47:14 EST


>>>>> "Hugh" == Hugh Dickins <hughd@xxxxxxxxxx> writes:

>> You called it a "header page". Does that imply that it is page sized?

Hugh> Yes. (Rather a nuisance on a PowerPC system which sometimes uses
Hugh> a kernel with 4k pages and sometimes a kernel with 64k pages.)

Ok.


>> Or will it cause pages written to a 4k-aligned swap device to be
>> misaligned?

Hugh> No, the 4k-aligned remains 4k-aligned, of course. But if you
Hugh> aligned your swap partition on, say, a 1MB boundary, and are
Hugh> thinking of working in aligned 1MB blocks, then it may be awkward
Hugh> that there's always this special 4k at the start (it could be
Hugh> written back each time even though it hasn't changed, but it's
Hugh> still an odd case).

Yeah, I got that. I just wanted to make sure that the header was not 32
bytes or something like that because that would be highly painful from
an I/O alignment perspective.

--
Martin K. Petersen Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/