linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Stephen C. Tweedie" <sct@redhat.com>
To: Alan Cox <number6@the-village.bc.nu>
Cc: Stephen Tweedie <sct@redhat.com>,
	linux-mm@kvack.org, Rik van Riel <H.H.vanRiel@fys.ruu.nl>
Subject: Tiny one-line fix to swap readahead
Date: Tue, 8 Dec 1998 22:59:09 GMT	[thread overview]
Message-ID: <199812082259.WAA00875@dax.scot.redhat.com> (raw)

Hi,

I just noticed this when experimenting with a slightly different swapin
optimisation: swapping in entire 64k aligned blocks rather than doing
strict readahead.  A side effect was that a swapin in the first free
pages of the swap file tried to swapin the swap header, which is marked
SWAP_MAP_BAD.  This breaks.

Now the readahead code in Rik's own patches won't try to do this, but it
_will_ have the same problem if you ever readahead past a bad page in
the swap file.  The trick is to fix the test in mm/page_alloc.c,
function swapin_readahead:

	      if (!swapdev->swap_map[offset] ||
		  swapdev->swap_map[offset] == SWAP_MAP_BAD ||  <<<< new line
		  test_bit(offset, swapdev->swap_lockmap))
		      continue;

Sorry this isn't a diff, but my other changes to this file mean that I
don't have a patch handy against plain ac*.

--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-12-08 23:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-08 22:59 Stephen C. Tweedie [this message]
1998-12-10 19:22 ` Stephen C. Tweedie

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=199812082259.WAA00875@dax.scot.redhat.com \
    --to=sct@redhat.com \
    --cc=H.H.vanRiel@fys.ruu.nl \
    --cc=linux-mm@kvack.org \
    --cc=number6@the-village.bc.nu \
    /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