lkml.org 
[lkml]   [2007]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 11/12] mm: per device dirty threshold
From
Date
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@chello.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-04-19 20:09    [W:0.050 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site