Re: [PATCH 2/4] Make page-writeback timers 1 sec jiffy aligned

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

 



On Tue, 29 May 2007 10:59:51 -0700
Venki Pallipadi <[email protected]> wrote:

> 
> 
> timer round_jiffies in page-writeback.
> 
> Signed-off-by: Venkatesh Pallipadi <[email protected]>
> 
> Index: linux-2.6.22-rc-mm/mm/page-writeback.c
> ===================================================================
> --- linux-2.6.22-rc-mm.orig/mm/page-writeback.c	2007-05-25 10:49:11.000000000 -0700
> +++ linux-2.6.22-rc-mm/mm/page-writeback.c	2007-05-25 10:49:29.000000000 -0700
> @@ -469,7 +469,7 @@
>  	if (time_before(next_jif, jiffies + HZ))
>  		next_jif = jiffies + HZ;
>  	if (dirty_writeback_interval)
> -		mod_timer(&wb_timer, next_jif);
> +		mod_timer(&wb_timer, round_jiffies(next_jif));
>  }
>  
>  /*
> @@ -481,7 +481,7 @@
>  	proc_dointvec_userhz_jiffies(table, write, file, buffer, length, ppos);
>  	if (dirty_writeback_interval) {
>  		mod_timer(&wb_timer,
> -			jiffies + dirty_writeback_interval);
> +			round_jiffies(jiffies + dirty_writeback_interval));
>  		} else {
>  		del_timer(&wb_timer);
>  	}

mutter.

These tunables are in units of centiseconds, so the user can indeed set the
writeback interval to, say, 0.2 seconds.  People have played with that sort
of thing.

I doubt if this patch will hurt anyone much, but it is an incompatible
user-visible change.

Probably a suitable heuristic for fixing this would be to only do the
rounding if dirty_writeback_interval is a multiple of HZ.  In the vast
majority of cases, that will be true.

-
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