ChangeSet@1.2387, 2005-01-13 09:01:51-08:00, paulus@samba.org [PATCH] PPC64 Move thread_info flags to its own cache line This patch fixes a problem I have been seeing since all the preempt changes went in, which is that ppc64 SMP systems would livelock randomly if preempt was enabled. It turns out that what was happening was that one cpu was spinning in spin_lock_irq (the version at line 215 of kernel/spinlock.c) madly doing preempt_enable() and preempt_disable() calls. The other cpu had the lock and was trying to set the TIF_NEED_RESCHED flag for the task running on the first cpu. That is an atomic operation which has to be retried if another cpu writes to the same cacheline between the load and the store, which the other cpu was doing every time it did preempt_enable() or preempt_disable(). I decided to move the thread_info flags field into the next cache line, since it is the only field that would regularly be modified by cpus other than the one running the task that owns the thread_info. (OK possibly the `cpu' field would be on a rebalance; I don't know the rebalancing code, but that should be pretty infrequent.) Thus, moving the flags field seems like a good idea generally as well as solving the immediate problem. For the record I am pretty unhappy with the code we use for spin_lock et al. with preemption turned on (the BUILD_LOCK_OPS stuff in spinlock.c). For a start we do the atomic op (_raw_spin_trylock) each time around the loop. That is going to be generating a lot of unnecessary bus (or fabric) traffic. Instead, after we fail to get the lock we should poll it with simple loads until we see that it is clear and then retry the atomic op. Assuming a reasonable cache design, the loads won't generate any bus traffic until another cpu writes to the cacheline containing the lock. Secondly we have lost the __spin_yield call that we had on ppc64, which is an important optimization when we are running under the hypervisor. I can't just put that in cpu_relax because I need to know which (virtual) cpu is holding the lock, so that I can tell the hypervisor which virtual cpu to give my time slice to. That information is stored in the lock variable, which is why __spin_yield needs the address of the lock. Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds ChangeSet@1.2386, 2005-01-13 09:01:37-08:00, paulus@samba.org [PATCH] PPC64 Add PREEMPT_BKL option This patch adds the PREEMPT_BKL config option for PPC64, shamelessly stolen from the i386 version. I have this turned on in the kernel on my desktop G5 and it seems to be just fine. Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds ChangeSet@1.2385, 2005-01-13 09:01:24-08:00, paulus@samba.org [PATCH] PPC64 can do preempt debug too This patch enables the DEBUG_PREEMPT config option for PPC64. I have this turned on on my desktop G5 and it isn't finding any problems. (It did find one problem, in flush_tlb_pending(), that I have just sent a patch for.) BTW, do we really need to restrict which architectures the config option is available on? Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds ChangeSet@1.2384, 2005-01-13 09:01:10-08:00, paulus@samba.org [PATCH] PPC64 Call preempt_schedule on exception exit This patch mirrors the recent changes on x86 to call preempt_schedule rather than schedule in the exception exit path, in the case where the preempt_count is zero and the TIF_NEED_RESCHED bit is set. I'm a little concerned that this means that we have a window where interrupts are enabled and we are on our way into preempt_schedule, but preempt_count is still zero. Ingo's proposed preempt_schedule_irq would fix this, and I think something like that should go in. Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds ChangeSet@1.2383, 2005-01-13 09:00:59-08:00, paulus@samba.org [PATCH] PPC64 Disable preemption in flush_tlb_pending The preempt debug stuff found a place where we were using smp_processor_id() without having preemption disabled, in flush_tlb_pending. This patch fixes it by using get_cpu_var and put_cpu_var instead of the __get_cpu_var variant. Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds ChangeSet@1.2382, 2005-01-13 09:00:45-08:00, axboe@suse.de [PATCH] possible rq starvation on oom I stumbled across this the other day. The block layer only uses a single memory pool for request allocation, so it's very possible for eg writes to have allocated them all at any point in time. If that is the case and the machine is low on memory, a reader attempting to allocate a request and failing in blk_alloc_request() can get stuck for a long time since no one is there to wake it up. The solution is either to add the extra mempool so both reads and writes have one, or attempt to handle the situation. I chose the latter, to save the extra memory required for the additional mempool with BLKDEV_MIN_RQ statically allocated requests per-queue. If a read allocation fails and we have no readers in flight for this queue, mark us rq-starved so that the next write being freed will wake up the sleeping reader(s). Same situation would happen for writes as well of course, it's just a lot more unlikely. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds ChangeSet@1.2381, 2005-01-13 09:00:32-08:00, axboe@suse.de [PATCH] Don't enable ata over eth by default "ATA over Ethernet support" should not default to 'm', it doesn't make any sense for a special case driver to do so. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds ChangeSet@1.2380, 2005-01-12 20:04:56-08:00, akropel1@rochester.rr.com [PATCH] contort getdents64 to pacify gcc-2.96 A recent trivial fixup in sys_getdents64 gives gcc-2.96 indigestion in the form of an ICE. While upgrading to a sane gcc would be the preferred solution, rewriting the change as follows eliminates the error for those who cannot do so. Signed-off-by: Adam Kropelin Signed-off-by: Linus Torvalds ChangeSet@1.2379, 2005-01-12 20:04:43-08:00, davej@redhat.com [PATCH] matroxfb driver broken on non-x86. This broke since the recent MODULE_PARAM conversion on architectures that don't have CONFIG_MTRR Signed-off-by: Dave Jones Signed-off-by: Linus Torvalds ChangeSet@1.2378, 2005-01-12 18:14:03-08:00, torvalds@ppc970.osdl.org Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk into ppc970.osdl.org:/home/torvalds/v2.6/linux ChangeSet@1.2280.2.11, 2005-01-12 21:03:45+00:00, nico@org.rmk.(none) [ARM PATCH] 2204/1: bring {read|write}sw up to date with current reality Patch from Nicolas Pitre This patch adds support for all alignments to both endianness. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King ChangeSet@1.2280.2.10, 2005-01-12 20:55:37+00:00, nico@org.rmk.(none) [ARM PATCH] 2391/1: remove obsolete help text Patch from Nicolas Pitre Now that MTD XIP support is merged this part is not relevant anymore. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King ChangeSet@1.2215.1.12, 2005-01-12 19:52:49+00:00, rmk@flint.arm.linux.org.uk [ARM] Add missing tlb_migrate_finish() Signed-off-by: Russell King ChangeSet@1.2377, 2005-01-12 10:08:53-08:00, torvalds@ppc970.osdl.org Merge http://lia64.bkbits.net/linux-ia64-release-2.6.11 into ppc970.osdl.org:/home/torvalds/v2.6/linux ChangeSet@1.2360.1.155, 2005-01-12 10:07:41-08:00, torvalds@ppc970.osdl.org Merge bk://linux-scsi.bkbits.net/scsi-for-linus-2.6 into ppc970.osdl.org:/home/torvalds/v2.6/linux ChangeSet@1.2376, 2005-01-12 09:14:26-08:00, davidm@hpl.hp.com [IA64] add hpzx1_swiotlb machine-vector (new files) This is really part of the earlier changeset from David to add the new machine vector to support certain limited range DMA cards on zx1. I just forgot to run "bk new" before the commit, so the newly added files weren't checked into BK. Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck ChangeSet@1.2360.1.154, 2005-01-12 09:02:21-08:00, dwmw2@infradead.org [PATCH] ppc: fix removed MMCR0_PMXE define In ChangeSet 1.2370, 2005/01/11 17:41:32-08:00, tglx@linutronix.de wrote: > > [PATCH] ppc: remove duplicate define > > The MMCR0_PMXE is already defined in reg.h... Er, no it's not. But perhaps it should be... ChangeSet@1.2360.1.153, 2005-01-12 08:50:53-08:00, paulus@samba.org [PATCH] PPC64 had _raw_read_trylock already Ingo presumably didn't notice that ppc64 already had a functional _raw_read_trylock when he added the #define to use the generic version. This just removes the #define so we use the ppc64-specific version again. Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds ChangeSet@1.2360.1.152, 2005-01-12 08:50:39-08:00, axboe@suse.de [PATCH] elevator: print default selection Currently we only print the default io scheduler if the kernel chooses, not if the user/bootloader has specified one. This patch saves the extra line in dmesg but always notified of the default choice by appending (default) to that line: .. io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) .. Patch originally from Srihari Vijayaraghavan, modified by me. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds ChangeSet@1.2375, 2005-01-12 08:49:02-08:00, tony.luck@intel.com [IA64] reorder functions to define ia64_pci_get_legacy_mem() before using it Signed-off-by: Tony Luck ChangeSet@1.2360.1.151, 2005-01-12 08:49:02-08:00, axboe@suse.de [PATCH] cfq-iosched: fix scsi requeue accounting The accounting can go bad in the requeue hook, it must check the accounted flag to make sure it was previously considered in the driver. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds ChangeSet@1.2360.1.150, 2005-01-12 08:48:49-08:00, kaos@sgi.com [PATCH] ia64: export pcibios_resource_to_bus to match other architectures. Signed-off-by: Keith Owens Signed-off-by: Linus Torvalds ChangeSet@1.2360.1.149, 2005-01-12 08:48:35-08:00, ink@jurassic.park.msu.ru [PATCH] Alpha: typos in io_trivial.h This apparently explains some weird IO failures reported in last two months. Only non-bwx (including generic) kernels were affected. Acked-by: Richard Henderson Signed-off-by: Linus Torvalds ChangeSet@1.2360.3.7, 2005-01-12 08:26:35-08:00, torvalds@ppc970.osdl.org Make mm writelock testing less intrusive. This enables it only for debug kernels, and also makes sure that if some external module is still broken, we don't leave the mmap-sem locked after warning about it. ChangeSet@1.2360.3.6, 2005-01-12 08:12:09-08:00, marcelo.tosatti@cyclades.com [PATCH] do_brk() needs mmap_sem write-locked It seems to be general consensus that its safer to require all do_brk() callers to grab mmap_sem, and have do_brk to warn otherwise. This is what the following patch does. Similar version has been changed to in v2.4. Signed-off-by: Linus Torvalds ChangeSet@1.1938.1.176, 2005-01-12 10:09:46-06:00, jejb@mulgrave.(none) FC Transport updates - additional fc host attributes From: James.Smart@Emulex.Com This patch adds 5 more FC transport host attributes in support of HBAAPI. Signed-off-by: James Bottomley ChangeSet@1.2360.3.5, 2005-01-12 08:09:20-08:00, torvalds@ppc970.osdl.org Handle two threads both trying to expand their stack simultaneously. We had all the locking right, but we didn't check whether one of the threads now no longer needed to expand, so we could incorrectly _shrink_ the stack in the other thread instead (not only causing segfaults, but since we didn't do a proper unmap, we'd possibly leak pages too). So re-check the need for expand after getting the lock. Noticed by Paul Starzetz. ChangeSet@1.1938.1.175, 2005-01-12 10:06:41-06:00, jejb@mulgrave.(none) SCSI: add starget_for_each_device From: James.Smart@Emulex.Com This patch deprecates the use of device_for_each_child() with stargets. The reasoning behind this is due to issues regarding: Semaphores that device_for_each_child() takes Implicit assumptions that each child is an sdev device. The patch adds a new helper function, starget_for_each_device(), and replaces all previous uses of device_for_each_child(). Signed-off-by: James Bottomley ChangeSet@1.2280.2.9, 2005-01-12 15:38:50+00:00, ben-linux@org.rmk.(none) [ARM PATCH] 2390/1: Simtec Electronics MAINTAINERS file entries Patch from Ben Dooks MAINTAINERS entries for currently supported Simtec Electronics development boards. Signed-off-by: Ben Dooks Signed-off-by: Russell King ChangeSet@1.2360.3.4, 2005-01-12 07:36:34-08:00, ak@suse.de [PATCH] [4/4] Fix numa=off command line parsing Fix a long standing bug: numa=off only worked as last argument on the command line. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds ChangeSet@1.2360.3.3, 2005-01-12 07:36:17-08:00, ak@suse.de [PATCH] [3/4] x86_64: Fix NUMA hash setup Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds ChangeSet@1.2360.3.2, 2005-01-12 07:36:02-08:00, ak@suse.de [PATCH] x86_64: Fix K8 NUMA discovery Fix K8 node discovery after nodemask changes. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds ChangeSet@1.1938.1.174, 2005-01-12 09:35:52-06:00, akpm@osdl.org [PATCH] use mmiowb in qla1280.c From: Jesse Barnes There are a few spots in qla1280.c that don't need a full PCI write flush to the device, but rather a simple write ordering guarantee. This patch changes some of the PIO reads that cause write flushes into mmiowb calls instead, which is a lighter weight way of ensuring ordering. Signed-off-by: Jeremy Higdon Signed-off-by: Jesse Barnes Signed-off-by: Andrew Morton Signed-off-by: James Bottomley ChangeSet@1.2360.3.1, 2005-01-12 07:35:48-08:00, ak@suse.de [PATCH] x86_64: Fix ACPI SRAT NUMA parsing Fix fallout from the recent nodemask_t changes. The node ids assigned in the SRAT parser were off by one. I added a new first_unset_node() function to nodemask.h to allocate IDs sanely. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds ChangeSet@1.1938.1.173, 2005-01-12 09:29:50-06:00, akpm@osdl.org [PATCH] SCSI aic7xxx: kill kernel 2.2 #ifdef's From: Adrian Bunk The patch below kills kernel 2.2 #ifdef's from the SCSI aic7xxx driver. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: James Bottomley ChangeSet@1.2280.2.8, 2005-01-12 15:19:25+00:00, catalin.marinas@com.rmk.(none) [ARM PATCH] 2389/1: semaphore.c warning fixed Patch from Catalin Marinas The patch adds the "ax" attributes to the .sched.text section to avoid a compiler warning. Signed-off-by: Catalin Marinas Signed-off-by: Russell King ChangeSet@1.2280.2.7, 2005-01-12 15:14:51+00:00, rpurdie@net.rmk.(none) [ARM PATCH] 2388/1: Add SSP control code for Sharp SL-C7xx Series (Corgi) Patch from Richard Purdie The Sharp SL-C7xx Series (Corgi) has 3 devices connected to the SSP interface each needing different configurations of the port. This code provides the necessary access and locking so drivers can access these components. It uses the functions provided by the PXA SSP driver to access the port. It also adds some machine specific GPIO definitions used by this code and adds some comments to existing definitions. Signed-off-by: Richard Purdie Signed-off-by: Russell King ChangeSet@1.2280.2.6, 2005-01-12 14:01:58+00:00, rmk@flint.arm.linux.org.uk [ARM] Remove include. asm/processor.h doesn't use atomic operations nor types, so there's no need to include asm/atomic.h. Signed-off-by: Russell King ChangeSet@1.2215.1.11, 2005-01-12 13:49:34+00:00, rmk@flint.arm.linux.org.uk [ARM] Don't use __init for function prototypes. ChangeSet@1.2360.2.1, 2005-01-12 00:30:07-05:00, fli@ati.com [libata sata_sil] support ATI IXP300/IXP400 SATA ChangeSet@1.2360.1.147, 2005-01-12 00:21:23-05:00, akpm@osdl.org [PATCH] 3c515 warning fix drivers/net/3c515.c: In function `__check_rx_copybreak': drivers/net/3c515.c:406: warning: return discards qualifiers from pointer target type drivers/net/3c515.c: At top level: drivers/net/3c515.c:406: warning: initialization discards qualifiers from pointer target type Signed-off-by: Andrew Morton ChangeSet@1.2360.1.146, 2005-01-12 00:21:09-05:00, akpm@osdl.org [PATCH] ixgb whitespace fix Signed-off-by: Andrew Morton ChangeSet@1.2360.1.145, 2005-01-12 00:20:57-05:00, akpm@osdl.org [PATCH] eepro build fix drivers/net/eepro.c:1799: initializer element is not constant drivers/net/eepro.c:1799: (near initialization for `__param_arr_io.num') drivers/net/eepro.c:1800: initializer element is not constant drivers/net/eepro.c:1800: (near initialization for `__param_arr_irq.num') drivers/net/eepro.c:1801: initializer element is not constant drivers/net/eepro.c:1801: (near initialization for `__param_arr_mem.num') Signed-off-by: Andrew Morton ChangeSet@1.2360.1.144, 2005-01-12 00:18:52-05:00, jgarzik@pobox.com Merge pobox.com:/garz/repo/linux-2.6 into pobox.com:/garz/repo/net-drivers-2.6 ChangeSet@1.2360.1.143, 2005-01-11 19:48:12-08:00, torvalds@ppc970.osdl.org Linux 2.6.11-rc1 TAG: v2.6.11-rc1