public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: "Stephen C. Tweedie" <sct@redhat.com>
To: Rik van Riel <H.H.vanRiel@phys.uu.nl>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
	jfm2@club-internet.fr, Linux MM <linux-mm@kvack.org>
Subject: Re: Two naive questions and a suggestion
Date: Wed, 25 Nov 1998 22:29:09 GMT	[thread overview]
Message-ID: <199811252229.WAA05737@dax.scot.redhat.com> (raw)
In-Reply-To: <Pine.LNX.3.96.981125220910.15920A-100000@mirkwood.dummy.home>

Hi,

On Wed, 25 Nov 1998 22:21:43 +0100 (CET), Rik van Riel
<H.H.vanRiel@phys.uu.nl> said:

> Then I think it's time to do swapin readahead on the
> entire SWAP_CLUSTER (or just from the point where we
> faulted) on a dumb-and-dumber basis, awaiting a good
> readahead scheme. Of course it will need to be sysctl
> tuneable :)

Yep, although I'm not sure that reading a whole SWAP_CLUSTER would be a
good idea.  Contrary to popular belief, disks are still quite slow at
sequential data transfer.  Non-sequential IO is obviously enormously
slower still, but doing readahead on a whole SWAP_CLUSTER (128k) is
definitely _not_ free.  It will increase the VM latency enormously if we
start reading in a lot of unnecessary data.

On the other hand, swap readahead is sufficiently trivial to code that
experimenting with good values is not hard.  Normal pagein already does
a one-block readahead, and doing this in swap would be pretty easy.  

The biggest problem with swap readahead is that there is very little
guarantee that the next page in any one swap partition is related to the
current page: the way we select pages for swapout makes it quite likely
that bits of different processes may intermix, and swap partitions can
also get fragmented over time.  To really benefit from swap readahead,
we would also want improved swap clustering which tried to keep a
logical association between adjacent physical pages, in the same way
that the filesystem does.  Right now, the swap clustering is great for
output performance but doesn't necessarily lead to disk layouts which
are good for swaping.

> Plus Linus might actually accept a change like this :)

If it is tunable, then it is so easy that he might well, yes.

--Stephen
--
This is a majordomo managed list.  To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org

  reply	other threads:[~1998-11-25 22:29 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-19  0:20 Two naive questions and a suggestion jfm2
1998-11-19 20:05 ` Rik van Riel
1998-11-20  1:25   ` jfm2
1998-11-20 15:31     ` Eric W. Biederman
1998-11-23 18:08 ` Stephen C. Tweedie
1998-11-23 20:45   ` jfm2
1998-11-23 21:59   ` jfm2
1998-11-24  1:21     ` Vladimir Dergachev
1998-11-24 11:17     ` Stephen C. Tweedie
1998-11-24 21:44       ` jfm2
1998-11-25  6:41         ` Rik van Riel
1998-11-25 12:27           ` Stephen C. Tweedie
1998-11-25 13:08             ` Rik van Riel
1998-11-25 14:46               ` Stephen C. Tweedie
1998-11-25 16:47                 ` Rik van Riel
1998-11-25 21:02                   ` Stephen C. Tweedie
1998-11-25 21:21                     ` Rik van Riel
1998-11-25 22:29                       ` Stephen C. Tweedie [this message]
1998-11-26  7:30                         ` Rik van Riel
1998-11-26 12:48                           ` Stephen C. Tweedie
1998-11-25 20:01           ` jfm2
1998-11-26  7:16             ` Rik van Riel
1998-11-26 19:59               ` jfm2
1998-11-27 17:45                 ` Stephen C. Tweedie
1998-11-27 21:14                   ` jfm2
1998-11-25 14:48         ` Eric W. Biederman
1998-11-25 20:29           ` jfm2
1998-11-25 16:31         ` ralf
1998-11-26 12:18           ` Rik van Riel

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=199811252229.WAA05737@dax.scot.redhat.com \
    --to=sct@redhat.com \
    --cc=H.H.vanRiel@phys.uu.nl \
    --cc=jfm2@club-internet.fr \
    --cc=linux-mm@kvack.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