mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Ric Wheeler <ricwheeler@gmail.com>,
	Christian Brandt <brandtc@psi5.com>,
	linux-kernel@vger.kernel.org, Mike Snitzer <snitzer@redhat.com>
Subject: Re: swap storage alignment and stride size
Date: Tue, 14 Dec 2010 20:57:28 -0800 (PST)	[thread overview]
Message-ID: <alpine.LSU.2.00.1012142038430.13004@tigran.mtv.corp.google.com> (raw)
In-Reply-To: <yq1d3p486qe.fsf@sermon.lab.mkp.net>

On Tue, 14 Dec 2010, Martin K. Petersen wrote:
> >>>>> "Ric" == Ric Wheeler <ricwheeler@gmail.com> writes:
> 
> Ric> There has been a lot of work on alignment, Martin Petersen lead
> Ric> most of that and is probably the best one to ping.
> 
> With modern tooling we should align the partition or DM device correctly
> so the swap starts on a properly aligned boundary. But I don't think
> anybody has looked into hooking the swap stuff up with the I/O
> topology. I'm also not sure the swap code is flexible enough to deal
> with units that are bigger than page size.

You and Christian are right, mm/swapfile.c is very much oriented to
the small mm page size, 4kB on x86.

Yes, when it's running nicely, the elevator can make a big difference
by merging adjacent writes to swap; but swapping is often by nature
not so nice.

I think it would be a big mistake to try to build the idea of bigger
blocks into mm/swapfile.c: it is so orientated towards the mm concerns
that we'd end up with a mess that way.

Much better to add a dm layer below it, to buffer such alignment and
stride concerns.  Perhaps someone has already done that?

(scan_swap_map does try to allocate in 1MB clusters, but they're not
written out that way, and there's no attempt to align: if it worked
out better for the lower level to require that these 1MB clusters
are aligned, we could probably go for that - though the swap header
page might then be a nuisance.)

Hugh

  reply	other threads:[~2010-12-15  4:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08 17:03 Christian Brandt
2010-12-08 19:56 ` Ric Wheeler
2010-12-14 20:00   ` Martin K. Petersen
2010-12-15  4:57     ` Hugh Dickins [this message]
2010-12-15 19:30       ` Martin K. Petersen
2010-12-16  0:42         ` Hugh Dickins
2010-12-16 23:46           ` Martin K. Petersen
2010-12-17  0:15           ` Christian Brandt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.00.1012142038430.13004@tigran.mtv.corp.google.com \
    --to=hughd@google.com \
    --cc=brandtc@psi5.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ricwheeler@gmail.com \
    --cc=snitzer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®