From: Linus Torvalds <torvalds@transmeta.com>
To: Arjan van de Ven <arjan@fenrus.demon.nl>
Cc: linux-mm@kvack.org
Subject: Re: pre8: where has the anti-hog code gone?
Date: Sat, 13 May 2000 20:41:24 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.10.10005132035370.2422-100000@penguin.transmeta.com> (raw)
In-Reply-To: <m12qjP0-000OVtC@amadeus.home.nl>
[ Thanks for looking at this., ]
On Sat, 13 May 2000, Arjan van de Ven wrote:
>
> My idea is (but I have not tested this) that for priority == 0 (aka "Uh oh")
> shrink_mmap or do_try_to_free_pages have to block while waiting for pages to
> be commited to disk. As far as I can see, shrink_mmap just skips pages that
> are being commited to disk, while these could be freed when they are waited
> upon.
That's what I did in one ofthe pre-7's, and it ended up being quite bad
for performance. But that was before I put sync-out pages at the head of
the LRU queue, so what ended up happening is that that particular pre-7
tried to write out the block, and then next time around when shrink_mmap()
rolled around, because the page was still at the end of the LRU queue, so
we immediately ended up synchronously waiting for it.
With the current behaviour, which always moves a page to the front of the
LRU list if it cannot be free'd, the synchronous wait in shrink_mmap() is
probably fine, and you could try to just change "sync_page_buffers()" back
to the code that did
if (buffer_locked(p))
__wait_on_buffer(p);
else if (buffer_dirty(p))
ll_rw_block(WRITE, 1, &p);
(instead of the current "buffer_dirty(p) && !buffer_locked(p)" test that
only starts the IO).
It's clear that at some point we _have_ to wait for pages to actually get
written out, whether they were written for paging or just because they
were dirty data buffers.
Does the above make it ok? How does it feel performance-wise?
Linus
--
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:[~2000-05-14 3:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-12 23:37 Rik van Riel
2000-05-13 15:28 ` Linus Torvalds
2000-05-13 18:14 ` Juan J. Quintela
2000-05-13 21:24 ` Arjan van de Ven
2000-05-13 21:59 ` Juan J. Quintela
2000-05-14 3:41 ` Linus Torvalds [this message]
2000-05-14 8:45 ` Arjan van de Ven
2000-05-15 1:37 ` Linus Torvalds
2000-05-14 10:52 ` Ingo Molnar
2000-05-14 10:55 ` Ingo Molnar
2000-05-14 11:28 ` Ingo Molnar
2000-05-14 12:01 ` Rik van Riel
2000-05-14 12:12 ` Ingo Molnar
2000-05-14 12:19 ` Ingo Molnar
2000-05-15 14:50 Mark_H_Johnson.RTS
2000-05-15 15:58 ` Rik van Riel
2000-05-15 16:01 ` Linus Torvalds
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.10.10005132035370.2422-100000@penguin.transmeta.com \
--to=torvalds@transmeta.com \
--cc=arjan@fenrus.demon.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