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: swapin readahead and locking
Date: Wed, 2 Dec 1998 17:41:09 GMT [thread overview]
Message-ID: <199812021741.RAA04526@dax.scot.redhat.com> (raw)
In-Reply-To: <Pine.LNX.3.96.981201170845.437E-100000@mirkwood.dummy.home>
Hi,
On Tue, 1 Dec 1998 17:12:45 +0100 (CET), Rik van Riel
<H.H.vanRiel@phys.uu.nl> said:
> struct page *page_map = lookup_swap_cache(entry);
> if (!page_map) {
> page_map = read_swap_cache(entry);
> ... do readahead stuff
> }
read_swap_cache() is not asynchronous! include/linux/swap.h:
#define read_swap_cache(entry) read_swap_cache_async(entry, 1);
I think you were on the right lines before (except for the missing
free_page()).
> I have a funny feeling I missed a wait_on_page() this way,
> but things are runnig happily right now.
No, read_swap_cache automatically waits, and if you do the async
version, then any later call to read the same page will in turn wait for
the IO to complete.
--Stephen
--
This is a majordomo managed list. To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org
prev parent reply other threads:[~1998-12-02 17:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-01 16:12 Rik van Riel
1998-12-02 17:41 ` Stephen C. Tweedie [this message]
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=199812021741.RAA04526@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