Andrew Morton [Fri, 12 Mar 2004 00:14:02 +0000 (16:14 -0800)]
[PATCH] dm: default queue limits
From: Joe Thornber <thornber@redhat.com>
Fill in missing queue limitations when table is complete instead of enforcing
the "default" limits on every dm device. Problem noticed by Mike Christie.
Andrew Morton [Fri, 12 Mar 2004 00:13:40 +0000 (16:13 -0800)]
[PATCH] dm: endio method
From: Joe Thornber <thornber@redhat.com>
Add an endio method to targets. This method is allowed to request another
shot at failed ios (think multipath). Context can be passed between the map
method and the endio method.
Andrew Morton [Fri, 12 Mar 2004 00:13:16 +0000 (16:13 -0800)]
[PATCH] i386 very early memory detection cleanup patch
From: "H. Peter Anvin" <hpa@zytor.com>
This patch cleans up the very early memory setup on the i386 platform. In
particular, it removes the hard-coded 8 MB limit completely by dynamically
creating the early-boot pagetables rather than having them hard coded.
While I was at it, I changed head.S so that it always sets up a local GDT;
this means among other things that SMP and VISWS are no longer special
cases, and is conceptually cleaner to boot. The VISWS people have
confirmed it works on VISWS.
It also uses a separate entrypoint for non-boot processors since this is
completely kernel-internal anyway. This eliminates the need to set %bx on
boot. (If you think this is a bad idea I can eliminate this change; it
just seemed cleaner to me to do it this way.)
Additionally, zero bss with rep;stosl rather that rep;stosb.
Andrew Morton [Fri, 12 Mar 2004 00:12:38 +0000 (16:12 -0800)]
[PATCH] time interpolator fix
From: john stultz <johnstul@us.ibm.com>
In developing the ia64-cyclone patch, which implements a cyclone based time
interpolator, I found the following bug which could cause time
inconsistencies.
In update_wall_time_one_tick(), which is called each timer interrupt, we
call time_interpolator_update(delta_nsec) where delta_nsec is approximately
NSEC_PER_SEC/HZ. This directly correlates with the changes to xtime which
occurs in update_wall_time_one_tick().
However in update_wall_time(), on a second overflow, we again call
time_interpolator_update(NSEC_PER_SEC). However while the components of
xtime are being changed, the overall value of xtime does not (nsec is
decremented NSEC_PER_SEC and sec is incremented). Thus this call to
time_interpolator_update is incorrect.
This patch removes the incorrect call to time_interpolator_update and was
found to resolve the time inconsistencies I had seen while developing the
ia64-cyclone patch.
Andrew Morton [Fri, 12 Mar 2004 00:12:15 +0000 (16:12 -0800)]
[PATCH] read-only support for UFS2
From: Niraj Kumar <niraj17@iitbombay.org>
This patch adds read-only support for ufs2 (used in FreeBSD 5.x) variant of
ufs filesystem. For filesystem specific tools, see
http://ufs-linux.sourceforge.com .
Andrew Morton [Fri, 12 Mar 2004 00:12:05 +0000 (16:12 -0800)]
[PATCH] adaptive lazy readahead
From: Suparna Bhattacharya <suparna@in.ibm.com>
From: Ram Pai <linuxram@us.ibm.com>
Pipelined readahead behaviour is suitable for sequential reads, but not for
large random reads (typical of database workloads), where lazy readahead
provides a big performance boost.
One option (suggested by Andrew Morton) would be to have the application
pass hints to turn off readahead by setting the readahead window to zero
using posix_fadvise64(POSIX_FADV_RANDOM), and to special-case that in
do_generic_mapping_read to completely bypass the readahead logic and
instead read in all the pages needed directly.
This was the idea I started with. But then I thought, we can do a still
better job ? How about adapting the readahead algorithm to lazy-read or
non-lazy-read based on the past i/o patterns ?
The overall idea is to keep track of average number of contiguous pages
accessed in a file. If the average at any given time is above ra->pages
the pattern is sequential. If not the pattern is random. If pattern is
sequential do non-lazy-readahead( read as soon as the first page in the
active window is touched) else do lazy-readahead.
I have studied the behaviour of this patch using my user-level simulator.
It adapts pretty well.
Note from Suparna: This appears to bring streaming AIO read performance for
large (64KB) random AIO reads back to sane values (since the lazy readahead
backout in the mainline).
Andrew Morton [Fri, 12 Mar 2004 00:11:54 +0000 (16:11 -0800)]
[PATCH] readdir() cleanups
From: <viro@parcelfarce.linux.theplanet.co.uk>
cramfs and freevxfs explicitly mark themselves readonly (as other r/o fs
do).
afs marked noatime (ACKed by maintainer)
filesystems that do not do update_atime() in their ->readdir() had been
explicitly marked nodiratime. NOTE: cifs, coda and ncpfs almost certainly
need full noatime as we currently have in nfs and afs.
update_atime() call shifted to callers of ->readdir() and out of
->readdir() instances. Bugs caught:
dcache_readdir() updated atime only if it reached EOF.
Andrew Morton [Fri, 12 Mar 2004 00:11:41 +0000 (16:11 -0800)]
[PATCH] Clean up sys_ioperm stubs
From: Brian Gerst <bgerst@didntduck.org>
Remove stubs for sys_ioperm for non-x86 arches, using sys_ni_syscall
instead where applicable. Support for sys_ioperm is unconditionally no for
non-x86 arches.
Andrew Morton [Fri, 12 Mar 2004 00:11:31 +0000 (16:11 -0800)]
[PATCH] ppc64: fix initialisation of NUMA arrays
From: Anton Blanchard <anton@samba.org>
We were hitting problems on machines with cpu_possible != cpu_online when
NUMA was enabled. The debug checks would trip during scheduler init
because we iterate through all possible cpus whereas we only set up NUMA
information for online cpus.
Longer term we should have a cpu_up hook which sets up its NUMA information
but for now we initalise all possible cpus and memory to node 0.
Andrew Morton [Fri, 12 Mar 2004 00:11:20 +0000 (16:11 -0800)]
[PATCH] print kernel version in oops messages
From: Arjan van de Ven <arjanv@redhat.com>
Unfortunatly a large portion of the oops reports lack the basic
information about what kernel version the oops is for; it's trivial to just
print this in the oops as well to improve the usefulness of bugreports...
Anton Blanchard [Thu, 11 Mar 2004 23:57:24 +0000 (15:57 -0800)]
[PATCH] fix ppc64 in kernel syscalls
Thanks to some great debugging work by Olaf Hering and Marcus Meissner
it has been noticed that the current ppc64 syscall code is corrupting
4 bytes past errno. Why we even bothered to set errno beats me, its
unusable in the kernel.
Since we had to reinstate the inline syscall code we can go back to
using it for those few syscalls that we call. Especially now with
Randy's syscall prototype cleanup we should be calling them directly
but we can do that sometime later.
Jens Axboe [Thu, 11 Mar 2004 23:56:51 +0000 (15:56 -0800)]
[PATCH] CDROMREADAUDIO dma support
This small patch builds on top of the blk_rq_map_user() patch just sent,
and enables us to easily support DMA for CDROMREADAUDIO cdda extraction.
It's quite amazing how much cool stuff you can with the new block layer
:-)
Patch has intelligent fall back from multi frame dma to single frame
dma, and further to old-style pio ripping in case of hardware problems.
Jens Axboe [Thu, 11 Mar 2004 23:56:40 +0000 (15:56 -0800)]
[PATCH] user data -> request mapping
This patch allows you to map a request with user data for io, similarly
to what you can do with bio_map_user() already to a bio. However, this
goes one step further and populates the request so the user only has to
fill in the cdb (almost) and put it on the queue for execution. Patch
converts sg_io() to use it, next patch I'll send adapts cdrom layer to
use it for zero copy cdda dma extraction.
Andi Kleen [Wed, 10 Mar 2004 13:02:19 +0000 (05:02 -0800)]
[PATCH] x86-64 merge for 2.6.4
The biggest new feature is fixed 32bit vsyscall (SYSCALL+SYSENTER)
support, mostly from Jakub Jelinek. This increases 32bit syscall
performance greatly (latency halved and better). The SYSENTER for Intel
support required some infrastructure changes, but seems to work now too.
The 64bit vsyscall vtime() just references xtime.tv_sec now. This
should make it a lot faster too.
A fix for some Intel IA32e systems. Also a few long standing bugs in
NMI like exception handlers were fixed.
And a lot of other bug fixes.
Full changeLog:
- Clean up 32bit address room limit handling, fix 3gb personality
- Move memcpy_{from,to}io export to ksyms.c file. This seems to work
around a toolchain bug (Andreas Gruenbacher)
- Update defconfig
- ACPI merges from i386 (SBF should work now, acpi=strict)
- Implement mmconfig support based on i386 code (untested)
- Fix i386/x86-64 pci source file sharing
- Implement ptrace access for 32bit vsyscall page
- Always initialize all 32bit SYSENTER/SYSCALL MSRs.
- Export run time cache line size to generic kernel
- Remove explicit CPUID in ia32 syscall code
- Fill in most of boot_cpu_data early
- Remove unused PER_LINUX32 setup
- Fix syscall trace in fast 32bit calls (Suresh B. Siddha)
- Tighten first line of the oops again.
- Set up ptrace registers correctly for debug,ss,double fault exceptions
- Fix 64bit bug in sys_time64
- Optimize time syscall/vsyscall to only read xtime
- Fix csum_partial_copy_nocheck
- Remove last traces of FPU emulation
- Check properly for rescheduling in exceptions with own stack
- Harden exception stack entries (#SS,#NMI,#MC,#DF,#DB) against bogus GS
- Use an exception stack for machine checks
- Handle TIF_SINGLESTEP properly in kernel exit
- Add exception stack for debug handler
- Disable X86_HT for Opteron optimized builds because it pulls in ACPI_BOOT
- Fix CONFIG_ACPI_BOOT compilation without CONFIG_ACPI
- Fix eflags handling in SYSENTER path (Jakub Jelinek)
- Use atomic counter for enable/disable_hlt
- Support 32bit SYSENTER vsyscall too (Jakub Jelinek)
- Don't redefine Dprintk
- Change some cpu/apic id arrays to char
- Support arbitary cpu<->apicid in hard_smp_processor_id (Surresh B Sidda)
- Move K8 erratum #100 workaround into slow path of page fault handler.
- Fix 32bit cdrom direct access ioctls (Jens Axboe)
- Enable 32bit vsyscalls by default
- Fix 32bit vsyscalls (Jakub Jelinek)
This makes the temperature control code more robust, putting less
pressure on i2c, and work around occasional misconfiguration of the ADC
chips leading to incorrect temperature readings.
This patch fixes the code that workaround lockups when accessing
the config space of devices on K2 when they are shut down. The
code was there but in the wrong place ;) And a typo prevented the
ohci1394 version of it from working.
Don Fry [Wed, 10 Mar 2004 15:32:25 +0000 (10:32 -0500)]
[PATCH] pcnet32.c oops
When adding an additional device, a variable which has been removed
is accessed. Adding the first device or a 4-port card works.
Adding a second device was not done in PCI hot plug testing. Now
tested on IA32.
Linus Torvalds [Wed, 10 Mar 2004 07:12:33 +0000 (23:12 -0800)]
Revert 8259 timer ack workaround
This patch was trying to work around buggy SMM bios but causes problems
by not deasserting NMI irq line (reported by Thomas Schlicht) for some
integrated local apic.
This patch was written originally as an optimization (with the side
effect to fix those bugged bios) but was never applied to 2.4 tree.
Petr Vandrovec [Tue, 9 Mar 2004 23:58:42 +0000 (15:58 -0800)]
[PATCH] ncpfs fails to correctly retry requests on timeout
sock_sendmsg() modifies iovec passed to it - it sets all length members of
iovec array to zero on success transmission (and even on failed if it
fails after iovec copy, but...) and advances pointers to point at the end
of buffers used. This has an unfortunate effect that ncpfs's retry on
failure does not work for IPX/UDP connections - kernel refused to do anything
because length from iovec was 0 while length passed to sock_sendmsg() was
correct.
This simple fix gets rid of a problem by creating temporary iovec copy, which can
sock_sendmsg destroy if it has such wish.
Jens Axboe [Tue, 9 Mar 2004 23:58:22 +0000 (15:58 -0800)]
[PATCH] set request fastfail bit correctly
From Mike Christie <michaelc@cs.wisc.edu>
The first three bio and request flags are no longer identical. The bio
barrier and rw flags are getting set in __make_request and get_request
respectively, and failfast is getting left out.
This sets the request's failfast flag in __make_request when the bio's
flag is set.
Anton Blanchard [Tue, 9 Mar 2004 23:58:13 +0000 (15:58 -0800)]
[PATCH] ppc64 POWER3 segment table fix
The ppc64 fix last week (enforcing permissions on the kernel when
accessing userspace pages) uncovered a bug on POWER3/RS64. We werent
zeroing the segment table entry before overwriting it and it was possible
for the ks bit to be set on a kernel segment.
The VSID mask was also changed to match reality (we only use 13 bits).
[PATCH] ppc64: Let OF initialize all displays in the system
This patch reworks the early boot calls to OF to initialize displays.
All present displays are now initialized in reverse order so the
OF console stays on the first one. Initializing them all is necessary
for dual head configurations as we need OF driver to properly setup
the secondary TMDS of the video card, XFree isn't able to do that
currently
[PATCH] ppc64: Fix occasional crash at boot in OF interface
The assembly code used to callback into Open Firmware client
interface in 32 bits mode used to backup the stack pointer in
the SPRG2 register.
That upsets Apple's implementation of Open Firmware significantly
and maybe others, causing them to crash in _some_ operations,
apparently the trigger is to cause a segment or hash table
fault, typically happens when letting that code initialize the
second display.
This patch fixes it, along with other cleanups of that asm code,
it did unnecessary register restores and backing up the stack
pointer is actually useless anyway.
Strangely, I though I fixed that a long time ago, but it was still
broken in the current tree...
Drivers like radeonfb fail to find the OF device matching a given PCI
device on the G5 AGP bus because of some bus renumbering tricks. This
patch fixes the problem by fixing the bus numbers in the OF node. This
corrects radeonfb and other drivers looking for EDID / PLL datas in the
OF node.
This fixes possible lockups in pmac_zilog when beeing flooded with
incoming data (not that other serial drivers share the same race, I told
Russel about it already). It also fixes some SCC initialization
problems, add some PM callback, and fix the irda setup code.
[PATCH] pmac_zillog 1/2 : Cosmetic only, change "up" to "uap" to avoid collision
This does cosmetic changes the pmac_zilog, changing the use of "up" as
an identifier in favor "uap" to avoid collision with semaphores, use
proper debug macros, and a few other cosmetic bits.
Rusty Russell [Mon, 8 Mar 2004 14:06:12 +0000 (06:06 -0800)]
[PATCH] remove sparc64's num_possible_cpus()
Levent Serinol <levent.serinol@mynet.com> found that the hotplug cpu
patch broke Sparc64. I introduced a num_possible_cpus(), which
Sparc64 already has. Remove the Sparc64 one.
I also removed Sparc64's cpu_online() macro: it's in linux/cpumask.h
already.
Rusty Russell [Mon, 8 Mar 2004 14:05:53 +0000 (06:05 -0800)]
[PATCH] introduce __drain_pages() to take a CPU number
Extracts core of drain_pages() for hotcpu use. Trivial.
Hotplug CPU needs to drain pages on a downed CPU (usually it's the
current cpu). Introduce "__drain_pages", make the CPU an argument,
and expose it if CONFIG_HOTPLUG_CPU as well as CONFIG_PM.
Jeff Garzik [Mon, 8 Mar 2004 17:33:25 +0000 (12:33 -0500)]
[libata sata_promise] provide proper SCSI completion function
Promise driver uses a custom error handling function, so we need
the fix that was applied to the libata core: the SCSI error
handling thread requires that we complete commands using a special
completion function, since the normal one doesn't work inside
the error handling thread.
The following patch is a very crude one to at least not make sata block
suspend-to-ram entirely. Probably you want more powermanagement handling as
well... but it's a start
Don Fry [Mon, 8 Mar 2004 16:23:53 +0000 (11:23 -0500)]
[PATCH] pcnet32 transmit hang fix
The pcnet32 driver will hang after a few frames (<30) with the 79C971
(and probably the 79C972 though I don't have the hardware to prove it).
By interrupting slightly more frequently the hang will not occur.
Pawel> This machine has RAM BIOS booted from floppy. I ran it and EISA
Pawel> configure utility to check this once more. Card is enabled and not
Pawel> locked. I added eisa_bus.enable_dev=2 parameter but it didn't help much.
Pawel> I'm getting:
Pawel> I added this final entry you mailed but nothing changed. Still - module
Pawel> loads and unloads cleanly and without any warnings on 2.6.4-rc1. But
Pawel> does nothing - not a single line in logs/dmesg after it's loaded. Card
Pawel> does not work after modprobe, I can't get interface up.
Ok, found it.
It really looks like the new EISA probing code in hp100 never got
tested, since a precious offset has disappeared during the rewriting
process.
Please note that you still need to enable the device by hand, since
your BIOS (or maybe the EISA CFG file, since I'm seeing the exact same
problem on a Compaq machine here) doesn't properly enable the card.
Rusty Russell [Mon, 8 Mar 2004 09:12:45 +0000 (01:12 -0800)]
[PATCH] stop_machine_run: Move Bogolock Code Out of module.c
The "bogolock" code was introduced in module.c, as a way of freezing
the machine when we wanted to remove a module. This patch moves it
out to stop_machine.c and stop_machine.h.
Since the code changes affinity and proirity, it's impolite to hijack
the current context, so we use a kthread. This means we have to pass
the function rather than implement "stop_machine()" and
"restart_machine()".
Dave Kleikamp [Mon, 8 Mar 2004 08:40:34 +0000 (02:40 -0600)]
JFS: Avoid incrementing i_count on file create
Committing a transaction creating a file required insuring that the
inode stayed in cache until the journal was written to. i_count was
being incremented until the transaction was complete.
However, incrementing i_count caused fcntl(S_SETLEASE) to fail. I
reworked the transaction code so that the inode does not have to
stay in-memory while the transaction is being committed.
Thanks to Steve French for figuring out why setlease was failing.
Dave Kleikamp [Mon, 8 Mar 2004 07:24:03 +0000 (01:24 -0600)]
JFS: warn users of inaccessible file names
When no iocharset is specified, the default action is to trivially
map each byte into the low order of the 16-bit unicode character.
If an existing name exists that has a non-zero high order byte, the
file will be inaccessible without remounting with iocharset set to
a charset that supports the character.
This patch will cause a warning to be issued to the syslog (no more
than five times) suggesting that the volume be mounted with
iocharset=utf8 in order to access the file.
Andrew Morton [Mon, 8 Mar 2004 06:42:37 +0000 (22:42 -0800)]
[PATCH] vma corruption fix
From: Hugh Dickins <hugh@veritas.com>
Fixes bugzilla #2219
fork's dup_mmap leaves child mm_rb as copied from parent mm while doing all
the copy_page_ranges, and then calls build_mmap_rb without holding
page_table_lock.
try_to_unmap_one's find_vma (holding page_table_lock not mmap_sem) coming
on another cpu may cause mm mayhem. It may leave the child's mmap_cache
pointing to a vma of the parent mm.
When the parent exits and the child faults, quite what happens rather
depends on what junk then inhabits vm_page_prot, which gets set in the page
table, with page_add_rmap adding the ptep, but junk pte likely to fail the
tests for page_remove_rmap.
Eventually the child exits, the page table is freed and try_to_unmap_one
oopses on null ptep_to_mm (but in a kernel with rss limiting, usually
page_referenced hits the null ptep_to_mm first).
This took me days and days to unravel! Big thanks to Matthieu for
reporting it with a good test case.