Andrew Morton [Wed, 19 May 2004 09:38:21 +0000 (02:38 -0700)]
[PATCH] SubmittingDrivers completeness
From: Jonathan Corbet <corbet@lwn.net>
I noticed a patch went in to Documentation/SubmittingDrivers which tweaked
the URL for KernelTraffic. Here's a self-serving patch which makes that
section more complete; to be fair, I added two other sites too. Just in
case it's useful.
Andrew Morton [Wed, 19 May 2004 09:38:10 +0000 (02:38 -0700)]
[PATCH] Quota fix 3 - quota file corruption
From: Jan Kara <jack@ucw.cz>
This patch fixes possible quota files corruption which could happen when root
did not have any inodes&space allocated.
Originally this could not happen as structure would not be written to disk in
that case but with journalled quota we need to write even all-zero structure.
The fix is not very nice but change of the format on disk is probably worse (I
made a mistake with not including the usage-bitmaps into format :().
Andrew Morton [Wed, 19 May 2004 09:37:59 +0000 (02:37 -0700)]
[PATCH] SELinux: fix error handling in selinuxfs
From: Stephen Smalley <sds@epoch.ncsc.mil>
This patch against 2.6.6 fixes error handling for two out-of-memory conditions
in selinuxfs, avoiding potential deadlock due to returning without releasing a
semaphore. The patch was submitted by Karl MacMillan of Tresys.
Andrew Morton [Wed, 19 May 2004 09:37:28 +0000 (02:37 -0700)]
[PATCH] mark the `planb' video driver broken
From: Christoph Hellwig <hch@lst.de>
This one is missing updates from the v4l1 interfaces in 2.4 to the 2.6ish
v4l2 and thus doesn't compile. While we're at it also remove the
MOD_{INC,DEC}_USE_COUNT calls in it that were bogus even in 2.4 to avoid
false positives in grep.
If you use O=/someotherdir or KBUILD_OUTPUT=/someotherdir on the following
architectures: alpha, mips, sh and cris, the build process is probably
going to fail at one point or another, depending on the target you used,
because make can't find scripts/Makefile.build or scripts/Makefile.clean.
The following patch fixes this, I greped the whole tree and these four were
the only "offenders" I found.
Andrew Morton [Wed, 19 May 2004 09:36:00 +0000 (02:36 -0700)]
[PATCH] Work around gcc 3.3.3-hammer sched miscompilation on x86-64
From: Andi Kleen <ak@muc.de>
The new domain scheduler got miscompiled on x86-64 with gcc 3.3.3-hammer,
which is shipping with some distributions. The kernel deadlocks eventually
under light stress on SMP systems with the right options.
After some experiments it seems this simple change avoids the
miscompilation. It also doesn't pessimize the code unduly for other
architectures.
Andrew Morton [Wed, 19 May 2004 09:35:49 +0000 (02:35 -0700)]
[PATCH] slab: add kmem_cache_alloc_node
From: Manfred Spraul <manfred@colorfullife.com>
The attached patch adds a simple kmem_cache_alloc_node function: allocate
memory on a given node. The function is intended for cpu bound structures.
It's used for alloc_percpu and for the slab-internal per-cpu structures.
Jack Steiner reported a ~3% performance increase for AIM7 on a 64-way
Itanium 2.
Port maintainers: The patch could cause problems if CPU_UP_PREPARE is
called for a cpu on a node before the corresponding memory is attached
and/or if alloc_pages_node doesn't fall back to memory from another node if
there is no memory in the requested node. I think noone does that, but I'm
not sure.
Andrew Morton [Wed, 19 May 2004 09:35:39 +0000 (02:35 -0700)]
[PATCH] slab: allow arch override for kmem_bufctl_t
From: Manfred Spraul <manfred@colorfullife.com>
The slab allocator keeps track of the free objects in a slab with a linked
list of integers (typedef'ed to kmem_bufctl_t). Right now unsigned int is
used for kmem_bufctl_t, i.e. 4 bytes per-object overhead.
The attached patch implements a per-arch definition of for this type:
Theoretically, unsigned short is sufficient for kmem_bufctl_t and this would
reduce the per-object overhead to 2 bytes. But some archs cannot operate on
16-bit values efficiently, thus it's not possible to switch everyone to
ushort.
The chosen types are a result of dicussions with the various arch maintainers.
Andrew Morton [Wed, 19 May 2004 09:35:27 +0000 (02:35 -0700)]
[PATCH] slab: enable runtime cache line size on i386
From: Manfred Spraul <manfred@colorfullife.com>
the attached patch switches the SLAB_HWCACHE_ALIGN alignment from the
compile time L1 cache line size to the runtime detected value for i386.
x86-64 already uses the runtime detection.
Andrew Morton [Wed, 19 May 2004 09:35:17 +0000 (02:35 -0700)]
[PATCH] Fix arithmetic in shrink_zone()
From: Nick Piggin <nickpiggin@yahoo.com.au>
If the zone has a very small number of inactive pages, local variable
`ratio' can be huge and we do way too much scanning. So much so that Ingo
hit an NMI watchdog expiry, although that was because the zone would have a
had a single refcount-zero page in it, and that logic recently got fixed up
via get_page_testone().
Nick's patch simply puts a sane-looking upper bound on the number of pages
which we'll scan in this round.
It fixes another failure case: if the inactive list becomes very small
compared to the size of the active list, active list scanning (and therefore
inactive list refilling) also becomes small.
This patch causes inactive list scanning to be keyed off the size of the
active+inactive lists. It has the plus of hiding active and inactive
balancing implementation from the higher level scanning code. It will
slightly change other aspects of scanning behaviour, but probably not
significantly.
Andrew Morton [Wed, 19 May 2004 09:34:23 +0000 (02:34 -0700)]
[PATCH] security: add disable param to capabilities module
From: Chris Wright <chrisw@osdl.org>
Add disable param to capabilities module. Similar to the SELinux param for
disabling at boot time. This allows vendors to ship single binary image with
capabilities compiled statically, and disable it if they provide another
security model compiled as module.
Andrew Morton [Wed, 19 May 2004 09:34:12 +0000 (02:34 -0700)]
[PATCH] speed up readahead for seeky loads
From: Ram Pai <linuxram@us.ibm.com>
Currently the readahead code tends to read one more page than it should with
seeky database-style loads. This was to prevent bogus readahead triggering
when we step into the last page of the current window.
The patch removes that workaround and fixes up the suboptimal logic instead.
wrt the "rounding errors" mentioned in this patch, Ram provided the following
description:
Say the i/o size is 20 pages.
Our algorithm starts by a initial average i/o size of 'ra_pages/2' which
is mostly say 16.
Now every time we take a average, the 'average' progresses as follows
(16+20)/2=18
(18+20)/2=19
(19+20)/2=19
(19+20)/2=19.....
and the rounding error makes it never touch 20
Benchmarking sitrep:
IOZONE
run on a nfs mounted filesystem:
client machine 2proc, 733MHz, 2GB memory
server machine 8proc, 700Mhz, 8GB memory
Andrew Morton [Wed, 19 May 2004 09:34:02 +0000 (02:34 -0700)]
[PATCH] dpt_i2o warning fixes
drivers/scsi/dpt_i2o.c: In function `adpt_queue':
drivers/scsi/dpt_i2o.c:442: warning: use of cast expressions as lvalues is deprecated
drivers/scsi/dpt_i2o.c: In function `adpt_scsi_register':
drivers/scsi/dpt_i2o.c:2213: warning: use of cast expressions as lvalues is deprecated
This patch stops the iseries_veth driver trying to send every packet to too
many logical partitions. Consequently, the number of transmit errors falls to
(about) zero from a very large number. This should also improve performance a
bit as the driver is no longer doing 31 extra skb_clone()s and skb_free()s for
each packet.
Andrew Morton [Wed, 19 May 2004 09:33:08 +0000 (02:33 -0700)]
[PATCH] PPC32: Get full register set on bad kernel accesses
From: Paul Mackerras <paulus@samba.org>
At present on ppc32, if the kernel accesses a bad address and causes an
oops, or drops into the xmon debugger, we only have the contents of the
volatile registers available to print. The reason is that we only save the
volatile registers on entry for a page fault.
This patch restructures the code a bit so that if do_page_fault()
determines that the page fault is caused by a bad kernel access, it returns
to the caller, which then saves the full register set into the exception
frame before calling bad_page_fault(). This way we get the full set of
registers printed in the oops message.
Andrew Morton [Wed, 19 May 2004 09:32:36 +0000 (02:32 -0700)]
[PATCH] system_state splitup
Split the system_state state `SYSTEM_SHUTDOWN' into SYSTEM_HALT,
SYSTEM_POWER_OFF and SYSTEM_RESTART and export system_state to modules.
This allows driver shutdown routines to know why they are being shutdown. The
IDE subsystem wants this so that it knows to not spin the disks down across a
reboot.
This allows building the math-emu code as a module only when
CONFIG_SMP is not set. The fp trap handler cannot be preempted
on a single-CPU (as CONFIG_PREEMPT is not going to be supported
on alpha), so the module can be safely unloaded at any time.
Chris Mason [Wed, 19 May 2004 00:18:07 +0000 (17:18 -0700)]
[PATCH] Fix reiserfs inode size update race
reiserfs_file_write unlocks the pages it operated on before updating
i_size. This can lead to races with writepage, who checks i_size when
deciding how much of the file to zero out.
This patch also replaces SetPageReferenced with mark_page_accessed() in
reiserfs_file_write
This was verified to fix the BitKeeper data corruption problems that
Steven Cole has been debugging, where concurrent writes to a file and
writebacks to disk would cause zeroes in the file when CONFIG_PREEMPT
was enabled.
- fix arch/arm/Kconfig to allow IDE only on platforms supporting it
- introduce IDE_ARCH_OBSOLETE_INIT and ide_default_io_ctl() so
we can use generic ide_init_hwif_ports() and kill no longer needed
<asm-arm/arch-*/ide.h> (leave broken lh7a40x and sa1100 versions)
Add drivers/ide/arm/ide_arm.c for simple default IDE interfaces
and clean obsolete ide_init_default_hwifs() implementations
in asm-arm/arch-{cl7500,rpc,shark}/ide.h and asm-arm26/ide.h.
This allows us to kill ide_init_default_hwifs() completely
in the next patch (because lh7a40x and sa1100 are broken).
Scott Feldman [Tue, 18 May 2004 16:39:57 +0000 (12:39 -0400)]
[PATCH] e100: fix for incoherent arches
* Changed mapping on Rx skb to bi-directional. skb->data holds both the
RFD structure and the packet data, and the RFD is read/written by
HW. Issue found on Xscale HW that doesn't handle cache syncs auto-
matically. Other changes in patch are whitespace/spelling.
Andrew Morton [Tue, 18 May 2004 15:01:15 +0000 (08:01 -0700)]
[PATCH] ppc64: fix rtas error log location
From: Anton Blanchard <anton@samba.org>
From: Nathan Lynch <nathanl@austin.ibm.com>
Somehow we've been placing the rtas error_log file at /proc/ppc64/error_log,
which breaks at least one application I know of. It is supposed to be at
/proc/ppc64/rtas/error_log (this is the 2.4 behavior).
On machines with Altivec (i.e. G4 and G5 processors), the altivec
floating-point instructions can operate in two modes: one where
denormalized inputs or outputs are truncated to zero, and one where they
aren't. In the latter mode the processor can take an exception when it
encounters denormalized floating-point inputs or outputs rather than
dealing with them in hardware.
This patch adds code to deal properly with the exception, by emulating the
instruction that caused the exception. Previously the kernel just switched
the altivec unit into the truncate-to-zero mode, which works but is a bit
gross. Fortunately there are only a limited set of altivec instructions
which can generate the assist exception, so we don't have to emulate the
whole altivec instruction set.
This patch also makes sure that we always have a handler for the altivec
unavailable exception. Without this, if you run a kernel that is not
configured for altivec support on a machine with altivec, it works fine
until a user process tries to execute an altivec instruction. At that
point the kernel thinks it has taken an unknown exception and panics. With
this patch it sends a SIGILL to the process instead.
Andrew Morton [Tue, 18 May 2004 14:59:23 +0000 (07:59 -0700)]
[PATCH] ppc32: some whitespace fixes
From: Paul Mackerras <paulus@samba.org>
This patch does nothing but fix up whitespace in three files in arch/ppc.
It deletes trailing blanks and tabs in several places and joins two lines
that didn't need to be split.
Andrew Morton [Tue, 18 May 2004 14:59:11 +0000 (07:59 -0700)]
[PATCH] ppc32: IBM PowerPC 750GX Support
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
From: Bryan Rittmeyer <bryan@staidm.org>
This patch adds preliminary support for the IBM PowerPC 750GX. In summary
this part is a PPC750FX ramped to 1 GHz with a 1MB 4-way L2 and more
advanced I/O pipelining. It is beginning to appear in embedded systems and
was rumored to be under evaluation inside Apple. Tested on PVR 70020101;
please merge.