From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Rik van Riel <riel@conectiva.com.br>, linux-mm@kvack.org
Subject: Re: pre8: where has the anti-hog code gone?
Date: Sun, 14 May 2000 12:52:21 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.10.10005141245510.1494-100000@elte.hu> (raw)
In-Reply-To: <Pine.LNX.4.10.10005130819330.1721-100000@penguin.transmeta.com>
On Sat, 13 May 2000, Linus Torvalds wrote:
> So pre-8 with your suggested for for kswapd() looks pretty good, actually,
> but still has this issue that try_to_free_pages() seems to give up too
> easily and return failure when it shouldn't. [...]
i believe the reason for gfp-NULL failures is the following:
do_try_to_free_pages() _does_ free pages, but we do the sync in the
writeback case _after_ releasing a particular page. This means other
processes can steal our freshly freed pages - rmqueue fails easily. So i'd
suggest the following workaround:
if (try_to_free_pages() was succesful && final rmqueue() failed)
goto repeat;
we could as well do the page_cache_release of the buffer-mapped cache
after sync_page_buffers(), but this only saves a single page - multipage
allocations will still have a big window to fail. The problem is that
freed RAM is anonymous right now. We can fundamentally solve this by
manipulating zone->free_pages the following way:
a __free_pages variant that does not increase zone->free_pages. this is
then later on done by the allocator (ie. __alloc_pages). This 'free page
transport' mechanizm guarantees that the non-atomic allocation path does
not 'lose' free pages along the way.
Ingo
--
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 10:52 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
2000-05-14 8:45 ` Arjan van de Ven
2000-05-15 1:37 ` Linus Torvalds
2000-05-14 10:52 ` Ingo Molnar [this message]
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.10005141245510.1494-100000@elte.hu \
--to=mingo@elte.hu \
--cc=linux-mm@kvack.org \
--cc=riel@conectiva.com.br \
--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