On Wed, 2009-10-07 at 15:38 +0800, Wu Fengguang wrote: > +static void bdi_calc_write_bandwidth(struct backing_dev_info *bdi, > + unsigned long nr_pages, > + unsigned long time) > +{ > + unsigned long bw; > + > + bw = HZ * nr_pages / (time | 1); > + bdi->write_bandwidth = (bdi->write_bandwidth * 63 + bw) / 64; > +} If you have block times < 1 jiffy this all falls apart quite quickly. You could perhaps try to use cpu_clock() for ns resolution timestamps if this is a real issue. (I could imagine fast arrays with huge throughput causing small sleeps, resulting in underestimates of their bandwidth) Also, 63/64 seems rather slow progress.. maybe that's good. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html