- 24 Aug, 2004 40 commits
-
-
Andi Kleen authored
This fixes various issues in the previous update, in particular a kernel without CONFIG_GART_IOMMU should boot now again, The kernel discoverys PCI BUS<->CPU affinity on AMD systems now. It is so far used by dma_alloc_coherent to allocate memory Experimental patches to add this to sysfs exist, but they're not included yet. On systems with no memory on a CPU this information may be wrong. It has a new experimental CONFIG_UNORDERED_IO option. When enabled it uses write combining for stores to device iomemory mapping. This may give better performance with some device drivers, but has a slight risk of breaking drivers (in general if a driver works on ia64,ppc64,sparc64 it should also work). Based on some discussions with Grant Grundler. It requires the driver to use memory barriers properly. I would be interested in feedback on any performance changes you're seeing. For a production system I would recommend to keep it turned off(although I run it on all my systems and haven't run into any problems yet) ACPI and Centrino speedstep is enabled now for Nocona systems. The IOMMU code does lazy merging by default now, which should be safe and may increase performance on block IO. It also avoids SAC force by default now. The machine check code has been improved again, hopefully it is good now. It will log now machine check events from before the last reset. And various other fixes. The x86-64 parts are now gcc 3.5 clean. And various other fixes - Update defconfig - Reset lost ticks on lost time warning, print RIP. - Make TASK_SIZE test for 32bit (Arjan van de Ven) - Work around bug in generic code that broke pcibus_to_cpumask - Actually fix dummy iommu code - Compile i386 acpi and speedstep-centrino cpufreq modules - Export cpu_khz - Fix compilation without GART_IOMMU - Optimize find_*_bit functions for small fields - Discover nodes near PCI busses on K8 (Travis Betak, changed by me) - Optimize gart tlb flush slightly - Add experimental CONFIG_UNORDERED_IO for unordered IO stores - Add 32bit emulation for PTRACE_GETEVENTMSG - Fix kernel_fpu_{begin,end} for preemptive kernels (Alexander Nyberg) - Readd proper check for biomerge (got lost) - Set up 32bit vsyscall page for ptrace early - Add 32bit emulation for lookup_dcookie() for oprofile - Export copy_page / clear_page - Use rex prefix in save_init_fpu fxsave (Jan Beulich) - Make it compile again - Fix handling of hwdev == NULL (= ISA/LPC devices) in swiotlb - Convert PCI DMA code to dma devices - Change IOMMU code to use dummy fallback device instead of hardcoded NULL tests everywhere. - Test iommu_sac_force instead of nommu for DAC supported macro (will cause more drivers to use DAC) - Harden non IOMMU dma_alloc_consistent code to fail less likely. - Remove use of strsep in option parsers - Remove duplicated exports (Arjan van der Ven) - Fix EFAULT checking in ptrace (John Blackwood) - Update defconfig - Remove dead URL from boot/setup.S (R.J. Wysocki) - Use compat_sigval_t instead of sigval_t32 (Al Viro) - Nanooptimization in 32bit ptregs calls - Fix gcc 3.5 compilation in mtrr.h - Pass pt_regs as pointer to avoid illegal pass by reference (for gcc 3.5) - Make set_bit take int not long (Harald Dunkel) - Avoid panic on pci_map_sg and pci_alloc_consistent overflow in GART IOMMU - Handle large lost time delays in HPET code (Suresh B. Siddha) - Work around theoretical bugs in prefetch handling (suggested by Jamie Lokier) - Remove mtrr_strings declaration for gcc 3.5 - Set KBUILD_IMAGE for make rpm (William Lee Irwin III) - Add iommu=noaperture to not touch the aperture - Clean up argument parsing for iommu= option - Export symbols for xchgadd based rwsems (still disabled) - Define iommu_bio_merge for !CONFIG_GART_IOMMU - Don't use backwards rep ; movsb for memmove - Out line bitmap search functions (saves 8k .text, from i386) - Convert bitmap search functions to 64bit accesses and optimize them a bit. - Handle corrupted page tables in page fault handler - Set iommu_merge (without force) to on by default again. - Don't do bio merging by default for iommu=merge. This should make it safe to use again - Add iommu=biomerge option to enable BIO merging (like old iommu=merge) - Fix iommu=memaper=... parsing - More MCE fixes (based on a patch by Eric Morton, heavily changed by me) - Fix check for banks causing exceptions - Allow to reinit MCEs later even after mce=off, fix wrong use of __initdata to disable at boot, but reenable later. - Log left over machine checks after boot and resume - Fix missing prototype warning with CPU_FREQ on - Fix parsing of noexec=on (Ian Hastie) - Fix warning in ia32_binfmt.c - Resync time variable cpu frequency handling with i386 - Resync msr.c with i386 - Add 0x60 level 1 intel cache descriptor (from i386) - Remove duplicated 32bit ioctls (Arnd Bergmann) - Enable -msoft-float (from i386) - Use faster version of FPU hang fix - handle the exception * a bit experimental, if you see "kernel ... math error" events in the log please report. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Adam Kropelin authored
Adds a kernel boot parameter "lpj=NNN" which allows the operator to specify the loops-per-jiffy value. This shaves up to a quarter of a second off boot times, which are critical for embedded appliances. It's a bit thin, but the code is in __init. Signed-off-by: Adam Kropelin <akropel1@rochester.rr.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Mika Kukkonen authored
CC [M] drivers/isdn/hisax/avm_pci.o drivers/isdn/hisax/avm_pci.c: In function `setup_avm_pcipnp': drivers/isdn/hisax/avm_pci.c:817: warning: label `ready' defined but not used Patch is big because I replaced the '} else { ... }' with 'goto ready; }' and so had to remove one level of indentation from code. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Jeff Dike authored
This patch includes the following - updated defconfig move uml.lds.S and main.c from arch/um to arch/um/kernel per Sam's suggestions steal bitops.c from arch/i386 convert all calls to open_private_file to dentry_open Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Jeff Dike authored
The patch below fixes a few UML-specific bugs not related to the rest of the kernel a bogus error return and some formatting in the fork code correct calculation of task.thread.kernel_stack remove a bogus panic a couple of fixes to allow UML to boot in the presence of exec-shield Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Jeff Dike authored
The patch below brings UML up to date with interface changes and the like irq.c includes profile.h to bring in a missing definition use the cpu_{set,clear} interface use the new get_signal_to_deliver interface define instruction_pointer Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Coywolf Qi Hunt authored
This patch removes a group of unused bh functions in um. This 2.2 legacy code should be cleaned up. Signed-off-by: Coywolf Qi Hunt <coywolf@greatcn.org> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
Update os_process_pc and os_process_parent: now a PID can be > 32768 (so increase number of digits) and make it work even with spaces in the command name. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
From: Oleg Drokin <green@linuxhacker.ru>, Jeff Dike <jdike@addtoit.com>, and me If size > 128K, with this patch malloc will call vmalloc; free will detect whether to call vfree or kfree or __real_free(). The 2.4 version could forget free()ing something; this has been fixed. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
That code comes from the out_of_memory section; in 2.4 it was correct to put it for "default:", since it was called when handle_mm_fault() return value was != 0, 1, 2, i.e. it was 3, OOM (but the i386 code put it out of line, for better performance). Here, instead, the OOM case is handled on its own, so if handle_mm_fault() != from the listed cases we must BUG(). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
From: Alex Züpke <azu@sysgo.de>, and me SKAS mode is like 4G/4G (here we have actually 3G/3G) for guest processes, so when checking for kernel stack overflow, we must first make sure we are checking a kernel-space address. Also, correctly test for stack overflows (i.e. check if there is less than 1k of stack left; see arch/i386/kernel/irq.c:do_IRQ()). And also, THREAD_SIZE != PAGE_SIZE * 2, in general (though this setting is almost never changed, so we didn't notice this1). Thanks to the good eye of Alex Züpke <azu@sysgo.de> for first seeing this bug, and providing a test program: /* * trigger.c - triggers panic("Kernel stack overflow") in UML * * 20040630, azu@sysgo.de */ #include <stdio.h> #include <setjmp.h> #include <fcntl.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/mman.h> #define LOW 0xa0000000 #define HIGH 0xb0000000 int main(int argc, char **argv) { unsigned long addr; int fd; fd = open("/dev/zero", O_RDWR); printf("This may take some time ... one more cup of coffee ...\n"); for(addr = LOW; addr < HIGH; addr += 0x1000) { pid_t p; if(mmap((void*)addr, 0x1000, PROT_READ, MAP_SHARED | MAP_FIXED, fd, 0) == MAP_FAILED) printf("mmap failed\n"); p = fork(); if(p == -1) printf("fork failed\n"); if(p == 0) { /* child context */ int *p = (int *)addr; volatile int x; x = *p; return 0; } /* father context */ waitpid(p, 0, 0); if(munmap((void*)addr, 0x1000) == -1) printf("munmap failed\n"); } close(fd); printf("done\n"); } Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
Adds some exports Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
On various places (mostly waitpid() calls) this patch makes sure that if errno == EINTR on return, then the syscall is endlessly retried. It also defines a simple generic way to do this. Signed-off-by: <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
- Correct some silly errors (dereferencing a pointer before checking if it's != NULL when creating /proc/sysemu, some error messages) - separate using_sysemu from sysemu_supported (so to refuse to activate sysemu if it is not supported, avoiding panics) - not probe sysemu if in tt mode. Signed-off-by: <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
Adds /proc/sysemu to toggle SYSEMU usage. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
Adds the "nosysemu" command line parameter to disable SYSEMU Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
Turns off syscall emulation patch for ptrace (SYSEMU) on. SYSEMU is a performance-patch introduced by Laurent Vivier. It changes behaviour of ptrace() and helps reducing host context switch rate. To make it working, you need a kernel patch for your host, too. See http://perso.wanadoo.fr/laurent.vivier/UML/ for further information. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
Folds hostaudio_user.c into hostaudio_kern.c. A lot of code less. Also note that I no more update ppos(as I used to do in the 2.4 patch): I checked that OSS never changes ppos, so hostaudio did the right thing. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
[PATCH] uml: Fixes raw() and uses it in check_one_sigio; also fixes a silly panic (EINTR returned by call). Fixes raw() and uses it in check_one_sigio; also fixes a silly panic (EINTR returned by call). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
Reduces code in *_user files, by moving it in _kern files if already possible. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
Avoids compile failure when host misses tkill(), by simply using kill() in that case. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
Fixes some little warnings about "Defined but not used ..." by #ifdef'ing things Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
You probably saw that if you change one config option, even if linux/autoconf.h (which is included by everything) changes, the kernel is smart enough not to recompile everything. But with UML this no more holds. Why? Because, as you see in this patch, fixdep avoids making anything depend onto linux/autoconf.h *explicitly*, but nobody taught him to do the same for arch/um/include/uml-config.h. So apply this patch. Do not say "I don't want to change the generic Kbuild for one arch": this cannot hurt. It's a bugfix for us, a no-op for others. Note: with this patch, fixdep will still add a dependency from a file containing UML_CONFIG_BYE onto CONFIG_BYE. Since someone could think that fixdep should grep for [^A-Z_]CONFIG_ rather than simply for CONFIG_, I've added a comment that ask *not to fix* this "bug". Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
Makes "make help ARCH=um" work. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
The second adds the LEGACY_PTY config option. Without it, with late 2.6 kernels /dev/ptyxx won't work. In fact, with those kernels, root_fs_toms does not work, because it's "unable to allocate TTY pair". And removes the dead option "UNIX98_PTY_COUNT" (just commented out for now). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
In detail, on 2.4 we used force_delete() to make sure inode were not cached, and we then close the host file when the inode is cleared; when porting to 2.6 the "force_delete" thing was dropped, and this patch adds a fix for this (by setting drop_inode = generic_delete_inode). Search for drop_inode in the 2.6 Documentation/filesystems/vfs.txt for info about this. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
Avoid that gcc breaks UML with "unit at a time" compilation mode. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
Just for now and just for UML; it will go away. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
In the -mm tree (in this moment) and not in 2.6.7 there is another console_device in include/linux/console.h; so I renamed the UML one (it's static). Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Andrew Morton authored
Update UML for CPU scheduler changes Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Jeff Dike authored
The patch below brings UML up to date with some changes in the rest of the kernel: an updated defconfig checksum.h includes in6.h to get a definition of in6_addr added a missing cpu_{set,clear} change removed include/asm-um/module.h since it's really a link Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Jeff Dike authored
The code is still there but it's not built. Below is a patch which removes it totally. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paolo \'Blaisorblade\' Giarrusso authored
The main part of UML; it is the last distributed patch for 2.6.7 Removes skas support from the main UML patch; apply or get conflicts. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Anton Blanchard authored
From: <arjanv@redhat.com> Implement the new address space layout for 32-bit apps running on ppc64. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Arjan van de Ven authored
Below is a patch from Pete Zaitcev (zaitcev@redhat.com) to also use the flex mmap infrastructure for s390(x). The IBM Domino guys *really* seem to want this. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Arjan van de Ven authored
Create /proc/sys/vm/legacy_va_layout. If this is non-zero, the kernel will use the old mmap layout for all tasks. it presently defaults to zero (the new layout). From: William Lee Irwin III <wli@holomorphy.com> hugetlb CONFIG_SYSCTL=n fix Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Arjan van de Ven authored
Utz Lehmann <u.lehmann@de.tecosim.com> found a problem with the flexmmap patches on x86-64, what he is seeing is that the 32 bit personality isn't set at the first point of setting the allocator strategy. The solution is simple, in binfmt_elf the personality is set so put the pick-layout function there. Please consider, Signed-off-by: Arjan van de Ven <arjanv@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Ingo Molnar authored
Rework the i386 mm layout to allow applications to allocate more virtual memory, and larger contiguous chunks. - the patch is compatible with existing architectures that either make use of HAVE_ARCH_UNMAPPED_AREA or use the default mmap() allocator - there is no change in behavior. - 64-bit architectures can use the same mechanism to clean up 32-bit compatibility layouts: by defining HAVE_ARCH_PICK_MMAP_LAYOUT and providing a arch_pick_mmap_layout() function - which can then decide between various mmap() layout functions. - I also introduced a new personality bit (ADDR_COMPAT_LAYOUT) to signal older binaries that dont have PT_GNU_STACK. x86 uses this to revert back to the stock layout. I also changed x86 to not clear the personality bits upon exec(), like x86-64 already does. - once every architecture that uses HAVE_ARCH_UNMAPPED_AREA has defined its arch_pick_mmap_layout() function, we can get rid of HAVE_ARCH_UNMAPPED_AREA altogether, as a final cleanup. the new layout generation function (__get_unmapped_area()) got significant testing in FC1/2, so i'm pretty confident it's robust. Compiles & boots fine on an 'old' and on a 'new' x86 distro as well. The two known breakages were: http://www.redhatconfig.com/msg/67248.html [ 'cyzload' third-party utility broke. ] http://www.zipworld.com/au/~akpm/dde.tar.gz [ your editor broke :-) ] both were caused by application bugs that did: int ret = malloc(); if (ret <= 0) failure; such bugs are easy to spot if they happen, and if it happens it's possible to work it around immediately without having to change the binary, via the setarch patch. No other application has been found to be affected, and this particular change got pretty wide coverage already over RHEL3 and exec-shield, it's in use for more than a year. The setarch utility can be used to trigger the compatibility layout on x86, the following version has been patched to take the `-L' option: http://people.redhat.com/mingo/flexible-mmap/setarch-1.4-2.tar.gz "setarch -L i386 <command>" will run the command with the old layout. From: Hugh Dickins <hugh@veritas.com> The problem is in the flexible mmap patch: arch_get_unmapped_area_topdown is liable to give your mmap vm_start above TASK_SIZE with vm_end wrapped; which is confusing, and ends up as that BUG_ON(mm->map_count). The patch below stops that behaviour, but it's not the full solution: wilson_mmap_test -s 1000 then simply cannot allocate memory for the large mmap, whereas it works fine non-top-down. I think it's wrong to interpret a large or rlim_infinite stack rlimit as an inviolable request to reserve that much for the stack: it makes much less VM available than bottom up, not what was intended. Perhaps top down should go bottom up (instead of belly up) when it fails - but I'd probably better leave that to Ingo. Or perhaps the default should place stack below text (as WLI suggested and ELF intended, with its text defaulting to 0x08048000, small progs sharing page table between stack and text and data); with a further personality for those needing bigger stack. From: Ingo Molnar <mingo@elte.hu> - fall back to the bottom-up layout if the stack can grow unlimited (if the stack ulimit has been set to RLIM_INFINITY) - try the bottom-up allocator if the top-down allocator fails - this can utilize the hole between the true bottom of the stack and its ulimit, as a last-resort effort. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Ingo Molnar authored
while looking at HT scheduler bugreports and boot failures i discovered a bad assumption in most of the HT scheduling code: that resched_task() can be called without holding the task's runqueue. This is most definitely not valid - doing it without locking can lead to the task on that CPU exiting, and this CPU corrupting the (ex-) task_info struct. It can also lead to HT-wakeup races with task switching on that other CPU. (this_CPU marking the wrong task on that_CPU as need_resched - resulting in e.g. idle wakeups not working.) The attached patch against fixes it all up. Changes: - resched_task() needs to touch the task so the runqueue lock of that CPU must be held: resched_task() now enforces this rule. - wake_priority_sleeper() was called without holding the runqueue lock. - wake_sleeping_dependent() needs to hold the runqueue locks of all siblings (2 typically). Effects of this ripples back to schedule() as well - in the non-SMT case it gets compiled out so it's fine. - dependent_sleeper() needs the runqueue locks too - and it's slightly harder because it wants to know the 'next task' info which might change during the lock-drop/reacquire. Ripple effect on schedule() => compiled out on non-SMT so fine. - resched_task() was disabling preemption for no good reason - all paths that called this function had either a spinlock held or irqs disabled. Compiled & booted on x86 SMP and UP, with and without SMT. Booted the SMT kernel on a real SMP+HT box as well. (Unpatched kernel wouldn't even boot with the resched_task() assert in place.) Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-