lkml.org 
[lkml]   [2000]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] cacheflushtime
Hi Linus,

taking the hint from someone who's name I'm too lazy to
lookup in my mailfolder (sorry), I've decided to take it
on me to create this small patch against 2.3.41 that
fixes the cacheflushtime calculation.

Linus, could you please apply this patch for the next
version?

regards,

Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.


--- linux-2.3.41/arch/i386/kernel/smpboot.c.orig Mon Jan 31 15:43:02 2000
+++ linux-2.3.41/arch/i386/kernel/smpboot.c Mon Jan 31 15:53:00 2000
@@ -710,7 +710,8 @@

static void smp_tune_scheduling (void)
{
- unsigned long cachesize;
+ unsigned long cachesize; /* kB */
+ unsigned long bandwidth = 350; /* MB/s */
/*
* Rough estimation for SMP scheduling, this is the number of
* cycles it takes for a fully memory-limited process to flush
@@ -731,10 +732,12 @@
return;
} else {
cachesize = boot_cpu_data.x86_cache_size;
- if (cachesize == -1)
- cachesize = 8; /* Pentiums */
+ if (cachesize == -1) {
+ cachesize = 16; /* Pentiums, 2x8kB cache */
+ bandwidth = 100;
+ }

- cacheflush_time = cpu_hz/1024*cachesize/5000;
+ cacheflush_time = (cpu_hz>>20) * (cachesize<<10) / bandwidth;
}

printk("per-CPU timeslice cutoff: %ld.%02ld usecs.\n",

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.172 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site