From: Rik van Riel <riel@conectiva.com.br>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: linux-mm@kvack.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: nr_async_pages and swapin readahead on -ac series
Date: Thu, 8 Mar 2001 09:17:24 -0300 (BRST) [thread overview]
Message-ID: <Pine.LNX.4.33.0103080916530.1409-100000@duckman.distro.conectiva> (raw)
In-Reply-To: <Pine.LNX.4.21.0103072241130.1268-100000@freak.distro.conectiva>
On Wed, 7 Mar 2001, Marcelo Tosatti wrote:
> On the latest 2.4 -ac series, nr_async_pages is only being used to count
> swap outs, and not for both swap reads and writes (as Linus tree does).
>
> The problem is that nr_async_pages is used to limit swapin readahead based
> on the number of on flight swap pages (mm/memory.c::swapin_readahead):
>
> /* Don't block on I/O for read-ahead */
> if (atomic_read(&nr_async_pages) >= pager_daemon.swap_cluster
> * (1 << page_cluster)) {
> while (i++ < num)
> swap_free(SWP_ENTRY(SWP_TYPE(entry), offset++));
> break;
> }
>
>
> So swapin readahead is (theorically) unlimited.
> However, I think a better solution is to ask the block layer if
> there are free requests on the device queue and stop the
> readahead in case there are no free ones. (we don't something
> like that right now, but it can be easily done in the block
> layer)
An even better idea would be to only do swapin readahead if
there is memory available ...
regards,
Rik
--
Linux MM bugzilla: http://linux-mm.org/bugzilla.shtml
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...
http://www.surriel.com/
http://www.conectiva.com/ http://distro.conectiva.com/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next prev parent reply other threads:[~2001-03-08 12:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-08 1:57 Marcelo Tosatti
2001-03-08 12:17 ` Rik van Riel [this message]
2001-03-08 20:17 ` Stephen C. Tweedie
2001-03-08 22:47 ` Marcelo Tosatti
2001-03-09 11:02 ` 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=Pine.LNX.4.33.0103080916530.1409-100000@duckman.distro.conectiva \
--to=riel@conectiva.com.br \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-mm@kvack.org \
--cc=marcelo@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