From: Andrew Morton <akpm@zip.com.au>
To: William Lee Irwin III <wli@holomorphy.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch] adjustments to dirty memory thresholds
Date: Wed, 28 Aug 2002 15:15:28 -0700 [thread overview]
Message-ID: <3D6D4B80.F84F71E4@zip.com.au> (raw)
In-Reply-To: 3D6D477C.F5116BA7@zip.com.au
Andrew Morton wrote:
>
> ...
> Well it's presumably the GFP_NOIO which has killed it - we can't wait
> on PG_writeback pages and we can't write out dirty pages. Taking a
> nap in mempool_alloc is appropriate.
Actually, it might be better to teach mempool_alloc to not call page reclaim
at all if __GFP_FS is not set. Just kick bdflush and go to sleep.
I really, really, really dislike the VM's tendency to go and scan hundreds
of thousands of pages. It's a clear sign of an inappropriate algorithm.
Test something like this, please?
--- 2.5.32/mm/mempool.c~wli Wed Aug 28 15:07:31 2002
+++ 2.5.32-akpm/mm/mempool.c Wed Aug 28 15:12:53 2002
@@ -196,10 +196,11 @@ repeat_alloc:
return element;
/*
- * If the pool is less than 50% full then try harder
- * to allocate an element:
+ * If the pool is less than 50% full and we can perform effective
+ * page reclaim then try harder to allocate an element:
*/
- if ((gfp_mask != gfp_nowait) && (pool->curr_nr <= pool->min_nr/2)) {
+ if ((gfp_mask & __GFP_FS) && (gfp_mask != gfp_nowait) &&
+ (pool->curr_nr <= pool->min_nr/2)) {
element = pool->alloc(gfp_mask, pool->pool_data);
if (likely(element != NULL))
return element;
.
next prev parent reply other threads:[~2002-08-28 22:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-28 4:39 [patch] adjustments to dirty memory thresholds Andrew Morton
2002-08-28 20:08 ` William Lee Irwin III
2002-08-28 20:27 ` Andrew Morton
2002-08-28 21:42 ` William Lee Irwin III
2002-08-28 21:58 ` Andrew Morton
2002-08-28 22:15 ` Andrew Morton [this message]
2002-08-29 0:26 ` Rik van Riel
2002-08-29 2:10 ` Andrew Morton
2002-08-29 2:10 ` Rik van Riel
2002-08-29 2:52 ` Andrew Morton
2002-09-01 1:37 ` William Lee Irwin III
2002-08-29 3:49 ` William Lee Irwin III
2002-08-29 12:37 ` Rik van Riel
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=3D6D4B80.F84F71E4@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=wli@holomorphy.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.