[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1177005854.2934.6.camel@lappy>
Date: Thu, 19 Apr 2007 20:04:14 +0200
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Miklos Szeredi <miklos@...redi.hu>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, neilb@...e.de, dgc@....com,
tomoki.sekiyama.qu@...achi.com, nikita@...sterfs.com,
trond.myklebust@....uio.no, yingchao.zhou@...il.com
Subject: Re: [PATCH 11/12] mm: per device dirty threshold
On Thu, 2007-04-19 at 19:49 +0200, Miklos Szeredi wrote:
> > +static inline unsigned long bdi_stat_delta(void)
> > +{
> > +#ifdef CONFIG_SMP
> > + return NR_CPUS * FBC_BATCH;
>
> Shouln't this be multiplied by the number of counters to sum? I.e. 3
> if dirty and unstable are separate, and 2 if they are not.
Ah, yes, good catch. How about this:
---
Since we're adding 3 stat counters, tripple the per counter delta as
well.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
---
mm/page-writeback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/mm/page-writeback.c
===================================================================
--- linux-2.6.orig/mm/page-writeback.c 2007-04-19 19:59:26.000000000 +0200
+++ linux-2.6/mm/page-writeback.c 2007-04-19 20:00:09.000000000 +0200
@@ -321,7 +321,7 @@ static void balance_dirty_pages(struct a
get_dirty_limits(&background_thresh, &dirty_thresh,
&bdi_thresh, bdi);
- if (bdi_thresh < bdi_stat_delta()) {
+ if (bdi_thresh < 3*bdi_stat_delta()) {
bdi_nr_reclaimable =
bdi_stat_sum(bdi, BDI_DIRTY) +
bdi_stat_sum(bdi, BDI_UNSTABLE);
-
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