The following reversion is what fixes my regression. That puts the
sequential read numbers back to the 2.6.0 values of ~140MB/sec (from the
current 2.6.1 values of 14MB/second)...
We were triggering I/O of the `ahead' when we hit the last page in the
`current' window. That's bad because it gives no pipelining at all.
So go back to full pipelining.
It's not at all clear why this change made a 10x difference in NFS
throughput.
This patch initializes zone->{prev,temp}_priority to DEF_PRIORITY.
Otherwise they are left zeroed, and first run of VM scanner thinks that
zones are under enormous stress.
Andrew Morton [Mon, 19 Jan 2004 13:11:24 +0000 (05:11 -0800)]
[PATCH] bio documentation update
From: Jens Axboe <axboe@suse.de>
Although it was an established part of the current bio api, it was never
documented that bio_add_page() and merge_bvec_fn() must accept to add at
least one page to an empty bio.
Andrew Morton [Mon, 19 Jan 2004 13:10:48 +0000 (05:10 -0800)]
[PATCH] Relocation overflow with modules on Alpha
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Larger modules fail to load with the message "Relocation overflow vs
section 17", or some other section number.
This failure happens with GPRELHIGH relocation, which is *signed* short,
but relocation overflow check in module.c doesn't take into account the
sign extension.
Andrew Morton [Mon, 19 Jan 2004 13:10:30 +0000 (05:10 -0800)]
[PATCH] Simplify node/zone field in page->flags
From: Matthew Dobson <colpatch@us.ibm.com>
This patch does the following:
1) Rename ZONE_SHIFT to NODEZONE_SHIFT. This value is the number
of bits to shift page->flags to get the node/zone part of the
bitfield.
2) Add a macro called NODEZONE which takes a node number and zone number
and returns a 'nodezone', a bitshifted composition of the two.
3) Create page_zonenum & page_nodenum, inline functions to return the
node/zone a page belongs to with some simple bit twiddling, no
pointer dereferences necessary.
4) Modify page_zone() and set_page_zone() to use the new NODEZONE_SHIFT.
5) Modify memmap_init_zone() & free_area_init_core() to use the new
NODEZONE macros.
6) Fix up some comments to reflect the above changes.
Andrew Morton [Mon, 19 Jan 2004 13:10:11 +0000 (05:10 -0800)]
[PATCH] clarify meaning of bio fields in the end_io function
From: Christophe Saout <christophe@saout.de>
The intent of these are to clarify the meaning of the bio fields in the
bi_end_io function (since we are already mostly there). After these small
modifications bio->bi_idx and the corresponding bio_iovec(bio)->bv_offset
point to the beginning of the completed data, together with the nr_bytes
argument you know exactly what data was finished, e.g. when you can't
track it otherwise (or it would be unnecessary expensive). Apart from that
it's a nice-to-have.
The first mini-patch moves the update of bio_iovec(bio)->bv_offset and
->bv_len after the call of bi_end_io where bi_idx gets updated so they get
updated together. Ok with Jens.
The second part of the patch modifies the multwrite hack in PIO non-
taskfile ide disk code. It modifies the bi_idx field to walk the bios and
doesn't reset it correctly before ending the request. The patch uses the
segment counter in the request field to correctly restore the bi_idx field
before ending the request. Can't possibly break anything since it's
working on the local request copy ("scratchpad") anyway. Also does this in
legacy/pdc4030.c (similar code). The code modified here is going to die
anyway any trying to fix it would be too invasive. Ok with Bartlomiej.
Andrew Morton [Mon, 19 Jan 2004 13:10:03 +0000 (05:10 -0800)]
[PATCH] Optimize proc_pid_lookup
From: Manfred Spraul <manfred@colorfullife.com>
readdir on /proc has two problems: reading all entries is O(N^2), and
entries are overlooked if tasks die in the middle of readdir: the readdir
implementation remembers the offset into the task list, and if a task
(actually: process) that was returned by previous readdir calls exits, then
a random entry is dropped.
The attached patch fixes the O(N^2) by using f_version to store the pid of
the task that should be returned next. This speeds up reading /proc to
O(N). Additionally, it mitigates the effects of dying tasks: Tasks are
skipped only if the task whose pid is stored in f_version exits, all other
task deaths have no effect. Unfortunately the code has a bad worst case
behavior: if the targeted task exits and a new task with the same pid is
created, then all entries in the task list between old and new position are
dropped. This should be rare.
Andrew Morton [Mon, 19 Jan 2004 13:09:46 +0000 (05:09 -0800)]
[PATCH] Remove redundant code in workqueue.c
From: Rusty Russell <rusty@rustcorp.com.au>
It turns out that run_workqueue never has signal_pending(), since setting
the handler to SIG_IGN means "don't make zombies, I'm ignoring them". Fix
the comment, don't allow the signal, and remove the unused waitpid loop.
This also allows simpler conversion of workueues to the kthread mechanism,
which uses signals to indicate it's time to stop.
Andrew Morton [Mon, 19 Jan 2004 13:08:35 +0000 (05:08 -0800)]
[PATCH] Remove Intel check in i386 HPET code
From: Andi Kleen <ak@muc.de>
The i386 HPET time setup code would explicitely check for the Intel vendor
ID. That is bogus because other chipset vendors (like AMD) are
implementing HPET too.
Andrew Morton [Mon, 19 Jan 2004 13:08:26 +0000 (05:08 -0800)]
[PATCH] module removal race fix
From: Rusty Russell <rusty@au1.ibm.com>
Vatsa spotted this: you can remove a module while it's being initialized,
and that will be bad. Hole was opened when I dropped the sem around the
init routine (which can probe for other modules).
Andrew Morton [Mon, 19 Jan 2004 13:06:19 +0000 (05:06 -0800)]
[PATCH] cpu_sibling_map fix
From: "Nakajima, Jun" <jun.nakajima@intel.com>
Restore the HT detection algorithm. Make the processor package mapping
subarch-specific so that it can reflect the APIC ID info provided by BIOS
if required.
Andrew Morton [Mon, 19 Jan 2004 02:57:26 +0000 (18:57 -0800)]
[PATCH] 3c59x: module loading fix
3c59x has a tunable `rx_copybreak'. But it's declared const, so recent gcc's
rub it out altogether, and modprobe says `3c59x: falsely claims to have
parameter rx_copybreak'.
Andrew Morton [Mon, 19 Jan 2004 02:56:51 +0000 (18:56 -0800)]
[PATCH] kNFSd: Fix incorrect call for follow_up
From: NeilBrown <neilb@cse.unsw.edu.au>
follow_up doesn't check that the passed dentry is at the root of the mounted
file system, so we have to do that, to avoid calling follow_up too many
times.
Andrew Morton [Mon, 19 Jan 2004 02:56:34 +0000 (18:56 -0800)]
[PATCH] kNFSd: Fix problem with stale filehandles.
From: NeilBrown <neilb@cse.unsw.edu.au>
nfsd_setuser was not called until after filehandle lookup was done, so
filehandle lookup would use the wrong userid, and so the permission checking
in nfsd_acceptable would be bogus.
Andrew Morton [Mon, 19 Jan 2004 02:56:07 +0000 (18:56 -0800)]
[PATCH] Use request_list as indicator that req originated from ll_rw_blk
From: Mike Christie <michaelc@cs.wisc.edu>,
Jens Axboe <axboe@suse.de>
It's cleaner and more correct to look at req->rl to determine whether this
request got from the block layer requests lists instead of using req->q.
It's handy to always have req->q available, to lookup the queue from the
request.
Andrew Morton [Mon, 19 Jan 2004 02:55:12 +0000 (18:55 -0800)]
[PATCH] v4l: add infrared remote support
From: Gerd Knorr <kraxel@bytesex.org>
This patch adds a module with some helper functions to handle infrared
remotes using the linux input layer. It doesn't do any useful stuff alone,
but the saa7134 and bttv drivers will use that to support the remotes shipped
with some TV cards.
Andrew Morton [Mon, 19 Jan 2004 02:55:03 +0000 (18:55 -0800)]
[PATCH] v4l: bttv driver update
From: Gerd Knorr <kraxel@bytesex.org>
bttv driver update. Changes:
(1) Added a new, sysfs-based interface to allow access to the bt878 gpio
lines from other kernel modules (new bttv-gpio.c file), which fixes alot
of problems the old interface has (which still is in bttv-if.c, to be
removed in 2.7).
(2) moved the i2c code from bttv-if.c to bttv-i2c.c.
(3) created a new "struct bttv_core" and moved some of the entries from
"struct bttv" to the new one. This is needed for (1) and makes the patch
pretty big, althrough there is no actual code changes.
(4) first cut for suspend support (S1 works for me).
(5) usual batch of new/updated tv card list entries.
Andrew Morton [Mon, 19 Jan 2004 02:54:53 +0000 (18:54 -0800)]
[PATCH] v4l: video-buf update
From: Gerd Knorr <kraxel@bytesex.org>
This patch contains video-buf fixes, mainly remove videobuf_lock() and
videobuf_unlock() functions. They are not needed as get_user_pages() locks
down the pages anyway.
Andrew Morton [Mon, 19 Jan 2004 02:54:44 +0000 (18:54 -0800)]
[PATCH] v4l: v4l2 update
From: Gerd Knorr <kraxel@bytesex.org>
This patch is a v4l2 update. Changes:
* added new ioctls (VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY) to give v4l apps
priorities for tuning and other controls. Main purpose is that backgrounds
applictions like nxtvepg which are fishing informations from /dev/vbi
(teletext, epg, ...) can run at lower priority than interactive tv apps and
thus the user isn't annonyed with unexpected channel switches.
* add a set of helper functions to handle priorities to the v4l2-common
module.
Andrew Morton [Mon, 19 Jan 2004 02:54:35 +0000 (18:54 -0800)]
[PATCH] v4l: videodev update
From: Gerd Knorr <kraxel@bytesex.org>
This patch fixes some v4l2 ioctl #defines which have wrong _IO* macros. It
also adds a function which maps the old numbers to to new ones to maintain
binary backward compatibility.