From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Memory Management <linux-mm@kvack.org>
Subject: [PATCH] 3/4: writeout watermarks
Date: Fri, 06 Aug 2004 15:03:01 +1000 [thread overview]
Message-ID: <41131105.8040108@yahoo.com.au> (raw)
In-Reply-To: <41130FD2.5070608@yahoo.com.au>
[-- Attachment #1: Type: text/plain, Size: 221 bytes --]
3/4
3rd attempt for this patch ;)
I have since addressed your concerns.
So for example, with a 10/40 async/sync ratio, if the sync
watermark is moved down to 20, the async mark will be moved
to 5, preserving the ratio.
[-- Attachment #2: vm-tune-writeout.patch --]
[-- Type: text/x-patch, Size: 1208 bytes --]
Slightly change the writeout watermark calculations so we keep background
and synchronous writeout watermarks in the same ratios after adjusting them.
This ensures we should always attempt to start background writeout before
synchronous writeout.
Signed-off-by: Nick Piggin <nickpiggin@cyberone.com.au>
---
linux-2.6-npiggin/mm/page-writeback.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff -puN mm/page-writeback.c~vm-tune-writeout mm/page-writeback.c
--- linux-2.6/mm/page-writeback.c~vm-tune-writeout 2004-08-06 14:48:45.000000000 +1000
+++ linux-2.6-npiggin/mm/page-writeback.c 2004-08-06 14:48:45.000000000 +1000
@@ -153,9 +153,11 @@ get_dirty_limits(struct writeback_state
if (dirty_ratio < 5)
dirty_ratio = 5;
- background_ratio = dirty_background_ratio;
- if (background_ratio >= dirty_ratio)
- background_ratio = dirty_ratio / 2;
+ /*
+ * Keep the ratio between dirty_ratio and background_ratio roughly
+ * what the sysctls are after dirty_ratio has been scaled (above).
+ */
+ background_ratio = dirty_background_ratio * dirty_ratio/vm_dirty_ratio;
background = (background_ratio * total_pages) / 100;
dirty = (dirty_ratio * total_pages) / 100;
_
next prev parent reply other threads:[~2004-08-06 5:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-06 4:57 [PATCH] 1/4: rework alloc_pages Nick Piggin
2004-08-06 4:57 ` [PATCH] 2/4: highmem watermarks Nick Piggin
2004-08-06 5:03 ` Nick Piggin [this message]
2004-08-06 5:04 ` [PATCH] 4/4: incremental min aware kswapd Nick Piggin
2004-08-06 5:27 ` [PATCH] 3/4: writeout watermarks Andrew Morton
2004-08-06 5:34 ` Nick Piggin
2004-08-06 5:49 ` Andrew Morton
2004-08-06 6:13 ` Nick Piggin
2004-08-06 6:19 ` Andrew Morton
2004-08-06 6:36 ` Nick Piggin
2004-08-06 5:12 ` [PATCH] 1/4: rework alloc_pages Nick Piggin
2004-08-06 5:19 ` Andrew Morton
2004-08-06 5:29 ` Nick Piggin
2004-08-06 5:37 ` Andrew Morton
2004-08-06 6:05 ` Nick Piggin
2004-08-06 6:17 ` Andrew Morton
2004-08-06 12:01 ` 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=41131105.8040108@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@osdl.org \
--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