From: Rik van Riel <riel@conectiva.com.br>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: "Juan J. Quintela" <quintela@fi.udc.es>, linux-mm@kvack.org
Subject: Re: Estrange behaviour of pre9-1
Date: Mon, 15 May 2000 22:03:10 -0300 (BRST) [thread overview]
Message-ID: <Pine.LNX.4.21.0005152156250.20410-100000@duckman.distro.conectiva> (raw)
In-Reply-To: <Pine.LNX.4.10.10005151651140.812-100000@penguin.transmeta.com>
On Mon, 15 May 2000, Linus Torvalds wrote:
> The fact that Rik's patch performs so badly is interesting in
> itself, and I thus removed it from my tree.
This may be because the different try_to_free_pages end
up waiting for each other (to complete IO?).
If VM was constructed right, we would never have the
situation where a half-dozen apps are all waiting in
try_to_free_pages() simultaneously.
The bug is, IMHO, the fact that shrink_mmap() frees the
wrong pages by skipping over buffer pages. This causes
"innocent" apps to have pagefaults they didn't deserve
==> slowdown.
> _Most_ of the time when "try_to_free_pages()" is called, the
> memory actually exists, and we call try_to_free_pages() mainly
> because we want to make sure that we don't get into a bad
> situation.
True.
> So, how about doing something like:
>
> - if memory is low, allocate the page anyway if you can, but increment a
> "bad user" count in current->user->mmuse;
> - when entering __alloc_pages(), if "current->user->mmuse > 0", do a
> "try_to_free_pages()" if there are any zones that need any help
> (otherwise just clear this field).
>
> Think of it as "this user can allocate a few pages, but it's on credit.
> They have to be paid back with the appropriate 'try_to_free_pages()'".
I don't think this will work if we keep stealing the wrong pages
from innocent, small processes with lots of clean pages (ie. bash,
vi, emacs, ...).
> Rik? I think this would solve the fairness concerns without the
> need to tell the rest of the world about a process trying to
> free up memory and causing bad performance..
The main problem now seems to be bad page replacement and a
practically unbounded wait time inside try_to_free_pages().
If we fix those, I think it should be possible to move back
to a slightly more conservative (and safe) model (like what
I had in my patch ... you might argue it is too conservative,
slow or whatever, but it should be the more robust one).
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/
prev parent reply other threads:[~2000-05-16 1:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-15 22:56 Juan J. Quintela
2000-05-15 23:59 ` Linus Torvalds
2000-05-16 0:20 ` Juan J. Quintela
2000-05-16 0:34 ` Linus Torvalds
2000-05-16 0:54 ` Juan J. Quintela
2000-05-16 1:15 ` Rik van Riel
2000-05-16 13:53 ` Linus Torvalds
2000-05-16 14:20 ` Juan J. Quintela
2000-05-16 16:37 ` Roger Larsson
2000-05-16 0:55 ` Rik van Riel
2000-05-16 14:03 ` Linus Torvalds
2000-05-16 1:03 ` Rik van Riel [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=Pine.LNX.4.21.0005152156250.20410-100000@duckman.distro.conectiva \
--to=riel@conectiva.com.br \
--cc=linux-mm@kvack.org \
--cc=quintela@fi.udc.es \
--cc=torvalds@transmeta.com \
/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