Re: [PATCH 11/12] mm: per device dirty threshold

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux