Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58337
b: refs/heads/master
c: 9467d64
h: refs/heads/master
i:
  58335: f5a0524
v: v3
  • Loading branch information
Ivo van Doorn authored and Jeff Garzik committed Jul 9, 2007
1 parent 06fe61f commit 0c80d63
Show file tree
Hide file tree
Showing 100 changed files with 4,407 additions and 5,521 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27a278aa4309df244a2619f47031acce00ca1b7c
refs/heads/master: 9467d64b0e88763914c01f71ddf591b166c4f526
43 changes: 43 additions & 0 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,49 @@ and is between 256 and 4096 characters. It is defined in the file

mga= [HW,DRM]

migration_cost=
[KNL,SMP] debug: override scheduler migration costs
Format: <level-1-usecs>,<level-2-usecs>,...
This debugging option can be used to override the
default scheduler migration cost matrix. The numbers
are indexed by 'CPU domain distance'.
E.g. migration_cost=1000,2000,3000 on an SMT NUMA
box will set up an intra-core migration cost of
1 msec, an inter-core migration cost of 2 msecs,
and an inter-node migration cost of 3 msecs.

WARNING: using the wrong values here can break
scheduler performance, so it's only for scheduler
development purposes, not production environments.

migration_debug=
[KNL,SMP] migration cost auto-detect verbosity
Format=<0|1|2>
If a system's migration matrix reported at bootup
seems erroneous then this option can be used to
increase verbosity of the detection process.
We default to 0 (no extra messages), 1 will print
some more information, and 2 will be really
verbose (probably only useful if you also have a
serial console attached to the system).

migration_factor=
[KNL,SMP] multiply/divide migration costs by a factor
Format=<percent>
This debug option can be used to proportionally
increase or decrease the auto-detected migration
costs for all entries of the migration matrix.
E.g. migration_factor=150 will increase migration
costs by 50%. (and thus the scheduler will be less
eager migrating cache-hot tasks)
migration_factor=80 will decrease migration costs
by 20%. (thus the scheduler will be more eager to
migrate tasks)

WARNING: using the wrong values here can break
scheduler performance, so it's only for scheduler
development purposes, not production environments.

mousedev.tap_time=
[MOUSE] Maximum time between finger touching and
leaving touchpad surface for touch to be considered
Expand Down
119 changes: 0 additions & 119 deletions trunk/Documentation/sched-design-CFS.txt

This file was deleted.

12 changes: 12 additions & 0 deletions trunk/arch/i386/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,17 @@ static int __cpuinit __smp_prepare_cpu(int cpu)
}
#endif

static void smp_tune_scheduling(void)
{
if (cpu_khz) {
/* cache size in kB */
long cachesize = boot_cpu_data.x86_cache_size;

if (cachesize > 0)
max_cache_size = cachesize * 1024;
}
}

/*
* Cycle through the processors sending APIC IPIs to boot each.
*/
Expand Down Expand Up @@ -969,6 +980,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
x86_cpu_to_apicid[0] = boot_cpu_physical_apicid;

current_thread_info()->cpu = 0;
smp_tune_scheduling();

set_cpu_sibling_map(0);

Expand Down
9 changes: 1 addition & 8 deletions trunk/arch/i386/kernel/tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See comments there for proper credits.
*/

#include <linux/sched.h>
#include <linux/clocksource.h>
#include <linux/workqueue.h>
#include <linux/cpufreq.h>
Expand Down Expand Up @@ -107,13 +106,8 @@ unsigned long long sched_clock(void)

/*
* Fall back to jiffies if there's no TSC available:
* ( But note that we still use it if the TSC is marked
* unstable. We do this because unlike Time Of Day,
* the scheduler clock tolerates small errors and it's
* very important for it to be as fast as the platform
* can achive it. )
*/
if (unlikely(!tsc_enabled && !tsc_unstable))
if (unlikely(!tsc_enabled))
/* No locking but a rare wrong value is not a big deal: */
return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ);

Expand Down Expand Up @@ -283,7 +277,6 @@ static struct clocksource clocksource_tsc = {

void mark_tsc_unstable(char *reason)
{
sched_clock_unstable_event();
if (!tsc_unstable) {
tsc_unstable = 1;
tsc_enabled = 0;
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/ia64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,7 @@ static void __cpuinit
get_max_cacheline_size (void)
{
unsigned long line_size, max = 1;
unsigned int cache_size = 0;
u64 l, levels, unique_caches;
pal_cache_config_info_t cci;
s64 status;
Expand Down Expand Up @@ -834,6 +835,8 @@ get_max_cacheline_size (void)
line_size = 1 << cci.pcci_line_size;
if (line_size > max)
max = line_size;
if (cache_size < cci.pcci_cache_size)
cache_size = cci.pcci_cache_size;
if (!cci.pcci_unified) {
status = ia64_pal_cache_config_info(l,
/* cache_type (instruction)= */ 1,
Expand All @@ -850,6 +853,9 @@ get_max_cacheline_size (void)
ia64_i_cache_stride_shift = cci.pcci_stride;
}
out:
#ifdef CONFIG_SMP
max_cache_size = max(max_cache_size, cache_size);
#endif
if (max > ia64_max_cacheline_size)
ia64_max_cacheline_size = max;
}
Expand Down
11 changes: 11 additions & 0 deletions trunk/arch/mips/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ int __cpu_logical_map[NR_CPUS]; /* Map logical to physical */
EXPORT_SYMBOL(phys_cpu_present_map);
EXPORT_SYMBOL(cpu_online_map);

/* This happens early in bootup, can't really do it better */
static void smp_tune_scheduling (void)
{
struct cache_desc *cd = &current_cpu_data.scache;
unsigned long cachesize = cd->linesz * cd->sets * cd->ways;

if (cachesize > max_cache_size)
max_cache_size = cachesize;
}

extern void __init calibrate_delay(void);
extern ATTRIB_NORET void cpu_idle(void);

Expand Down Expand Up @@ -218,6 +228,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
{
init_new_context(current, &init_mm);
current_thread_info()->cpu = 0;
smp_tune_scheduling();
plat_prepare_cpus(max_cpus);
#ifndef CONFIG_HOTPLUG_CPU
cpu_present_map = cpu_possible_map;
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/sparc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ void __cpuinit smp_store_cpu_info(int id)
cpu_data(id).prom_node = cpu_node;
cpu_data(id).mid = cpu_get_hwmid(cpu_node);

/* this is required to tune the scheduler correctly */
/* is it possible to have CPUs with different cache sizes? */
if (id == boot_cpu_id) {
int cache_line,cache_nlines;
cache_line = 0x20;
cache_line = prom_getintdefault(cpu_node, "ecache-line-size", cache_line);
cache_nlines = 0x8000;
cache_nlines = prom_getintdefault(cpu_node, "ecache-nlines", cache_nlines);
max_cache_size = cache_line * cache_nlines;
}
if (cpu_data(id).mid < 0)
panic("No MID found for CPU%d at node 0x%08d", id, cpu_node);
}
Expand Down
27 changes: 27 additions & 0 deletions trunk/arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,32 @@ int setup_profiling_timer(unsigned int multiplier)
return -EINVAL;
}

static void __init smp_tune_scheduling(void)
{
unsigned int smallest = ~0U;
int i;

for (i = 0; i < NR_CPUS; i++) {
unsigned int val = cpu_data(i).ecache_size;

if (val && val < smallest)
smallest = val;
}

/* Any value less than 256K is nonsense. */
if (smallest < (256U * 1024U))
smallest = 256 * 1024;

max_cache_size = smallest;

if (smallest < 1U * 1024U * 1024U)
printk(KERN_INFO "Using max_cache_size of %uKB\n",
smallest / 1024U);
else
printk(KERN_INFO "Using max_cache_size of %uMB\n",
smallest / 1024U / 1024U);
}

/* Constrain the number of cpus to max_cpus. */
void __init smp_prepare_cpus(unsigned int max_cpus)
{
Expand All @@ -1180,6 +1206,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
}

cpu_data(boot_cpu_id).udelay_val = loops_per_jiffy;
smp_tune_scheduling();
}

void __devinit smp_prepare_boot_cpu(void)
Expand Down
16 changes: 9 additions & 7 deletions trunk/drivers/ide/arm/icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,21 +448,23 @@ static int icside_dma_test_irq(ide_drive_t *drive)
ICS_ARCIN_V6_INTRSTAT_1)) & 1;
}

static void icside_dma_timeout(ide_drive_t *drive)
static int icside_dma_timeout(ide_drive_t *drive)
{
printk(KERN_ERR "%s: DMA timeout occurred: ", drive->name);

if (icside_dma_test_irq(drive))
return;
return 0;

ide_dump_status(drive, "DMA timeout", HWIF(drive)->INB(IDE_STATUS_REG));
ide_dump_status(drive, "DMA timeout",
HWIF(drive)->INB(IDE_STATUS_REG));

icside_dma_end(drive);
return icside_dma_end(drive);
}

static void icside_dma_lost_irq(ide_drive_t *drive)
static int icside_dma_lostirq(ide_drive_t *drive)
{
printk(KERN_ERR "%s: IRQ lost\n", drive->name);
return 1;
}

static void icside_dma_init(ide_hwif_t *hwif)
Expand All @@ -488,8 +490,8 @@ static void icside_dma_init(ide_hwif_t *hwif)
hwif->dma_start = icside_dma_start;
hwif->ide_dma_end = icside_dma_end;
hwif->ide_dma_test_irq = icside_dma_test_irq;
hwif->dma_timeout = icside_dma_timeout;
hwif->dma_lost_irq = icside_dma_lost_irq;
hwif->ide_dma_timeout = icside_dma_timeout;
hwif->ide_dma_lostirq = icside_dma_lostirq;

hwif->drives[0].autodma = hwif->autodma;
hwif->drives[1].autodma = hwif->autodma;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ide/cris/ide-cris.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ init_e100_ide (void)
hwif->dma_host_off = &cris_dma_off;
hwif->dma_host_on = &cris_dma_on;
hwif->dma_off_quietly = &cris_dma_off;
hwif->cbl = ATA_CBL_PATA40;
hwif->udma_four = 0;
hwif->ultra_mask = cris_ultra_mask;
hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */
hwif->autodma = 1;
Expand Down
Loading

0 comments on commit 0c80d63

Please sign in to comment.