[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1315823285.26517.27.camel@twins>
Date: Mon, 12 Sep 2011 12:28:05 +0200
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Wu Fengguang <fengguang.wu@...el.com>
Cc: "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Jan Kara <jack@...e.cz>, Christoph Hellwig <hch@....de>,
Dave Chinner <david@...morbit.com>,
Greg Thelen <gthelen@...gle.com>,
Minchan Kim <minchan.kim@...il.com>,
Vivek Goyal <vgoyal@...hat.com>,
Andrea Righi <arighi@...eler.com>,
linux-mm <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 14/18] writeback: control dirty pause time
On Wed, 2011-09-07 at 10:02 +0800, Wu Fengguang wrote:
> > also, do the two other line segments connect on the transition
> > point?
>
> I guess we can simply unify the other two formulas into one:
>
> } else if (period <= max_pause / 4 &&
> pages_dirtied >= current->nr_dirtied_pause) {
> current->nr_dirtied_pause = clamp_val(
> ==> dirty_ratelimit * (max_pause / 2) / HZ,
> pages_dirtied + pages_dirtied / 8,
> pages_dirtied * 4);
> } else if (pause >= max_pause) {
> current->nr_dirtied_pause = 1 | clamp_val(
> ==> dirty_ratelimit * (max_pause / 2) / HZ,
> pages_dirtied / 4,
> pages_dirtied - pages_dirtied / 8);
> }
There's still the clamping, that combined with the various conditionals
make it very hard to tell if the functions are connected or jump around.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists