linux-mm.kvack.org archive mirror
 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>, Linux MM <linux-mm@kvack.org>
Subject: Re: rw_swap_page() and swapin readahead
Date: Wed, 25 Nov 1998 22:19:19 GMT	[thread overview]
Message-ID: <199811252219.WAA05712@dax.scot.redhat.com> (raw)
In-Reply-To: <Pine.LNX.3.96.981125225829.15920C-100000@mirkwood.dummy.home>

Hi,

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

> Hi Stephen,
> it appears that rw_swap_page() needs a small change to be
> able to do asynchonous swapin.

> On line 128:
> 		if (!wait) {
> 			set_bit(PG_free_after, &page->flags);
> 			...
> 		}

No, that's fine as it is: one of the things rw_swap_page does early on
is to increment the page's count, so that even if the caller frees the
page before the IO is complete, nobody else tries to reuse it while the
IO is still outstanding.  The PG_free_after bit is there only to mark
that increment, so that the page count is decremented again
(asynchronously) once the IO is complete and no sooner.

> If I misunderstood the code, I'll happily learn a bit :)

You're welcome. :)

--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:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-25 22:02 Rik van Riel
1998-11-25 22:19 ` Stephen C. Tweedie [this message]
1998-11-25 22:59   ` Rik van Riel
1998-11-25 23:08     ` 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=199811252219.WAA05712@dax.scot.redhat.com \
    --to=sct@redhat.com \
    --cc=H.H.vanRiel@phys.uu.nl \
    --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