Andrew Morton [Fri, 28 Mar 2003 11:19:37 +0000 (03:19 -0800)]
[PATCH] x86 clock override boot option
From: john stultz <johnstul@us.ibm.com>
This patch allows one to manually specify the i386 gettimeofday time-source
by passing clock=[pit|tsc|cyclone|...] as a boot argument. The argument will
override the default probled selection, and in case the selected time-source
not be avalible the code defaults to using the PIT (printing a warning saying
so).
Andrew Morton [Fri, 28 Mar 2003 11:19:30 +0000 (03:19 -0800)]
[PATCH] wait_on_buffer refcounting checks
It is generally illegal to wait on an unpinned buffer - another CPU could
free it up even before __wait_on_buffer() has taken a ref against the buffer.
Maybe external locking rules will prevent this in specific cases, but that is
really subtle and fragile as locking rules are evolved.
The patch detects people calling wait_on_buffer() against an unpinned buffer
and issues a diagnostic.
Also remove the get_bh() from __wait_on_buffer(). It is too late.
Andrew Morton [Fri, 28 Mar 2003 11:19:09 +0000 (03:19 -0800)]
[PATCH] handle oom in tmpfs
From: Hugh Dickins <hugh@veritas.com>
move_from_swap_cache and add_to_page_cache_lru are using GFP_ATOMIC,
which can easily fail in an intermittent way. Rude if shmem_getpage
then fails with -ENOMEM: use blk_congestion_wait() to let kswapd in,
and repeat.
Andrew Morton [Fri, 28 Mar 2003 11:19:02 +0000 (03:19 -0800)]
[PATCH] tmpfs truncation fix
From: Hugh Dickins <hugh@veritas.com>
Recent testing has shown that swapoff can sneak a page back into the
tmpfs page cache after truncate_inode_pages has cleaned it, before
shmem_truncate resets next_index to stop that: BUG_ON(inode->i_blocks)
in shmem_delete_inode. So call truncate_inode_pages again to be safe.
Andrew Morton [Fri, 28 Mar 2003 11:18:54 +0000 (03:18 -0800)]
[PATCH] make add_to_swap_cache() static
From: Hugh Dickins <hugh@veritas.com>
Make add_to_swap_cache static, it's only used by read_swap_cache_async;
and since that has just done a GFP_HIGHUSER allocation, surely it's
better for add_to_swap_cache to use GFP_KERNEL than GFP_ATOMIC.
Andrew Morton [Fri, 28 Mar 2003 11:18:47 +0000 (03:18 -0800)]
[PATCH] permit page unmapping if !CONFIG_SWAP
From: Hugh Dickins <hugh@veritas.com>
Raised #endif CONFIG_SWAP in shrink_list, it was excluding
try_to_unmap of file pages. Suspect !CONFIG_MMU relied on
that to suppress try_to_unmap, added SWAP_FAIL stub for it.
Andrew Morton [Fri, 28 Mar 2003 11:18:18 +0000 (03:18 -0800)]
[PATCH] slab: fix off-by-one in size calculation
From: Manfred Spraul <manfred@colorfullife.com>
Brian spotted a stupid bug in the slab initialization:
If multiple objects fit into one cacheline, then the allocator ignores
SLAB_HWCACHE_ALIGN and squeezes the objects into the same cacheline. The
implementation contains an off by one error and thus doesn't work correctly:
For Athlon optimized kernels, the 32-byte slab uses 64 byte of memory.
Andrew Morton [Fri, 28 Mar 2003 11:18:11 +0000 (03:18 -0800)]
[PATCH] POSIX timers interface long/int cleanup
From: Eric Piel <Eric.Piel@Bull.Net>
Fixes some long/int confusion on 64-bit machines which was causing failures
on ia64 - we end up trying to set bits in the 32-63 range on an int and the
kernel locks up.
Andrew Morton [Fri, 28 Mar 2003 11:18:04 +0000 (03:18 -0800)]
[PATCH] initcall debug code
The patch is designed to help locate where the kernel is dying during the
startup sequence.
- Boot parameter "initcall_debug" causes the kernel to print out the
address of each initcall before calling it.
The kallsyms tables do not cover __init sections, so printing the
symbolic version of these symbols doesn't work. They need to be looked up
in System.map.
- Detect whether an initcall returns with interrupts disabled or with a
locking imbalance. If it does, complain and then try to fix it up.
Trond Myklebust [Thu, 27 Mar 2003 19:43:56 +0000 (20:43 +0100)]
[PATCH] Fix misleading EIO on NFS client
The following patch by Joe Korty removes an over-zealous check in the NFS
read code that causes pages to be incorrectly marked with PG_error and
hence causes an EIO to be returned to userland.
The test is incorrect as it ignores the fact that we may be caching a
write that will extend the file on the server (and hence will create a
hole in the region concerned.).
Trond Myklebust [Thu, 27 Mar 2003 19:34:55 +0000 (20:34 +0100)]
Fix xprt.c so that it resends RPC requests immediately after a timeout.
Doing this ensures that we keep probing the connection to the server
rather than just waiting for the entire congestion window to time out.
The latter can be very expensive due to the exponential backoff rule.
Neil Brown [Thu, 27 Mar 2003 02:57:29 +0000 (18:57 -0800)]
[PATCH] kNFSd: Be more careful with readlock in exp_parent
We currently hold a read_lock of dparent_lock
while calling exp_get_by_name on several ancestors
of a given dentry. However exp_get_by_name can
malloc(GFP_KERNEL), so that isn't a good idea.
Now we only claim the lock while actually
stepping up the parent chain.
Except for dev_node_t, the contents of include/pcmcia/driver_ops.h
aren't used anywhere within the kernel. It's a left-over file from the
days when cardbus 32-bit cards weren't handled as pci devices, and
their drivers as pci drivers. So, move the dev_node_t to
include/pcmcia/ds.h, remove the lone in-kernel reference to
driver_ops.h, and remove the contents of driver_ops.h.
[PCMCIA] remove "init_status" from struct pcmcia_driver
As we don't have a late_initcall in ds.c any more, we can't easily
distinguish between in-kernel drivers and those built as modules. This
information was used by cardmgr to detect whether "rmmod" makes
sense. As unloading of modules seems to be deprecated behaviour anyway
in 2.5., and the current driver unloading process is IMO broken
anyway, I don't shed any tears on this lost functionality.
Previously, "Driver Services" could only be called when the socket
drivers were initialized earlier. This caused an awful lot of
problems, especially when modprobe tried to load ds.ko and a pcmcia
card driver at once.
As all socket devices are registered with the driver model core as
being of "class_type pcmcia_socket_class", we can take use of that and
register them with "Driver Services" upon detection or upon
module loading of ds.c.
Also, the "I-need-two-initcalls-in-a-module"-tweak can go away.
Unfortunately, this patch reportedly breaks some RedHat pcmcia init
scritps - they relied on the failed loading of ds.c to detect that no
socket driver was loaded previously. To properly detect this, you
should take a look at the /sys/class/pcmcia_socket/devices directory.
Nathan Scott [Wed, 26 Mar 2003 20:25:17 +0000 (21:25 +0100)]
[XFS] Add back the pagebuf flag for scheduling on the data daemon. Moving
this into just a pagebuf_iodone parameter was broken as we don't have
sufficient state in all the places we need it to make the decision.
[XFS] Separate the quota source into its own subdirectory ala dmapi.
Push a bunch of quota- and dmapi-specific code down into these
subdirs which previously was compiled into the core XFS code,
and don't descend into these subdirs if options config'd off.
Russell King [Wed, 26 Mar 2003 14:58:05 +0000 (14:58 +0000)]
[ARM] Update Cyber2000fb driver for new fbcon API
This cset updates cyber2000fb (used on NetWinders) to the new
fbcon API, and adds cfbfillrect, cfbcopyarea and cfbimgblt
objects when building cyber2000fb.
Russell King [Wed, 26 Mar 2003 01:11:28 +0000 (01:11 +0000)]
[ARM] Fix ARM do_div() implementation
The ARM do_div() implementation was rather lax in that it only
performed a 32-bit divide. This cset fixes this oversight by
providing a 64-bit by 32-bit division in asm.
This is necessary for posix-timers to function correctly.
Nathan Scott [Tue, 25 Mar 2003 23:39:41 +0000 (00:39 +0100)]
[XFS] Next step in bhv code cleanup - this is a start on moving quota and dmapi
into behavior layers, purging several points where these sit slap bang in
the middle of XFS code (esp. read_super). Also removes numerous #ifdef's
and a bunch of unused #define's from all over the place. More to come.