linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Stephen C. Tweedie" <sct@dcs.ed.ac.uk>
To: Rik van Riel <H.H.vanRiel@fys.ruu.nl>
Cc: "Dr. Werner Fink" <werner@suse.de>, linux-mm <linux-mm@kvack.org>,
	linux-kernel <linux-kernel@vger.rutgers.edu>
Subject: Re: [2x PATCH] page map aging & improved kswap logic
Date: Fri, 27 Feb 1998 19:52:10 GMT	[thread overview]
Message-ID: <199802271952.TAA01195@dax.dcs.ed.ac.uk> (raw)
In-Reply-To: <Pine.LNX.3.91.980227105614.17899A-100000@mirkwood.dummy.home>

Hi,

On Fri, 27 Feb 1998 10:58:34 +0100 (MET), Rik van Riel
<H.H.vanRiel@fys.ruu.nl> said:

> What I wanted kswapd to do, was to select SWAP_CLUSTER_MAX pages and
> swap them out in _one_ I/O operation. Because this should save head
> movement, it might give us an improvement over syncing each swapped
> page seperately.

I'm working towards it, and yes, this is a very important thing to have.
It's more than just head movement --- disk requests, especially on SCSI,
simply go much faster if you can amalgamate a number of physically
adjacent IO requests into a single operation (scatter-gather allows you
to do this even if the memory for the data is not physically
contiguous).  

The biggest problem is avoiding blocking while we do the work in
try_to_swap_out().  That is a rather tricky piece of code, since it has
to deal with the fact that the process it is swapping can actually be
killed if we sleep for any reason, so it will not necessarily still be
there when we wake up again.  We've really got to do the entire
custering operation for write within try_to_swap_out() and then start up
the IO for those pages.

However, at least with the new swap cache stuff we can make things
easier, since it is now possible to set up swap cache associations
atomically on all the pages we want to swapout, and then take as much
time as we want performing the actual writes.  All we need to do is make
sure that we lock all the pages for IO without the risk of blocking.

Cheers,
 Stephen.

  reply	other threads:[~1998-02-27 21:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <199802270929.KAA28081@boole.fs100.suse.de>
1998-02-27  9:58 ` Rik van Riel
1998-02-27 19:52   ` Stephen C. Tweedie [this message]
1998-02-27 22:28     ` Benjamin C.R. LaHaise
1998-02-26 21:00 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=199802271952.TAA01195@dax.dcs.ed.ac.uk \
    --to=sct@dcs.ed.ac.uk \
    --cc=H.H.vanRiel@fys.ruu.nl \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.org \
    --cc=werner@suse.de \
    /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