mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolinux.com>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org, Rik van Riel <riel@conectiva.com.br>
Subject: Re: swapin readahead pre-patch (what about the code?)
Date: Fri, 5 Jan 2001 14:02:29 -0700 (MST)	[thread overview]
Message-ID: <200101052102.f05L2T420212@webber.adilger.net> (raw)
In-Reply-To: <Pine.LNX.4.21.0101051432270.2823-100000@freak.distro.conectiva> "from Marcelo Tosatti at Jan 5, 2001 02:34:04 pm"

Marcelo Tosatti writes:
> The following patch does this, and it also changes the readahead code to
> readaround. I'm not sure if readaround is better than readahead for the
> swapin case, and I'll have to test this more to make sure.

No comment on the code itself, but in general I would think that swapin
is relatively non-deterministic, unlike reading from a file which is often
sequential.  Even if a program is swapped out linearly to the swap space,
it may well be that the working set is a bunch discontiguous pages, so
readahead of any sort may be a net loss.  This is especially true with
swapin, because you need to evict another page to pre-read a swap page.

I suppose we need to find a good benchmark for a system under swap load
and test the current readahead, your new code, and no swap read-ahead at all.

I suppose the other area to look at is how pages are layed out when
they are swapped to disk.  If you go from medium memory pressure (where
unused pages have been swapped already) to thrashing, then if you can
put the remaining pages of each program to swap contiguously, then swap
read-ahead will be a net win, because you are likely to need all of them
again to run the program.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2001-01-05 21:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-05 16:30 swapin readahead pre-patch Marcelo Tosatti
2001-01-05 16:34 ` swapin readahead pre-patch (what about the code?) Marcelo Tosatti
2001-01-05 21:02   ` Andreas Dilger [this message]
2001-01-05 19:17     ` Marcelo Tosatti

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=200101052102.f05L2T420212@webber.adilger.net \
    --to=adilger@turbolinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=riel@conectiva.com.br \
    /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®