From: David Rientjes <rientjes@google.com>
To: Andrea Righi <righi.andrea@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
kamezawa.hiroyu@jp.fujitsu.com, balbir@linux.vnet.ibm.com,
mrubin@google.com, menage@google.com, dave@linux.vnet.ibm.com,
chlunde@ping.uio.no, dpshah@google.com, eric.rannaud@gmail.com,
fernando@oss.ntt.co.jp, agk@sourceware.org,
m.innocenti@cineca.it, s-uchida@ap.jp.nec.com,
ryov@valinux.co.jp, matt@bluehost.com, dradford@bluehost.com,
kosaki.motohiro@jp.fujitsu.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, containers@lists.osdl.org
Subject: Re: [PATCH -mm] mm: fine-grained dirty_ratio_pcm and dirty_background_ratio_pcm (v2)
Date: Mon, 10 Nov 2008 14:15:29 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.00.0811101410170.2108@chino.kir.corp.google.com> (raw)
In-Reply-To: <4918AFA1.4000102@gmail.com>
On Mon, 10 Nov 2008, Andrea Righi wrote:
> The KB limit is a static value, the other depends on the dirtyable
> memory. If we want to preserve the same behaviour we should do the
> following:
>
> - when dirty_ratio changes to x:
> dirty_amount_in_bytes = x * dirtyable_memory / 100.
>
> - when dirty_amount_in_bytes changes to x:
> dirty_ratio = x / dirtyable_memory * 100
>
I think the idea is for a dynamic dirty_ratio based on a static value
dirty_amount_in_bytes:
dirtyable_memory = determine_dirtyable_memory() * PAGE_SIZE;
dirty_ratio = dirty_amount_in_bytes / dirtyable_memory;
> But anytime the dirtyable memory changes (as well as the total memory in
> the system) we should update both values accordingly to preserve the
> coherency between them.
>
Only dirty_ratio is actually updated if dirty_amount_in_bytes is static.
This allows you to control how many pages are NR_FILE_DIRTY or
NR_UNSTABLE_NFS and gives you the granularity that you want with
dirty_ratio_pcm, but on a byte scale instead of percent.
It's also a clean interface:
echo 200M > /proc/sys/vm/dirty_ratio_bytes
--
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-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2008-11-10 22:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1221232192-13553-1-git-send-email-righi.andrea@gmail.com>
[not found] ` <20080912131816.e0cfac7a.akpm@linux-foundation.org>
[not found] ` <532480950809221641y3471267esff82a14be8056586@mail.gmail.com>
[not found] ` <48EB4236.1060100@linux.vnet.ibm.com>
[not found] ` <48EB851D.2030300@gmail.com>
[not found] ` <20081008101642.fcfb9186.kamezawa.hiroyu@jp.fujitsu.com>
[not found] ` <48ECB215.4040409@linux.vnet.ibm.com>
2008-10-09 15:29 ` [PATCH -mm] page-writeback: fine-grained dirty_ratio and dirty_background_ratio Andrea Righi
2008-10-10 0:41 ` KAMEZAWA Hiroyuki
2008-10-10 9:32 ` Andrea Righi
2008-10-10 13:13 ` Andrea Righi
2008-11-10 20:58 ` [PATCH -mm] mm: fine-grained dirty_ratio_pcm and dirty_background_ratio_pcm (v2) Andrea Righi
2008-11-10 21:12 ` Andrew Morton
2008-11-10 22:03 ` Andrea Righi
2008-11-10 22:12 ` Andrew Morton
2008-11-10 22:15 ` David Rientjes [this message]
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=alpine.DEB.2.00.0811101410170.2108@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=agk@sourceware.org \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=chlunde@ping.uio.no \
--cc=containers@lists.osdl.org \
--cc=dave@linux.vnet.ibm.com \
--cc=dpshah@google.com \
--cc=dradford@bluehost.com \
--cc=eric.rannaud@gmail.com \
--cc=fernando@oss.ntt.co.jp \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.innocenti@cineca.it \
--cc=matt@bluehost.com \
--cc=menage@google.com \
--cc=mrubin@google.com \
--cc=righi.andrea@gmail.com \
--cc=ryov@valinux.co.jp \
--cc=s-uchida@ap.jp.nec.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