On Mon, 28 Jan 2002, Richard Guenther wrote:
> > + cache_decay_ticks = (long)cacheflush_time/cpu_khz * HZ / 1000;
> > +
> > printk("per-CPU timeslice cutoff: %ld.%02ld usecs.\n",
> > (long)cacheflush_time/(cpu_khz/1000),
> > ((long)cacheflush_time*100/(cpu_khz/1000)) % 100);
> > + printk("task migration cache decay timeout: %ld msecs.\n",
> > + (cache_decay_ticks + 1) * 1000 / HZ);
> Isnt it better for such randomly(?) choosen numbers like 1000 and 100
> which you use to divide / modulo to choose them as a near power of
> two? Like 1024 for / 1000 and 128 for the */% 100 above? For
> correctness just change cpu_khz to be 1024*hz, not 1000*hz.
it's not randomly chosen numbers. From cacheflush_time i'm calculating the
time it takes the cache to flush, in timer ticks.
Ingo
-
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/
This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:00:48 EST