lkml.org 
[lkml]   [2010]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: swap storage alignment and stride size
On Wed, 15 Dec 2010, Martin K. Petersen wrote:
> >>>>> "Hugh" == Hugh Dickins <hughd@google.com> writes:
>
> Hugh> (scan_swap_map does try to allocate in 1MB clusters, but they're
> Hugh> not written out that way, and there's no attempt to align: if it
> Hugh> worked out better for the lower level to require that these 1MB
> Hugh> clusters are aligned, we could probably go for that - though the
> Hugh> swap header page might then be a nuisance.)
>
> You called it a "header page". Does that imply that it is page sized?

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

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

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

Hugh


\
 
 \ /
  Last update: 2010-12-16 01:45    [W:0.048 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site