lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.00.1012151627400.8734@tigran.mtv.corp.google.com>
Date:	Wed, 15 Dec 2010 16:42:33 -0800 (PST)
From:	Hugh Dickins <hughd@...gle.com>
To:	"Martin K. Petersen" <martin.petersen@...cle.com>
cc:	Ric Wheeler <ricwheeler@...il.com>,
	Christian Brandt <brandtc@...5.com>,
	linux-kernel@...r.kernel.org, Mike Snitzer <snitzer@...hat.com>
Subject: Re: swap storage alignment and stride size

On Wed, 15 Dec 2010, Martin K. Petersen wrote:
> >>>>> "Hugh" == Hugh Dickins <hughd@...gle.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ