- 23 Aug, 2004 3 commits
-
-
Mike Kravetz authored
Races have been observed between excec-time overwriting of task->comm and /proc accesses to the same data. This causes environment string information to appear in /proc. Fix that up by taking task_lock() around updates to and accesses to task->comm. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Randy Dunlap authored
add_pin_to_irq() should not be __init; it is used after init code. Signed-off-by: Randy Dunlap <rddunlap@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Ingo Molnar authored
while debugging/improving scheduling latencies i got the following strange latency report from Lee Revell: http://krustophenia.net/testresults.php?dataset=2.6.8.1-P6#/var/www/2.6.8.1-P6 this trace shows a 120 usec latency caused by XFree86, on a 600 MHz x86 system. Looking closer reveals: 00000002 0.006ms (+0.003ms): __switch_to (schedule) 00000002 0.088ms (+0.082ms): finish_task_switch (schedule) it took more than 80 usecs for XFree86 to do a context-switch! it turns out that the reason for this (massive) context-switching overhead is the following change in 2.6.8: [PATCH] larger IO bitmaps To demonstrate the effect of this change i've written ioperm-latency.c (attached), which gives the following on vanilla 2.6.8.1: # ./ioperm-latency default no ioperm: scheduling latency: 2528 cycles turning on port 80 ioperm: scheduling latency: 10563 cycles turning on port 65535 ioperm: scheduling latency: 10517 cycles the ChangeSet says: Now, with the lazy bitmap allocation and per-CPU TSS, this will really not drain any resources I think. this is plain wrong. An increase in the IO bitmap size introduces per-context-switch overhead as well: we now have to copy an 8K bitmap every time XFree86 context-switches - even though XFree86 never uses ports higher than 1024! I've straced XFree86 on a number of x86 systems and in every instance ioperm() was used - so i'd say the majority of x86 Linux systems running 2.6.8.1 are affected by this problem. This not only causes lots of overhead, it also trashes ~16K out of the L1 and L2 caches, on every context-switch. It's as if XFree86 did a L1 cache flush on every context-switch ... the simple solution would be to revert IO_BITMAP_BITS back to 1024 and release 2.6.8.2? I've implemented another solution as well, which tracks the highest-enabled port # for every task and does the copying of the bitmap intelligently. (patch attached) The patched kernel gives: # ./ioperm-latency default no ioperm: scheduling latency: 2423 cycles turning on port 80 ioperm: scheduling latency: 2503 cycles turning on port 65535 ioperm: scheduling latency: 10607 cycles this is much more acceptable - the full overhead only occurs in the very unlikely event of a task using the high ioport range. X doesnt suffer any significant overhead. (tracking the maximum allowed port # also allows a simplification of io_bitmap handling: e.g. we dont do the invalid-offset trick anymore - the IO bitmap in the TSS is always valid and secure.) I tested the patch on x86 SMP and UP, it works fine for me. I tested boundary conditions as well, it all seems secure. Ingo #include <errno.h> #include <stdio.h> #include <sched.h> #include <signal.h> #include <sys/io.h> #include <stdlib.h> #include <unistd.h> #include <linux/unistd.h> #define CYCLES(x) asm volatile ("rdtsc" :"=a" (x)::"edx") #define __NR_sched_set_affinity 241 _syscall3 (int, sched_set_affinity, pid_t, pid, unsigned int, mask_len, unsigned long *, mask) /* * Use a pair of RT processes bound to the same CPU to measure * context-switch overhead: */ static void measure(void) { unsigned long i, min = ~0UL, pid, mask = 1, t1, t2; sched_set_affinity(0, sizeof(mask), &mask); pid = fork(); if (!pid) for (;;) { asm volatile ("sti; nop; cli"); sched_yield(); } sched_yield(); for (i = 0; i < 100; i++) { asm volatile ("sti; nop; cli"); CYCLES(t1); sched_yield(); CYCLES(t2); if (i > 10) { if (t2 - t1 < min) min = t2 - t1; } } asm volatile ("sti"); kill(pid, 9); printf("scheduling latency: %ld cycles\n", min); sched_yield(); } int main(void) { struct sched_param p = { sched_priority: 2 }; unsigned long mask = 1; if (iopl(3)) { printf("need to run as root!\n"); exit(-1); } sched_setscheduler(0, SCHED_FIFO, &p); sched_set_affinity(0, sizeof(mask), &mask); printf("default no ioperm: "); measure(); printf("turning on port 80 ioperm: "); ioperm(0x80,1,1); measure(); printf("turning on port 65535 ioperm: "); if (ioperm(0xffff,1,1)) printf("FAILED - older kernel.\n"); else measure(); return 0; } Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
- 22 Aug, 2004 20 commits
-
-
Linus Torvalds authored
Signed single-bit bitfields really are a pretty strange thing to have. They work, but it wasn't really intentional.
-
http://linux-watchdog.bkbits.net/linux-2.6-watchdogLinus Torvalds authored
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-
http://xfs.org:8090/xfs-linux-2.6Linus Torvalds authored
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-
Cal Peake authored
net/ipv4/proc.c was updated to use a new mechanism for outputting /proc/net/snmp and /proc/net/netstat. However, a superfluous '\n' snuck in, breaking `netstat -s`
-
bk://linux-dj.bkbits.net/cpufreqLinus Torvalds authored
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-
Linus Torvalds authored
This one from Dave Jones, who read the Intel docs even more.
-
bk://bk.arm.linux.org.uk/linux-2.6-fbLinus Torvalds authored
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-
Benjamin Herrenschmidt authored
It seems that on some OldWolrd macs, we don't get the OF stdout device, thus the new set_preferred_console() dies at boot trying to dereference a NULL pointer. Trivial fix.
-
bk://gkernel.bkbits.net/netdev-2.6Linus Torvalds authored
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-
Andy Fleming authored
-
Jeff Garzik authored
into pobox.com:/spare/repo/netdev-2.6/ALL
-
Andries E. Brouwer authored
In 2.5.18 some minix-specific stuff was moved to the minix subdirectory where it belonged. However, a typo crept in, causing inode disk usage to be incorrectly reported. A few people have complained, but so far not sufficiently loudly. Signed-off-by: Andries Brouwer <Andries.Brouwer@cwi.nl> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Alan Cox authored
There are a couple of cache descriptors in the current Intel manuals missing from our tables at least one of which appears in an actual processor in the real world.
-
John Levon authored
A silly bug prevented certain events from being used.
-
bk://linux-acpi.bkbits.net/linux-acpi-release-2.6.8Linus Torvalds authored
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-
Alan Cox authored
This got accidentally reverted in merging HPT372N support. The following patch restores 50Mhz on the HPT374 using the 370a clocking tables.
-
bk://bk.arm.linux.org.uk/linux-2.6-rmkLinus Torvalds authored
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-
Matthew Wilcox authored
Fix some Kconfig dependencies on PA-RISC (Grant Grundler, Martin Schulze, Helge Deller, Matthew Wilcox)
-
Jesse Barnes authored
Define acpi_noirq on ia64 since it's used now in pci_link.c. All ia64 machines use ACPI, so we can just define it to 0 like we do for acpi_disabled and acpi_pci_disabled. Signed-off-by: Jesse Barnes <jbarnes@sgi.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Matthew Wilcox authored
PA-RISC sound updates: - Do a DAC/ADC reset for sampling rate changes in ad1889 (Randolph Chung) - Set the ad1889 interrupt configuration properly (Randolph Chung) - Fix dependency for the OSS Harmony driver (Thibaut Varene) - Forward port Stuart Brady's 2.4 Harmony driver patches (Thibaut Varene) - Fix sample skipping (Stuart Brady) - Prevent harmony_silence being called wrongly (Stuart Brady) - Fix crash caused by buf_to_fill becoming -1 (Stuart Brady) - Improve naming of mixer channels (Stuart Brady) - Implement SNDCTL_DSP_CHANNELS ioctl (Stuart Brady) - Improve toggling the recording source (Stuart Brady) - Sanity check MIXER_WRITE volume levels (Stuart Brady) - Fix MIXER_READ right_level return (Stuart Brady) - Reject AFMT_S16_LE format (Stuart Brady) - Fail OSS Harmony initialisation if no irq (Helge Deller) - Fix typos in ALSA Harmony (Andy Walker, Grant Grundler, Stuart Brady)
-
- 20 Aug, 2004 8 commits
-
-
Dave Jones authored
From: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Dave Jones <davej@redhat.com>
-
Wim Van Sebroeck authored
The watchdog drivers use a VFS implementation and thus should not be lseek'able, so we put a '.llseek = no_llseek' in the file_operations structure.
-
Wim Van Sebroeck authored
cpu5wdt also contains a VFS and thus should be "nonseekable_open"
-
Friedrich Lobenstock authored
Fix example program in pcwd-watchdog.txt document.
-
Arnd Bergmann authored
The watchdog ioctl interface is defined correctly for 32 bit emulation, although WIOC_GETSUPPORT was not marked as such, for an unclear reason. WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT were added in may 2002 to the code but never to the ioctl list. This adds all three definitions. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-
Timothy Shimmin authored
newer bit features than the kernel. SGI Modid: xfs-linux:xfs-kern:177392a Signed-off-by: Nathan Scott <nathans@sgi.com>
-
Christoph Hellwig authored
SGI Modid: xfs-linux:xfs-kern:177165a Signed-off-by: Nathan Scott <nathans@sgi.com>
-
Nathan Scott authored
SGI Modid: xfs-linux:xfs-kern:177164a Signed-off-by: Nathan Scott <nathans@sgi.com>
-
- 19 Aug, 2004 9 commits
-
-
Nathan Scott authored
files can be automatically created as realtime files. SGI Modid: xfs-linux:xfs-kern:177129a Signed-off-by: Nathan Scott <nathans@sgi.com>
-
Nathan Scott authored
SGI Modid: xfs-linux:xfs-kern:177030a Signed-off-by: Nathan Scott <nathans@sgi.com>
-
Nathan Scott authored
SGI Modid: xfs-linux:xfs-kern:177029a Signed-off-by: Nathan Scott <nathans@sgi.com>
-
Herry Wiputra authored
has no extents allocated. SGI Modid: xfs-linux:xfs-kern:18776a Signed-off-by: Nathan Scott <nathans@sgi.com>
-
Dean Roehrich authored
SGI Modid: xfs-linux:xfs-kern:176905a Signed-off-by: Nathan Scott <nathans@sgi.com>
-
Nathan Scott authored
with a shared page. SGI Modid: xfs-linux:xfs-kern:176412a Signed-off-by: Nathan Scott <nathans@sgi.com>
-
Nathan Scott authored
SGI Modid: xfs-linux:xfs-kern:176195a Signed-off-by: Nathan Scott <nathans@sgi.com>
-
Eric Sandeen authored
SGI Modid: xfs-linux:xfs-kern:176159a Signed-off-by: Nathan Scott <nathans@sgi.com>
-
Dave Jones authored
From: Pavel Machek <pavel@ucw.cz> - Add missing newlines - 80-column goodness. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Jones <davej@redhat.com>
-