From: Con Kolivas <kernel@kolivas.org>
To: linux list <linux-kernel@vger.kernel.org>
Cc: ck list <ck@vds.kolivas.org>
Subject: [ckpatch][25/29] mm-decrease_minimum_dirty_ratio.patch
Date: Sun, 18 Jun 2006 17:35:04 +1000 [thread overview]
Message-ID: <200606181735.05219.kernel@kolivas.org> (raw)
Make it possible to set dirty_ratio to 0, setting it to MAX_WRITEBACK_PAGES
when the value is ultra low, and set background to 0 when that is the case.
Signed-off-by: Con Kolivas <kernel@kolivas.org>
---
mm/page-writeback.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
Index: linux-ck-dev/mm/page-writeback.c
===================================================================
--- linux-ck-dev.orig/mm/page-writeback.c 2006-06-18 15:20:11.000000000 +1000
+++ linux-ck-dev/mm/page-writeback.c 2006-06-18 15:25:16.000000000 +1000
@@ -126,9 +126,6 @@ static void get_writeback_state(struct w
*
* We only allow 1/2 of the currently-unmapped memory to be dirtied.
*
- * We don't permit the clamping level to fall below 5% - that is getting rather
- * excessive.
- *
* We make sure that the background writeout level is below the adjusted
* clamping level.
*/
@@ -162,15 +159,16 @@ get_dirty_limits(struct writeback_state
if (dirty_ratio > unmapped_ratio / 2)
dirty_ratio = unmapped_ratio / 2;
- if (dirty_ratio < 5)
- dirty_ratio = 5;
-
background_ratio = dirty_background_ratio;
if (background_ratio >= dirty_ratio)
background_ratio = dirty_ratio / 2;
background = (background_ratio * available_memory) / 100;
dirty = (dirty_ratio * available_memory) / 100;
+ if (dirty < MAX_WRITEBACK_PAGES) {
+ dirty = MAX_WRITEBACK_PAGES;
+ background = 0;
+ }
tsk = current;
if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk)) {
background += background / 4;
--
-ck
reply other threads:[~2006-06-18 7:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200606181735.05219.kernel@kolivas.org \
--to=kernel@kolivas.org \
--cc=ck@vds.kolivas.org \
--cc=linux-kernel@vger.kernel.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 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.