From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Nikita Danilov <nikita@clusterfs.com>
Subject: Re: [PATCH 3/3] vm: writeout watermarks
Date: Mon, 7 Nov 2005 13:33:37 -0200 [thread overview]
Message-ID: <20051107153337.GB17246@logos.cnet> (raw)
In-Reply-To: <4366FB4B.9000103@yahoo.com.au>
Nikita has a customer using large percentage of RAM for
a kernel module, which results in get_dirty_limits() misbehaviour
since
unsigned long available_memory = total_pages;
It should work on the amount of cacheable pages instead.
He's got a patch but I dont remember the URL. Nikita?
On Tue, Nov 01, 2005 at 04:21:15PM +1100, Nick Piggin wrote:
> 3/3
>
> --
> SUSE Labs, Novell Inc.
>
> 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 <npiggin@suse.de>
>
>
> Index: linux-2.6/mm/page-writeback.c
> ===================================================================
> --- linux-2.6.orig/mm/page-writeback.c 2005-11-01 13:41:39.000000000 +1100
> +++ linux-2.6/mm/page-writeback.c 2005-11-01 14:29:27.000000000 +1100
> @@ -165,9 +165,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 * available_memory) / 100;
> dirty = (dirty_ratio * available_memory) / 100;
next prev parent reply other threads:[~2005-11-07 20:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-01 5:18 [PATCH 0/3] better zone and watermark balancing Nick Piggin
2005-11-01 5:19 ` [PATCH 1/3] vm: kswapd incmin Nick Piggin
2005-11-01 5:20 ` [PATCH 2/3] vm: highmem watermarks Nick Piggin
2005-11-01 5:21 ` [PATCH 3/3] vm: writeout watermarks Nick Piggin
2005-11-07 15:33 ` Marcelo Tosatti [this message]
2005-11-07 21:13 ` Nikita Danilov
2005-11-07 23:12 ` Nick Piggin
2005-11-07 15:28 ` [PATCH 1/3] vm: kswapd incmin Marcelo Tosatti
2005-11-07 23:08 ` Nick Piggin
2005-11-07 18:43 ` Marcelo Tosatti
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=20051107153337.GB17246@logos.cnet \
--to=marcelo.tosatti@cyclades.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=nikita@clusterfs.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
all inboxes | Powered by JetHome®