- 19 Feb, 2004 9 commits
-
-
Andrew Morton authored
gcc-3.4 incorretly inlines rest_init() into start_kernel(), causing things to crash when the .text.init section gets unloaded. Use noinline to prevent that.
-
Andrew Morton authored
From: Andi Kleen <ak@muc.de> This patch adds the `noinline' function attribute. It can be used to explicitly tell the compiler to not inline functions. We need this due to what is, IMO, a bug present in gcc-3.4 and current gcc-3.5 CVS: the compiler is inlining init/main.c:rest_init() inside init/main.c:start_kernel(), despite the fact that thay are declared to be placed in different text sections.
-
Andrew Morton authored
From: Andi Kleen <ak@muc.de> The upcomming gcc 3.4 has a new compilation mode called unit-at-a-time. What it does is to first load the whole file into memory and then generate the output. This allows it to use a better inlining strategy, drop unused static functions and use -mregparm automatically for static functions. It does not seem to compile significantly slower. This is also available in some of the 3.3 based "hammer branch" compilers used in distributions (at least in SuSE and Mandrake) Some tests show impressive .text shrinkage from unit-at-a-time. e.g. here is the same kernel compiled with -fno-unit-at-a-time and -funit-at-a-time with a gcc 3.4 snapshot. The gains are really impressive: text data bss dec hex filename 4129346 708629 207240 5045215 4cfbdf vmlinux-nounitatatime 3999250 674853 207208 4881311 4a7b9f vmlinux-unitatatime .text shrinks by over 130KB!. And .data shrinks too. At first look the numbers look nearly too good to be true, but they have been verified with several configurations and seem to be real. It looks like we have a lot of stupid inlines or dead functions. I'm really not sure why it is that much better. But it's hard to argue with hard numbers. [A bloat-o-meter comparision between the two vmlinuxes can be found in http://www.firstfloor.org/~andi/unit-vs-no-unit.gz . It doesn't show any obvious candidates unfortunately, just lots of small changes] With the gcc 3.3-hammer from SuSE 9.0 the gains are a bit smaller, but still noticeable (>100KB on .text) This patch enables -funit-at-a-time on ia32 if the compiler is gcc-3.4 or later. We had several reports of gcc-3.3 producing very early lockups.
-
Andrew Morton authored
From: Andi Kleen <ak@muc.de>, me. Using -mregparm=3 shrinks the kernel further: (compiled with gcc 3.4, without -funit-at-a-time, using the later and together with -Os shrinks .text even more, making over 700KB difference) 4129346 708629 207240 5045215 4cfbdf vmlinux 3892905 708629 207240 4808774 496046 vmlinux-regparm This one helps even more, >236KB .text difference. Clearly worth the effort. This patch adds an option to use -mregparm=3 while compiling the kernel. I did an LTP run and it showed no additional failures over an non regparm kernel. According to some gcc developers it should be safe to use in all gccs that are still supports (2.95 and up) I didn't make it the default because it will break all binary only modules (although they can be fixed by adding a wrapper that calls them with "asmlinkage"). Actually it may be a good idea to make this default with 2.7.1 or somesuch. We add new kbuild infrastructure: the command scripts/gcc-version.sh $(CC) will print out the version of gcc in a canonical 4-digit form suitable for performing numerical tests against. DESC arch/i386/Makefile,scripts/gcc-version.sh,Makefile small fixes EDESC From: Serge Belyshev <33554432@mtu-net.ru> arch/i386/Makefile: * omitted $(KBUILD_SRC)/ in script call. scripts/gcc-version.sh: * GNU tail no longer supports 'tail -1' syntax. We should consider adding -fweb option: vanilla: $ size vmlinux text data bss dec hex filename 3056270 526780 386056 3969106 3c9052 vmlinux with -fweb: $ size vmlinux text data bss dec hex filename 3049523 526780 386056 3962359 3c75f7 vmlinux Also note 0.1 ... 1.0% speedup in various benchmarks. This option is not enabled by default at -O2 because it (like -fomit-frame-pointer) makes debugging impossible.
-
Andrew Morton authored
Remove page validity test. I had a warning in there for a few weeks, no reports of it happening.
-
Andrew Morton authored
From: Manfred Spraul <manfred@colorfullife.com> The patch is designed improve the diagnostics which are presented when the slab memory poison detector triggers. check_poison_obj checks for write accesses after kfree by comparing the object contents with the poison value. The current implementation contains several flaws: - it accepts both POISON_BEFORE and POISON_AFTER. check_poison_obj is only called with POISON_AFTER poison bytes. Fix: only accept POISON_AFTER. - the output is unreadable. Fix: use hexdump. - if a large objects is corrupted, then the relevant lines can scroll of the screen/dmesg buffer. Fix: line limit. - it can access addresses behind the end of the object, which can oops with CONFIG_DEBUG_PAGEALLOC. Fix: bounds checks. Additionally, the patch contains the following changes: - rename POISON_BEFORE and POISON_AFTER to POISON_FREE and POISON_INUSE. The old names are ambiguous. - use the new hexdump object function in ptrinfo. - store_stackinfo was called with wrong parameters: it should store caller, i.e. __builtin_return_address(0), not POISON_AFTER in the object. - dump both the object before and after the corrupted one, not just the one after. Example output: <<< Slab corruption: start=194e708c, len=2048 Redzone: 0x5a2cf071/0x5a2cf071. Last user: [<02399d7c>](dummy_init_module+0x1c/0xb0) 010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 7b 030: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 63 Prev obj: start=194e6880, len=2048 Redzone: 0x5a2cf071/0x5a2cf071. Last user: [<00000000>](0x0) 000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b <<<
-
Andrew Morton authored
From: Roland McGrath <roland@redhat.com> Under some circumstances, ptrace PEEK/POKE_TEXT can cause page permissions to be permanently changed. Thsi causes changes in application behaviour when run under gdb. Fix that by only marking the pte as writeable if the vma is marked for writing. A write fault thus unshares the page but doesn't necessarily make it writeable.
-
Andrew Morton authored
Print the name of the offending slab if we're going to go BUG in kmem_cache_init().
-
Andrew Morton authored
Fairly pointless coding-style cleanups which I've been sitting on for ages. The ramdisk driver is still buggy: it drops pagecache when unmounted. I still need to fix this. Apparently it also displays data corruption under load even when not unmounted.
-
- 18 Feb, 2004 31 commits
-
-
Greg Ungerer authored
Correct the cache setup bits for the 5407. This enables the write buffers properly (despite what the previous comment said). This combined with fixed cache flushing code provides a nice performance boost on the 5407. Also fix the ROMfs setup to only move the ROMfs region if it is actually configured.
-
Greg Ungerer authored
Added ELF relocation type defines. These are needed by the module loading code for m68knommu.
-
Greg Ungerer authored
This adds the configuration option to enable the uClinux shared flat binary support. The code support is already in the binfmt_load code, just the config option is missing.
-
Greg Ungerer authored
Fix a number of memory leaks in the uClinux binfmt_flat loader. All are related to not cleaning up properly on failure conditions.
-
Andrew Morton authored
From: Janet Morgan <janetmor@us.ibm.com> It looks like aio_nr and aio_max_nr were intended to be sysctl parameters.
-
Andrew Morton authored
From: Christoph Hellwig <hch@lst.de> I've just grepped over the tree for reamining MOD_INC_USE_COUNT users, and ftape is a really horrible one, it relies on MOD_{INC,DEV}_USE_COUNT in the most horrible places + it's own bookkepping and the <= 2.4 may unload hooks. And although I don't have the hardware I can guarantee it doesn't work as expected. So let's just remove the module_exit handler and mark it unremovable, if someone wants to fix up ftape later it's fine with me, but it's a really scary driver..
-
Andrew Morton authored
From: "Art Haas" <ahaas@airmail.net> Here's a small patch that adds C99 initializers to the file.
-
Andrew Morton authored
From: Matt Domsch <Matt_Domsch@dell.com> Patch below applies to both 2.4.25 and 2.6.3, and replaces the public domain statement and non-warranty with the GPL, as is permitted by the code being in the public domain, and is done with legal advice.
-
Andrew Morton authored
From: Gerd Knorr <kraxel@bytesex.org> "options tuner type=2" is just there for historical reasons and should only be used/needed if the main driver doesn't allow to configure the tuner type. I'm not sure whenever I can remove that altogether without breaking anything. There are several users of the tuner module, some outside the standard kernel tree ... > > if (type < TUNERS) { > > + t->type = type; > > printk("tuner: type forced to %d (%s) [insmod]\n", > > t->type,tuners[t->type].name); > > set_type(client,type); That is wrong, it will break in other corner cases, it may cause the set_type() function not doing the initializations. The prink can also be dropped because set_type does that too. The patch below removes that. It also makes the kernel messages a bit more verbose and adds support for two new tuners.
-
Andrew Morton authored
From: mcgrof@studorgs.rutgers.edu (Luis R. Rodriguez) Complete the migration from Kconfig's undocumented "enable" to "select".
-
Andrew Morton authored
From: Pragnesh Sampat <pragnesh.sampat@timesys.com> The file initramfs_data.cpio is slightly different when generated on cygwin, compared to linux, which causes the kernel to panic with the message "no cpio magic" (See Documentation/early-userspace/README). The problem in cpio generation is due to the difference in sprintf modifiers on cygwin. The code uses "%08ZX" for strlen of a device node. printf man pages discourages "Z" and has 'z' instead. Both of these are not available on cygwin sprintf (at least some versions of cygwin). The net result of all of this is that the generated file literally contains "ZX" and then the strlen after that and messes up that 110 offset etc. The file is 516 bytes long on the system that I tested and on linux it is 512 bytes. The fix below just uses "%08X" for that field.
-
Andrew Morton authored
From: Urban Widmark <urban@teststation.com> Add the necessary bits for loop-over-smbfs.
-
Andrew Morton authored
From: Michael Frank <mhf@linuxmail.org>
-
Andrew Morton authored
From: "Martin J. Bligh" <mbligh@aracnet.com> There's no real need to BUG and stop the system from booting if the BIOS spec'ed apicid for the boot CPU isn't correct - we can continue perfectly well with the real one.
-
Andrew Morton authored
From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio@vodafone.com> Add a new driver for the SF16FMR2 Radio card.
-
Andrew Morton authored
From: Martin Hicks <mort@wildopensource.com> This is a patch based on one that Jack Steiner sent to the ia64 list in November. The original thread can be found at: http://marc.theaimsgroup.com/?l=linux-ia64&m=106869606922555&w=2 I created the little wrapper function that was requested. I think the only other arch, other than ia64, that doesn't at least include asm-generic/tlb.h is arm. Something appears broken in TLB flushing on IA64 (& possibly other architectures). Functionally, it works but performance is bad on systems with large cpu counts. The result is that TLB flushing in exit_mmap() is frequently being done via IPIs to all cpus rather than with a "ptc" instruction or with a new context..
-
Andrew Morton authored
From: Sam Ravnborg <sam@ravnborg.org> Corrected check for missing ncurses-devel when executing "make menuconfig". Now tell user to install 'ncurses-devel' if check fails.
-
Andrew Morton authored
From: Thomas Davis <tadavis@lbl.gov> Doing a 'make rpm' will fail with the current RH9/Fedora RPM macros. The failure message is this: Processing files: kernel-debuginfo-2.6.3rc1mm1-12 error: Could not open %files file /usr/src/redhat/BUILD/kernel-2.6.3rc1mm1/debugfiles.list: No such file or directory The fix is this patch:
-
Andrew Morton authored
From: Christophe Saout <christophe@saout.de> Adds a crypto module for device-mapper. The intent here is to remove cryptoloop ASAP, to pull the remapping gunk out of the loops driver and to migrate people onto dm-crypt. It is on-disk compatible with existing cryptolop installations. See http://www.saout.de/misc/dm-crypt/ for usage details.
-
Andrew Morton authored
From: Andi Kleen <ak@suse.de> Make the "hm, page reserved twice" message dependent on CONFIG_DEBUG_BOOTMEM.
-
Andrew Morton authored
From: Willem Riede <wrlk@riede.org> The onstream drives, be they scsi, atapi, ieee1394 or usb, are supported by the osst driver. When the drives were new, code was introduced in ide-tape independently, but never really maintained since. There are issues with the drives I found and dealt with in osst, that ide-tape doesn't address. So this code in ide-tape is both redundant and imperfect. I assumed from http://marc.theaimsgroup.com/?l=linux-kernel&m=107550547613846&w=2 that there was buy in for removing it. When this patch is applied, ide-tape will refuse to attach to an onstream DI drive, and will write to syslog to use ide-scsi + osst instead.
-
Andrew Morton authored
From: BlaisorBlade <blaisorblade_spam@yahoo.it> An exhausted do_swap_page() should return VM_FAULT_OOM rather than -ENOMEM.
-
Andrew Morton authored
From: "David S. Miller" <davem@redhat.com> From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> If I create some kmem cache on 64-bit with like 3 u32's in it, it should silently just work and not warn.
-
Andrew Morton authored
From: Davide Libenzi <davidel@xmailserver.org> A potential race can happen in epoll_ctl(EPOLL_CTL_MOD) where an event can happen in between f_op->poll() and the lock on ep->lock (we cannot call f_op->poll() inside a lock, and the f_op->poll() callback does not carry any info at the current time - missing wake_up_info() already ;). In that case the event would be removed. We can easily leave the event inside the ready list and have the ep_send_events() logic do the job for us at later time. (Thanks to david.lee@teracruz.com for reporting the thing, since it shouldn't have been a nice one ;)
-
Andrew Morton authored
From: Anton Blanchard <anton@samba.org> Add clock_was_set to all architectures. I'm disappointed this wasnt done by whoever wrote the code. (It is a callback which the arch-specific RTC-updating code must make when someone sets the time).
-
Andrew Morton authored
From: Brian Gerst <bgerst@didntduck.org> Cleans up some leftovers from the old module loader: - Remove unused defines from modules.h - Remove unused file modsetver.h
-
Andrew Morton authored
From: Alex Goddard <agoddard@purdue.edu> How to debug module loading problems. The wording is a slightly changed version of what Rusty said.
-
Andrew Morton authored
From: MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com> I am testing PCI hot-plug in 2.6.2 kernel, but sometimes a struct resource tree in kernel/resource.c was broken if multiple hot-plug requests are issued at the same time. The reason is lots of drivers call release_region() on hot removal, and __release_region(), which is invoked by release_region() macro, changes the tree without holding a writer lock for resource_lock. I think __release_region() must hold a writer lock as well as __request_region() does. A following patch fixes the issue in my environment.
-
Andrew Morton authored
From: Tim Hockin <thockin@sun.com> Remove the max_anon via dynamically allocation. We also change the idr_pre_get() interface to take a gfp mask, which should have always been there.
-
Andrew Morton authored
From: Philippe Elie <phil.el@wanadoo.fr> From: Will Cohen <wcohen@redhat.com> Add oprofile support for Pentium Mobile (P6 core). Pentium Mobile needs to unmask LVPTC vector, since it doesn't hurt other P6 core based cpus we do it unconditionally for all these. This patch require userspace tools >= 0.8 (only in sourceforge cvs currently)
-
Andrew Morton authored
From: Philippe Elie <phil.el@wanadoo.fr> From: Zwane Mwaikambo <zwane@arm.linux.org.uk> This patch adds infrastructure code and enables ARM to utilise the timer int oprofile driver. There is PMU code under development for the XScale but that is still forthcoming. In the meantime you can use the timer int driver with an updated Oprofile-CVS userspace (SF is a bit slow, please allow 24hrs).
-