From: Wu Fengguang <fengguang.wu@intel.com>
To: "sedat.dilek@gmail.com" <sedat.dilek@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@lst.de>,
Trond Myklebust <Trond.Myklebust@netapp.com>,
Dave Chinner <david@fromorbit.com>, Theodore Ts'o <tytso@mit.edu>,
Chris Mason <chris.mason@oracle.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Mel Gorman <mel@csn.ul.ie>, Rik van Riel <riel@redhat.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Greg Thelen <gthelen@google.com>,
Minchan Kim <minchan.kim@gmail.com>,
Vivek Goyal <vgoyal@redhat.com>,
Andrea Righi <arighi@develer.com>,
Balbir Singh <balbir@linux.vnet.ibm.com>,
linux-mm <linux-mm@kvack.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 00/12] IO-less dirty throttling v7
Date: Mon, 18 Apr 2011 08:13:33 +0800 [thread overview]
Message-ID: <20110418001333.GA8890@localhost> (raw)
In-Reply-To: <20110417041003.GA17032@localhost>
Hi Sedat,
> Please revert the last commit. It's not necessary anyway.
>
> commit 84a9890ddef487d9c6d70934c0a2addc65923bcf
> Author: Wu Fengguang <fengguang.wu@intel.com>
> Date: Sat Apr 16 18:38:41 2011 -0600
>
> writeback: scale dirty proportions period with writeout bandwidth
>
> CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Please do revert that commit, because I found a sleep-inside-spinlock
bug with it. Here is the fixed one (but you don't have to track this
optional patch).
Thanks,
Fengguang
---
Subject: writeback: scale dirty proportions period with writeout bandwidth
Date: Sat Apr 16 18:38:41 CST 2011
CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
mm/page-writeback.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
--- linux-next.orig/mm/page-writeback.c 2011-04-17 20:52:13.000000000 +0800
+++ linux-next/mm/page-writeback.c 2011-04-18 07:57:01.000000000 +0800
@@ -121,20 +121,13 @@ static struct prop_descriptor vm_complet
static struct prop_descriptor vm_dirties;
/*
- * couple the period to the dirty_ratio:
+ * couple the period to global write throughput:
*
- * period/2 ~ roundup_pow_of_two(dirty limit)
+ * period/2 ~ roundup_pow_of_two(write IO throughput)
*/
static int calc_period_shift(void)
{
- unsigned long dirty_total;
-
- if (vm_dirty_bytes)
- dirty_total = vm_dirty_bytes / PAGE_SIZE;
- else
- dirty_total = (vm_dirty_ratio * determine_dirtyable_memory()) /
- 100;
- return 2 + ilog2(dirty_total - 1);
+ return 2 + ilog2(default_backing_dev_info.avg_write_bandwidth);
}
/*
@@ -143,6 +136,13 @@ static int calc_period_shift(void)
static void update_completion_period(void)
{
int shift = calc_period_shift();
+
+ if (shift > PROP_MAX_SHIFT)
+ shift = PROP_MAX_SHIFT;
+
+ if (abs(shift - vm_completions.pg[0].shift) <= 1)
+ return;
+
prop_change_shift(&vm_completions, shift);
prop_change_shift(&vm_dirties, shift);
}
@@ -180,7 +180,6 @@ int dirty_ratio_handler(struct ctl_table
ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
if (ret == 0 && write && vm_dirty_ratio != old_ratio) {
- update_completion_period();
vm_dirty_bytes = 0;
}
return ret;
@@ -196,7 +195,6 @@ int dirty_bytes_handler(struct ctl_table
ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
if (ret == 0 && write && vm_dirty_bytes != old_bytes) {
- update_completion_period();
vm_dirty_ratio = 0;
}
return ret;
@@ -1044,6 +1042,8 @@ snapshot:
bdi->bw_time_stamp = now;
unlock:
spin_unlock(&dirty_lock);
+ if (gbdi->bw_time_stamp == now)
+ update_completion_period();
}
static unsigned long max_pause(struct backing_dev_info *bdi,
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-04-18 0:13 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
2011-04-16 13:25 ` [PATCH 01/12] writeback: account per-bdi accumulated written pages Wu Fengguang
2011-04-16 13:25 ` [PATCH 02/12] writeback: account per-bdi accumulated dirtied pages Wu Fengguang
2011-04-16 13:25 ` [PATCH 03/12] writeback: bdi write bandwidth estimation Wu Fengguang
2011-04-16 13:25 ` [PATCH 04/12] writeback: smoothed global/bdi dirty pages Wu Fengguang
2011-04-16 13:25 ` [PATCH 05/12] writeback: smoothed dirty threshold and limit Wu Fengguang
2011-04-16 13:25 ` [PATCH 06/12] writeback: enforce 1/4 gap between the dirty/background thresholds Wu Fengguang
2011-04-16 13:25 ` [PATCH 07/12] writeback: base throttle bandwidth and position ratio Wu Fengguang
2011-04-16 13:25 ` [PATCH 08/12] writeback: IO-less balance_dirty_pages() Wu Fengguang
2011-04-16 13:25 ` [PATCH 09/12] writeback: show bdi write bandwidth in debugfs Wu Fengguang
2011-04-16 13:25 ` [PATCH 10/12] writeback: trace dirty_ratelimit Wu Fengguang
2011-04-16 13:25 ` [PATCH 11/12] writeback: trace balance_dirty_pages Wu Fengguang
2011-04-16 13:25 ` [PATCH 12/12] writeback: trace global_dirty_state Wu Fengguang
2011-04-16 16:27 ` [PATCH 00/12] IO-less dirty throttling v7 Sedat Dilek
2011-04-17 1:44 ` Wu Fengguang
2011-04-17 3:18 ` Sedat Dilek
2011-04-17 4:10 ` Wu Fengguang
2011-04-17 4:46 ` Sedat Dilek
2011-04-17 6:46 ` Sedat Dilek
2011-04-18 0:13 ` Wu Fengguang [this message]
2011-04-18 6:57 ` Sedat Dilek
2011-04-18 8:18 ` Wu Fengguang
2011-04-18 10:22 ` Sedat Dilek
2011-04-17 7:31 ` Marco Stornelli
2011-04-17 9:30 ` Wu Fengguang
2011-04-17 17:44 ` Marco Stornelli
2011-04-17 23:31 ` Wu Fengguang
2011-04-26 17:19 ` Vivek Goyal
2011-04-28 14:27 ` Wu Fengguang
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=20110418001333.GA8890@localhost \
--to=fengguang.wu@intel.com \
--cc=Trond.Myklebust@netapp.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=arighi@develer.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=chris.mason@oracle.com \
--cc=david@fromorbit.com \
--cc=gthelen@google.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=minchan.kim@gmail.com \
--cc=riel@redhat.com \
--cc=sedat.dilek@gmail.com \
--cc=tytso@mit.edu \
--cc=vgoyal@redhat.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;
as well as URLs for NNTP newsgroup(s).