linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@conectiva.com.br>
To: "Juan J. Quintela" <quintela@fi.udc.es>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	lkml <linux-kernel@vger.rutgers.edu>,
	linux-mm@kvack.org, linux-fsdevel@vger.rutgers.edu
Subject: Re: PATCH: Improvements in shrink_mmap and kswapd
Date: Sat, 17 Jun 2000 20:12:32 -0300 (BRST)	[thread overview]
Message-ID: <Pine.LNX.4.21.0006172002370.31955-100000@duckman.distro.conectiva> (raw)
In-Reply-To: <ytt3dmcyli7.fsf@serpe.mitica>

On 18 Jun 2000, Juan J. Quintela wrote:

> Reports of success/failure are welcome.  Comments are also welcome.

I have a few comments on the patch. They have mostly to do
with the maxlaunder logic.

A few days ago I sent you the buffer.c patch where
try_to_free_buffers was modified so that it would never try
to do IO on pages if the 'wait' argument has a value of -1.

This can be combined with maxlaunder in a nice way. Firstly
we need to wakeup_bdflush() if we queued some buffers or swap
pages for IO, that way bdflush will flush dirty and IO queued
pages to disk.

Secondly we need to try try_to_free_buffers(page, -1) first,
currently you count freeing buffers without doing IO as an
IO operation (and also, you're starting IO operations when
__GFP_IO isn't set). If that fails and maxlaunder isn't reached
yet, we can try to start asynchronous IO on the page.

When we reach the end of shrink_mmap, we can do something like
this:

wait = 0;
if (nr_writes && (gfp_mask & __GFP_IO))
	wait = 1;
wake_up_bdflush(wait);
if (wait && !ret) {
	goto again;  /* bdflush just made pages available, roll again */
}

This will give us something like write throttling where apps
will be waiting for bdflush to have done IO on pages so we'll
have freeable pages around. If __GFP_IO isn't set we'll still
fail, of course, but this will at least keep applications from
failing needlessly.

regards,

Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.

Wanna talk about the kernel?  irc.openprojects.net / #kernelnewbies
http://www.conectiva.com/		http://www.surriel.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/

  reply	other threads:[~2000-06-17 23:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-17 22:45 Juan J. Quintela
2000-06-17 23:12 ` Rik van Riel [this message]
2000-06-17 23:30 ` Roger Larsson
2000-06-17 23:42   ` Philipp Rumpf
2000-06-18  0:00     ` Roger Larsson
2000-06-18  0:51 ` Roger Larsson
2000-06-18  7:57 ` Mike Galbraith
2000-06-19 23:15 ` PATCH: Improvements in shrink_mmap and kswapd (take 2) Juan J. Quintela

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.21.0006172002370.31955-100000@duckman.distro.conectiva \
    --to=riel@conectiva.com.br \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-fsdevel@vger.rutgers.edu \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.org \
    --cc=quintela@fi.udc.es \
    /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