From: Hugh Dickins <hughd@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Shaohua Li <shli@kernel.org>, Rafael Aquini <aquini@redhat.com>,
riel@redhat.com, minchan@kernel.org, kmpark@infradead.org,
linux-mm@kvack.org
Subject: Re: [patch 4/4 v3]swap: make cluster allocation per-cpu
Date: Wed, 20 Mar 2013 14:58:17 -0700 (PDT) [thread overview]
Message-ID: <alpine.LNX.2.00.1303201437380.7431@eggly.anvils> (raw)
In-Reply-To: <20130320135618.a476f40e4683cf20509b904d@linux-foundation.org>
On Wed, 20 Mar 2013, Andrew Morton wrote:
> On Tue, 19 Mar 2013 16:09:01 -0700 (PDT) Hugh Dickins <hughd@google.com> wrote:
>
> > But I'm not all that keen on this one. Partly because I suspect that
> > this per-cpu'ing won't in the end be the right approach
>
> That was my reaction. The CPU isn't the logical thing upon which to
> key the clustering. It mostly-works, because of the way in which the
> kernel operates but it's a bit of a flukey hack. A more logical thing
> around which to subdivide the clustering is the mm_struct.
You do suggest that from time to time, and someone did once send a patch
to organize it by vma. That probably behaves very nicely under a simple
load, when pages coming off the bottom of the lru are from increasing
addresses of the same mm; but what we have already works well enough
for such a simple case (or should do: bugs can creep in and upset it).
Under a heavier mixed load, it behaved much worse than what we do
at present. That was in swapping to hard disk, where the additional
seeks to place pages from different vmas in separate locations were
costly; SSDs don't have seek cost, but I'd expect their erase blocks
to impose an equivalent (not necessarily equal) cost.
One of the great attractions of SSD for swap is the absence of seek
cost when faulting back in; and even with hard disk, we don't know
whether or when pages will be faulted back in. The better we can
allocate contiguously when swapping out, the faster swap will be.
I say we need to allocate disk location just in time before writing.
Hugh
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2013-03-20 21:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-21 2:18 Shaohua Li
2013-03-19 23:09 ` Hugh Dickins
2013-03-20 20:56 ` Andrew Morton
2013-03-20 21:58 ` Hugh Dickins [this message]
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.LNX.2.00.1303201437380.7431@eggly.anvils \
--to=hughd@google.com \
--cc=akpm@linux-foundation.org \
--cc=aquini@redhat.com \
--cc=kmpark@infradead.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=riel@redhat.com \
--cc=shli@kernel.org \
/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