]> git.hungrycats.org Git - linux/log
linux
21 years ago[PATCH] xattr consolidation v3 - ext3
James Morris [Tue, 19 Oct 2004 01:16:16 +0000 (18:16 -0700)]
[PATCH] xattr consolidation v3 - ext3

This patch converts the ext3 xattr and acl code to the generic xattr API.

Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] xattr consolidation v3 - LSM
James Morris [Tue, 19 Oct 2004 01:16:03 +0000 (18:16 -0700)]
[PATCH] xattr consolidation v3 - LSM

This patch replaces the dentry parameter with an inode in the LSM
inode_{set|get|list}security hooks, in keeping with the ext2/ext3 code.
dentries are not needed here.

Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] xattr consolidation v3 - generic xattr API
James Morris [Tue, 19 Oct 2004 01:15:51 +0000 (18:15 -0700)]
[PATCH] xattr consolidation v3 - generic xattr API

This patch consolidates common xattr handling logic into the core fs code,
with modifications suggested by Christoph Hellwig (hang off superblock, remove
locking, use generic code as methods), for use by ext2, ext3 and devpts, as
well as upcoming tmpfs xattr code.

Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Fix types.h
Carlos Eduardo Medaglia Dyonisio [Tue, 19 Oct 2004 01:15:39 +0000 (18:15 -0700)]
[PATCH] Fix types.h

This patch fixes troubles when compiling some applications that include
<linux/byteorder/little_endian.h>, like xmms.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Simplify last lib/idr.c change
Ulrich Drepper [Tue, 19 Oct 2004 01:15:27 +0000 (18:15 -0700)]
[PATCH] Simplify last lib/idr.c change

The last change to alloc_layer in lib/idr.c unnecessarily complicates
the code and depending on the definition of spin_unlock will cause worse
code to be generated than necessary.  The following patch should improve
the situation.

Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] smbfs does not honor uid, gid, file_mode and dir_mode supplied by user mount
Haroldo Gamal [Tue, 19 Oct 2004 01:15:14 +0000 (18:15 -0700)]
[PATCH] smbfs does not honor uid, gid, file_mode and dir_mode supplied by user mount

This patch fixes "Samba Bugzilla Bug 999".  The last version (2.6.8.1) of
smbfs kernel module do not honor uid, gid, file_mode and dir_mode supplied
by user during mount.  This bug is also logged as "Kernel Bug Tracker Bug
3330".

To fully work, some modifications are needed to samba smbmount.c and
smbmnt.c files.  Those patches are available at Samba and Kernel Bug
Tracker pages.

After those patches, if the user do not supply any of the parameters above,
the uid, gid, file_mode and dir_mode on the server will be used by the
client.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] taint on bad_page
Nick Piggin [Tue, 19 Oct 2004 01:15:02 +0000 (18:15 -0700)]
[PATCH] taint on bad_page

Hugh and I both thought this would be generally useful.

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] taint: fix forced rmmod
Nick Piggin [Tue, 19 Oct 2004 01:14:50 +0000 (18:14 -0700)]
[PATCH] taint: fix forced rmmod

This taint didn't appear to be reported.

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] x86-64/i386: add mce tainting
Andi Kleen [Tue, 19 Oct 2004 01:14:38 +0000 (18:14 -0700)]
[PATCH] x86-64/i386: add mce tainting

This patch adds machine check tainting.  When a handled machine check
occurs the oops gets a new 'M' flag.  This is useful to ignore machines
with hardware problems in oops reports.

On i386 a thermal failure also sets this flag.

Done for x86-64 and i386 so far.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Document RCU based dcache lookup
Dipankar Sarma [Tue, 19 Oct 2004 01:14:25 +0000 (18:14 -0700)]
[PATCH] Document RCU based dcache lookup

Finally some in-tree documentation for RCU-based dcache look-up.

Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Remove d_bucket
Dipankar Sarma [Tue, 19 Oct 2004 01:14:13 +0000 (18:14 -0700)]
[PATCH] Remove d_bucket

Tested using dcachebench and hevy rename test.
http://lse.sourceforge.net/locking/dcache/rename_test/

While going over dcache code, I realized that d_bucket which was introduced
to prevent hash chain traversals from going into an infinite loop earlier,
is no longer necessary.  Originally, when RCU based lock-free lookup was
first introduced, dcache hash chains used list_head.  Hash chain traversal
was terminated when dentry->next reaches the list_head in the hash bucket.
However, if renames happen during a lock-free lookup, a dentry may move to
different bucket and subsequent hash chain traversal from there onwards may
not see the list_head in the original bucket at all.  In fact, this would
result in the list_head in the bucket interpreted as a list_head in dentry
and bad things will happen after that.  Once hlist based hash chains were
introduced in dcache, the termination condition changed and lock-free
traversal would be safe with NULL pointer based termination of hlists.
This means that d_bucket check is no longer required.

There still exist some theoritical livelocks like a dentry getting
continuously moving and lock-free look-up never terminating.  But that
isn't really any worse that what we have.  In return for these changes, we
reduce the dentry size by the size of a pointer.  That should make akpm and
mpm happy.

Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Fix dcache lookup
Dipankar Sarma [Tue, 19 Oct 2004 01:14:01 +0000 (18:14 -0700)]
[PATCH] Fix dcache lookup

__d_lookup() has leftover stuff from earlier code to protect it against
rename.  The smp_rmb() there was needed for the sequence counter logic.

Original dcache_rcu had :

+               move_count = dentry->d_move_count;
+               smp_rmb();
+
                if (dentry->d_name.hash != hash)
                        continue;
                if (dentry->d_parent != parent)
                        continue;

This was to make sure that comparisons didn't happen before before the
sequence counter was snapshotted.  This logic is now gone and memory
barrier is not needed.  Removing this should also improve performance.

The other change is the leftover smp_read_barrier_depends(), later
converted to rcu_dereference().  Originally, the name comparison was not
protected against d_move() and there could have been a mismatch of
allocation size of the name string and dentry->d_name.len.  This was
avoided by making the qstr update in dentry atomic using a d_qstr pointer.
Now, we do ->d_compare() or memcmp() with the d_lock held and it is safe
against d_move().  So, there is no need to rcu_dereference() anything.  In
fact, the current code is meaningless.

Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] cleanup: time.h, times.h, timex.h and jiffies.h
Martin Schwidefsky [Tue, 19 Oct 2004 01:13:49 +0000 (18:13 -0700)]
[PATCH] cleanup: time.h, times.h, timex.h and jiffies.h

This patch moves some definitions among time.h, times.h, timex.h and
jiffies.h.  The purpose is to sort all jiffies related functions to
jiffies.h, to get rid of the cyclic dependency between time.h & timex.h and
to move all #include lines to the start of the header files.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] cleanup: remove unused definitions from timex.h
Martin Schwidefsky [Tue, 19 Oct 2004 01:13:35 +0000 (18:13 -0700)]
[PATCH] cleanup: remove unused definitions from timex.h

The CLOCK_TICK_FACTOR and FINETUNE defines from <asm/timex.h> are not used
anywhere.  Kill them.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] cleanup: move call to update_process_times.
Martin Schwidefsky [Tue, 19 Oct 2004 01:13:23 +0000 (18:13 -0700)]
[PATCH] cleanup: move call to update_process_times.

For non-smp kernels the call to update_process_times is done in the
do_timer function.  It is more consistent with smp kernels to move this
call to the architecture file which calls do_timer.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] don't include <linux/sysctl.h> in <linux/security.h>
Christoph Hellwig [Tue, 19 Oct 2004 01:13:09 +0000 (18:13 -0700)]
[PATCH] don't include <linux/sysctl.h> in <linux/security.h>

security.h gets pulled in in lots of places, so use forward declarations
for struct ctl_table instead of pulling sysctl in everywhere.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] mark inter_module_* deprecated
Christoph Hellwig [Tue, 19 Oct 2004 01:12:57 +0000 (18:12 -0700)]
[PATCH] mark inter_module_* deprecated

These had been officially deprecated since Rusty's module rewrite, but
never got the __deprecated marker.  The only remaining users are drm and
mtd, so we'll get some warnings for common builds.  But maybe that's the
only way to get the drm people to fix the mess :)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] remove MOD_INC_USE_COUNT/MOD_DEC_USE_COUNT
Christoph Hellwig [Tue, 19 Oct 2004 01:12:45 +0000 (18:12 -0700)]
[PATCH] remove MOD_INC_USE_COUNT/MOD_DEC_USE_COUNT

They've been marked deprecated since 2.5.x and there's no more users.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Replace hard-coded MODVERDIR in modpost
Andreas Gruenbacher [Tue, 19 Oct 2004 01:12:33 +0000 (18:12 -0700)]
[PATCH] Replace hard-coded MODVERDIR in modpost

When building external modules, MODVERDIR is relative to the external
module instead of in the kernel source tree.  Use the MODVERDIR environment
variable instead of the hard-coded path in modpost.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] A simple FIFO implementation
Stelian Pop [Tue, 19 Oct 2004 01:12:21 +0000 (18:12 -0700)]
[PATCH] A simple FIFO implementation

A simple ringbuffer implementation for various character drivers.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] report per-process pagetable usage
William Lee Irwin III [Tue, 19 Oct 2004 01:12:08 +0000 (18:12 -0700)]
[PATCH] report per-process pagetable usage

Andi Kleen requested that the number of pagetable pages in use by a process
be reported in /proc/$PID/status; this patch implements that.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] make console_conditional_schedule() __sched and use cond_resched()
William Lee Irwin III [Tue, 19 Oct 2004 01:11:56 +0000 (18:11 -0700)]
[PATCH] make console_conditional_schedule() __sched and use cond_resched()

Relatively minor add-on (not necessarily tied to it or required to be taken
or a fix for any bug).  Since cond_resched() is using PREEMPT_ACTIVE now,
it may be useful to update the open-coded instance of cond_resched() to use
the generic call.  Also, it should probably be __sched so the caller shows
up in wchan.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] procfs: fix task_mmu.c text size reporting
William Lee Irwin III [Tue, 19 Oct 2004 01:11:44 +0000 (18:11 -0700)]
[PATCH] procfs: fix task_mmu.c text size reporting

Not all binfmts page align ->end_code and ->start_code, so the task_mmu
statistics calculations need to perform this alignment themselves.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Incorrect PCI interrupt assignment on ES7000 for platform GSI
Natalie Protasevich [Tue, 19 Oct 2004 01:11:32 +0000 (18:11 -0700)]
[PATCH] Incorrect PCI interrupt assignment on ES7000 for platform GSI

In arch/i386/kernel/acpi/boot.c, platform GSI does not propagate back from
mp_register_gsi() to a calling routine which results in IRQ to be set for
wrong GSI.  This causes most of the PCI slots on the first PCI module to
fail.  This patch fixes the problem by returning new GSI back to
acpi_register_gsi().

Signed-off-by: Natalie Protasevich <Natalie.Protasevich@unisys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] autofs4: allow map update recognition
Ian Kent [Tue, 19 Oct 2004 01:11:20 +0000 (18:11 -0700)]
[PATCH] autofs4: allow map update recognition

Having recently repaired autofs' ability to recognise updates to maps
dynamically I found I needed to reintroduce the directory inode lookup
method (I broke the update recognition several versions ago, oops).

This patch does this and applies cleanly against 2.6.9-rc1-mm4.

As far as I can tell from testing it doesn't introduce any backward
incompatibilities.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Allow multiple inputs in alternative_input
Zwane Mwaikambo [Tue, 19 Oct 2004 01:11:08 +0000 (18:11 -0700)]
[PATCH] Allow multiple inputs in alternative_input

I had to use the following patch to allow multiple arguments to be passed
down to the asm stub for alternative_input whilst writing alternatives for
mwait code, it seems like a simple enough fix.

Signed-off-by: Zwane Mwaikambo <zwane@linuxpower.ca>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] pidhashing: enforce PID_MAX_LIMIT in sysctls
William Lee Irwin III [Tue, 19 Oct 2004 01:10:55 +0000 (18:10 -0700)]
[PATCH] pidhashing: enforce PID_MAX_LIMIT in sysctls

The pid_max sysctl doesn't enforce PID_MAX_LIMIT or sane lower bounds.
RESERVED_PIDS + 1 is the minimum pid_max that won't break alloc_pidmap(), and
PID_MAX_LIMIT may not be aligned to 8*PAGE_SIZE boundaries for unusual values
of PAGE_SIZE, so this also rounds up PID_MAX_LIMIT to it.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] pidhashing: lower PID_MAX_LIMIT for 32-bit machines
William Lee Irwin III [Tue, 19 Oct 2004 01:10:43 +0000 (18:10 -0700)]
[PATCH] pidhashing: lower PID_MAX_LIMIT for 32-bit machines

/proc/ breaks when PID_MAX_LIMIT is elevated on 32-bit, so this patch lowers
it there.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] pidhashing: retain older vendor copyright
William Lee Irwin III [Tue, 19 Oct 2004 01:10:31 +0000 (18:10 -0700)]
[PATCH] pidhashing: retain older vendor copyright

I was informed that the vendor component of the copyright can't be clobbered
without more care, so this patch retains the older vendor, updating it only to
reflect the appropriate time period.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] pidhashing: rewrite alloc_pidmap()
William Lee Irwin III [Tue, 19 Oct 2004 01:10:19 +0000 (18:10 -0700)]
[PATCH] pidhashing: rewrite alloc_pidmap()

Rewrite alloc_pidmap() to clarify control flow by eliminating all usage of
goto, honor pid_max and first available pid after last_pid semantics, make
only a single pass over the used portion of the pid bitmap, and update
copyrights to reflect ongoing maintenance by Ingo and myself.

Signed-off-by: William Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] no exec: i386 and x86_64 cleanups
Suresh B. Siddha [Tue, 19 Oct 2004 01:10:06 +0000 (18:10 -0700)]
[PATCH] no exec: i386 and x86_64 cleanups

Sync x86_64 noexec behaviour with i386.  And remove all the confusing
noexec related boot parameters.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Add VIDIOC_S_CTRL_OLD to matroxfb
Petr Vandrovec [Tue, 19 Oct 2004 01:09:53 +0000 (18:09 -0700)]
[PATCH] Add VIDIOC_S_CTRL_OLD to matroxfb

For several months I'm receiving complaints from matroxfb users that v4lctl
suddenly stops working for them on kernel upgrade.

Problem is that VIDIOC_S_CTRL was renumbered, but all distros still use old
VIDIOC_S_CTRL value (f.e.  even xawtv-3.94 in Debian unstable still uses
old VIDIOC_S_CTRL definition).

So let's add this old VIDIOC_S_CTRL value (now named VIDIOC_S_CTRL_OLD) to
matroxfb's v4l handling.

Signed-off-by: Petr Vandrovec <vandrove@vc.cvut.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fbdev: trivial fb_get_options fix for cyber2000fb and bw2fb
Antonino Daplas [Tue, 19 Oct 2004 01:09:41 +0000 (18:09 -0700)]
[PATCH] fbdev: trivial fb_get_options fix for cyber2000fb and bw2fb

Trivial fb_get_options fix for
- cyber200fb
- bw2fb

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] FrameMaster II build fix
Geert Uytterhoeven [Tue, 19 Oct 2004 01:09:29 +0000 (18:09 -0700)]
[PATCH] FrameMaster II build fix

fm2fb: Trivial fix for the breakage introduced by the addition of
fb_get_options().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] rework radeonfb blanking
Benjamin Herrenschmidt [Tue, 19 Oct 2004 01:09:17 +0000 (18:09 -0700)]
[PATCH] rework radeonfb blanking

This patch cleans up some old cruft in the manipulation of the LVDS
interface registers and fixes the blanking code to work with various DVI
flat panels.

Since this is all very sensitive stuff, I'm posting the patch here for
testing before submitting it upstream, though Andrew is welcome to put it
in -mm.

It also fix some problems with getting the right PLL setup on recent Mac
laptops, replacing the old hard coded list of values with cleaner code that
"probes" the PLL setup done by the firmware.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Assorted matroxfb fixes
Petr Vandrovec [Tue, 19 Oct 2004 01:09:05 +0000 (18:09 -0700)]
[PATCH] Assorted matroxfb fixes

This small change does:

(1) Properly document 'outputs' option.

(2) Properly use accelerated characters drawing.  fbcon used depth == 0
    for character painting long ago, but it is fixed for several months.

(3) Provide correct hints for fbcon about matroxfb/matroxfb_crtc2
    hardware capabilities.

Signed-off-by: Petr Vandrovec <vandrove@vc.cvut.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Remove big-endian mode from matroxfb
Petr Vandrovec [Tue, 19 Oct 2004 01:08:53 +0000 (18:08 -0700)]
[PATCH] Remove big-endian mode from matroxfb

One of the PowerPC developers, Kostas Georgiou, pointed out to me
discussion back from 2001 that they would prefer little endian mode as
majority of users runs XF4.x and not Xpmac.  And apparently nobody runs
Xpmac now, so we can safely remove big-endian mode from matroxfb
completely.

  So let's simplify matroxfb a bit:

Accelerator and ILOAD fifo is now always in little endian mode.  This is
what XFree does.  Due to this change all #ifdefs based on endianness was
removed from driver - except one which selects framebuffer endinaness (but
there is no code in matroxfb which writes to framebuffer directly).

It seems that while I was not looking m68k got ioremap, and all
architectures now offer ioremap and ioremap_nocache.  Let's kill code which
mapped ioremap_nocache to ioremap, and ioremap to bus_to_virt for
architectures which did not provide them.

And this also fixes small typo - M_C2CTL should be 0x3C10 and not 0x3E10.
Apparently Matrox notes about need to program this register during
initialization are not so important...

Signed-off-by: Petr Vandrovec <vandrove@vc.cvut.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fbdev: split vesafb option vram into vtotal and vremap
Antonino Daplas [Tue, 19 Oct 2004 01:08:40 +0000 (18:08 -0700)]
[PATCH] fbdev: split vesafb option vram into vtotal and vremap

From: Gerd Knorr <kraxel@bytesex.org>:

"IMHO the the only sane thing is to have two options for total + remapped
memory as well.  Otherwise we'll end up changing that back and forth like
it happened for the size calculation stuff for quite some time ...

The patch below does just that and also has the other vmode fix
(vmode = yres * linelength /* instead of yres * xres * depth >> 3 */)."

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fbdev: fix framebuffer memory calculation for vesafb
Antonino Daplas [Tue, 19 Oct 2004 01:08:28 +0000 (18:08 -0700)]
[PATCH] fbdev: fix framebuffer memory calculation for vesafb

- use vesafb_fix.line_length * vesafb_defined.yres to calculate the minimum
  memory required for a video mode. From Aurelien Jacobs <aurel@gnuage.org>.

- separately calculate the memory required for a video mode, memory to be
  remapped, and total memory (for MTRR). From Gerd Knorr
  <kraxel@bytesex.org>.

- the 'vram' option is for memory to be remapped, not total memory.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Fix EDID_INFO in zero-page
Venkatesh Pallipadi [Tue, 19 Oct 2004 01:08:16 +0000 (18:08 -0700)]
[PATCH] Fix EDID_INFO in zero-page

EDID_INFO is encroaching on the space meant for E820 map in zero-page.
This will result in E820 map corruption on any system that has more=20 than
18 E820 entries and CONFIG_VIDEO_SELECT.  Not sure how this bug=20 managed
to hide for more than a year.

Attached patch should fix the bug.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fbcon unimap fix
Antonino Daplas [Tue, 19 Oct 2004 01:08:05 +0000 (18:08 -0700)]
[PATCH] fbcon unimap fix

fbcon doesn't set a unimap at boot time, so special characters come out
wrongly.

This is the code sequence in take_over_console().

newcon->startup()
oldcon->deinit()
newcon->init()

The previous console driver (ie, vgacon), via its deinit method, may release
the unimap allocated by fbcon in fbcon_startup. This is the reason why
calling con_set_default_unimap() in fbcon_init() works, but not in
fbcon_startup().

Check if the default display has an allocated unimap, and if it has none,
call con_set_default_unimap().  And if the target display has no allocated
unimap, then call con_copy_unimap(), where the source unimap is from the
default display.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] VGA console font problems on 2.6 kernel
Takashi Iwai [Tue, 19 Oct 2004 01:07:53 +0000 (18:07 -0700)]
[PATCH] VGA console font problems on 2.6 kernel

From: Egbert Eich <eich@suse.de>

I would like to utilize kernel ioctls to save/restore console fonts
in VGA text mode when running X. So far the Xserver takes care of this
however there more and more problems with this:
        1. On some platforms (IA64) we need to POST the BIOS before
   we even have a chance to access the hardware ourselves.
   This POSTing will usually undo any changes to the graphics
   hardware that the kernel may have done.
2. More and more drivers fully rely on BIOS support however
   the BIOS functions which could be used to save/restore
   register settings may be broken so the only way of mode
   save/restore is getting/setting the BIOS mode ID.

I've hacked up some code for X however I ran into two problems:

1. con_font_get() in linux/drivers/char/vt.c seems to be broken as
   the font parameters (height, width, charcount) are never reported
   back. Therefore this function seems to be pretty useless.
   The fix is simple (please see below).

2. fb consoles seem to allow to install fonts per vt so that the user
   can have a different font on every console. The text console driver
   doesn't support this: the font is downloaded to the video card
   and will be used for all systems. Still the vga_con driver stores
   the font parameters per console with the effect that setting a
   font with different parameters on one console will result in the
   wron values when this font information is read back from another
   console.
   Appearantly this broken feature has been introduced in 2.6 as
   in the 2.4 kernel the vga_con font information is stored in one
   single global variable.

The IA64 platform at least still heavily relies on the VGA text console.
To be able to fix some VT switching issues with X on this platform I
need these two issues resolved.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fbdev: Add iomem annotations to vga16fb.c
Antonino Daplas [Tue, 19 Oct 2004 01:07:41 +0000 (18:07 -0700)]
[PATCH] fbdev: Add iomem annotations to vga16fb.c

Add iomem annotations to vga16fb.c

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fbdev: Add iomem annotations to i810fb
Antonino Daplas [Tue, 19 Oct 2004 01:07:29 +0000 (18:07 -0700)]
[PATCH] fbdev: Add iomem annotations to i810fb

Add iomem annotations to i810fb.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fbdev: Add iomem annotations to fbmem.c
Antonino Daplas [Tue, 19 Oct 2004 01:07:17 +0000 (18:07 -0700)]
[PATCH] fbdev: Add iomem annotations to fbmem.c

Add iomem annotations to fbmem.c

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fbdev: Remove i810fb explicit agp initialization hack.
Andreas Henriksson [Tue, 19 Oct 2004 01:07:05 +0000 (18:07 -0700)]
[PATCH] fbdev: Remove i810fb explicit agp initialization hack.

When Antonino A.  Daplas posted his "fbdev: Initialize i810fb after
agpgart" patch he said that the ugly agp initialization hack for intel agp
shouldn't be needed but that he couldn't test it.

I have tested the framebuffer updates and additionally removed the
initialization hack and it does indeed work.

Signed-off-by: Andreas Henriksson <andreas@fjortis.info>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] radeonfb: Fix monitor probe logic
Benjamin Herrenschmidt [Tue, 19 Oct 2004 01:06:52 +0000 (18:06 -0700)]
[PATCH] radeonfb: Fix monitor probe logic

Fix a small logic error in the monitor probe code when nothing was found.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fbdev: fix scrolling corruption
Antonino Daplas [Tue, 19 Oct 2004 01:06:40 +0000 (18:06 -0700)]
[PATCH] fbdev: fix scrolling corruption

This patches fixes the following:

- scrolling corruption if scrolling mode is SCROLL_PAN_MOVE. This bug
  was introduced by the tile blitting patch.

- flashing cursor even when console is blanked

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fbdev: Add Tile Blitting support
Antonino Daplas [Tue, 19 Oct 2004 01:06:28 +0000 (18:06 -0700)]
[PATCH] fbdev: Add Tile Blitting support

Hopefully, this patch fixes one last major regression for one particular
driver, namely matroxfb.  This drier has 2 versions, one for the kernel and
another as a '2.4 backport' patch.

This patch adds a tileblitting extension to fbcon.  This extension, in
summary, is basically a forward-port of the 2.4 fbdev/fbcon framework to 2.6
but without the fbcon dependency.  Tile blitting is similar to bitblit, except
that the basic unit is a tile (a bitmap of x-by-y dimensions).  The display,
instead of being described in terms of pixels and scanlines, are described as
a region further subdivided into rectangular sections.  In fbcon parlance, a
tile is a character.

Besides a possible fix for matroxfb, tileblitting can be advantageous for
hardware that supports some kind of fontcaching mechanism.  Also, in the
unlikely chance that the console begins supporting multicolored fonts,
tileblitting is probably more optimal than bitblitting because bitblitting
will need to push more data through the bus.

To enable support for this extension, a driver needs to:

- enable CONFIG_FB_TILEBLITTING
- set FBINFO_MISC_TILEBLITTING in info->flags
- set the required function pointers in struct fb_tileops.  The required
  operations are:

  - void (*fb_settile)(struct fb_info *info, struct fb_tilemap *map);

    tells driver about the tile characteristics (dimensions, bitdepth) and
    about the tilemap which is an array of bitmaps: display->fontdata

  - void (*fb_tilecopy)(struct fb_info *info, struct fb_tilearea *area);

    move a rectangular section of tiles (bmove)

  - void (*fb_tilefill)(struct fb_info *info, struct fb_tilerect *rect);

    fill a rectangular section with a tile (clear)

  - void (*fb_tileblit)(struct fb_info *info, struct fb_tileblit *blit);

    copy an array of tiles to a rectangular section (putcs)

  - void (*fb_tilecursor)(struct fb_info *info, struct fb_tilecursor *cursor);

    cursor function

Changes:

Addition of this extension necessitates cleanup of fbcon.c.  The basic drawing
functions in fbcon are bmove, clear, putcs and cursor (the fbcon_* set).  The
fbcon_* set are just wrappers to accel_* set.  However, usage is not
consistent, some functions call the fbcon_* set, others call the accel_* set.

With this patch, a new fbcon-specific structure (struct fbcon_ops) is created.
 Depending on the setting of the hardware, this struct contains pointers to
either the tileblitting set or the bitblitting set (formerly the accel_* set).
 The tileblitting set is new in this patch.

The vast majority of functions in fbcon will need to only call the fbcon_*
set.  In turn, it calls functions in struct fbcon_ops.  Knowledge of the
blitting type is not required.

The accel_* set is renamed to bit_* and is moved into a separate file,
bitblit.c.  The tile blitting set is in tileblit.c.

In my case at least, the cleanup did produce an unexpected but beneficial
side effect, a little more speedup.  Not much, < 5%.

Petr, if you have comments, suggestions, or you think this is a bad idea,
let me know.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fbdev: Pass struct device to class_simple_device_add
Antonino Daplas [Tue, 19 Oct 2004 01:06:15 +0000 (18:06 -0700)]
[PATCH] fbdev: Pass struct device to class_simple_device_add

Swsusp turns off the display when a power-management-enabled framebuffer
driver is used.  According to Nigel Cunningham <ncunningham@linuxmail.org>,
the fix may involve the following:

"...I thought the best approach would be to use device classes to find the
struct dev for the frame buffer driver, and then use the same code I use for
storage devices to avoid suspending the frame buffer until later..."

Changes:

- pass info->device to class_simple_device_add()
- add struct device *device to struct fb_info
- store struct device in framebuffer_alloc()
- for drivers not using framebuffer_alloc(), store the struct during
  initalization
- port i810fb and rivafb to use framebuffer_alloc()

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fbcon: Fix setup boot options of fbcon
Antonino Daplas [Tue, 19 Oct 2004 01:06:02 +0000 (18:06 -0700)]
[PATCH] fbcon: Fix setup boot options of fbcon

This patch fixes the 'fbcon=map:<option>" of fbcon.  (This option has been
present since 2.4, but got broken in 2.6). This particular option tells
fbcon what framebuffer device gets mapped to what console. Syntax is:

fbcon=map:abcd...

where a, b, c, d,... are framebuffer numbers as it would
appear in /proc/fb.

Given only 2 valid fbdevs, 0 and 1, if fbcon=map:0110, then:

tty1 = fb0
tty2 = fb1
tty3 = fb1
tty4 = fb0
(sequence repeats for the rest of the consoles)

If an invalid framebuffer is used, then the console will be mapped to the
first user-chosen framebuffer.  Ie: fbcon=map:102

tty1 = fb1
tty2 = fb0
tty3 = fb1 <

21 years ago[PATCH] fbdev: fix logo drawing failure for vga16fb
Antonino Daplas [Tue, 19 Oct 2004 01:05:50 +0000 (18:05 -0700)]
[PATCH] fbdev: fix logo drawing failure for vga16fb

This fixes the logo failing to draw in vga16fb due to faulty boolean logic.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fbdev: remove unnecessary banshee_wait_idle from tdfxfb
Antonino Daplas [Tue, 19 Oct 2004 01:05:38 +0000 (18:05 -0700)]
[PATCH] fbdev: remove unnecessary banshee_wait_idle from tdfxfb

- This patch removes the unnecessary call to banshee_wait_idle() from
  tdfxfb_copyarea, imageblit and fillrect.  Removal of the sync will garner
  an additional ~20% in scrolling speed.

- Removes "inverse" which generates a compile warning if modular.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Adjust alignment of pagevec structure
Marcelo Tosatti [Tue, 19 Oct 2004 01:05:25 +0000 (18:05 -0700)]
[PATCH] Adjust alignment of pagevec structure

We can shrink the pagevec structure to cacheline align it.  It is used all
over VM reclaiming and mpage pagecache read code.

Right now it is 140 bytes on 64-bit and 72 bytes on 32-bit.  Thats just a
little bit more than a power of 2 (which will cacheline align), so shrink
it to be aligned: 64 bytes on 32bit and 124bytes on 64-bit.

It now occupies two cachelines most of the time instead of three.

I changed nr and cold to "unsigned short" because they'll never reach 2 ^ 16.

Did some reaim benchmarking on 4way PIII (32byte cacheline), with 512MB RAM:

#### stock 2.6.9-rc1-mm4 ####

Peak load Test: Maximum Jobs per Minute 4144.44 (average of 3 runs)
Quick Convergence Test: Maximum Jobs per Minute 4007.86 (average of 3 runs)

Peak load Test: Maximum Jobs per Minute 4207.48 (average of 3 runs)
Quick Convergence Test: Maximum Jobs per Minute 3999.28 (average of 3 runs)

#### shrink-pagevec #####

Peak load Test: Maximum Jobs per Minute 4717.88 (average of 3 runs)
Quick Convergence Test: Maximum Jobs per Minute 4360.59 (average of 3 runs)

Peak load Test: Maximum Jobs per Minute 4493.18 (average of 3 runs)
Quick Convergence Test: Maximum Jobs per Minute 4327.77 (average of 3 runs)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] generic acl support for ->permission
Christoph Hellwig [Tue, 19 Oct 2004 01:05:13 +0000 (18:05 -0700)]
[PATCH] generic acl support for ->permission

Currently we every filesystem with Posix ACLs has it's own reimplemtation
of the generic permission checking code with additonal ACL support.  This
patch

- adds an optional callback to vfs_permission that filesystems can use
  for ACL support (and renames it to generic_permission because the old
  name was wrong - it wasn't like the other vfs_* functions at all)

- uses it in ext2, ext3 and jfs.  XFS will follow a little later as it's
  permission checking is burried under several layers of abstraction.

From: Dave Kleikamp <shaggy@austin.ibm.com>

  jfs doesn't currently set MS_POSIXACL (it doesn't require the acl mount
  option), so this test would fail here.  The patch below will set it.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] remove set_fs_root/set_fs_pwd
Christoph Hellwig [Tue, 19 Oct 2004 01:05:00 +0000 (18:05 -0700)]
[PATCH] remove set_fs_root/set_fs_pwd

Not exactly something we want modules to mess around with.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] remove wake_up_all_sync
Christoph Hellwig [Tue, 19 Oct 2004 01:04:48 +0000 (18:04 -0700)]
[PATCH] remove wake_up_all_sync

no user in sight

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] unexport lookup_create
Christoph Hellwig [Tue, 19 Oct 2004 01:04:36 +0000 (18:04 -0700)]
[PATCH] unexport lookup_create

Besides namei.c it's only used in the SN2 hwgraph code which can't be
modular (and will be removed soon)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] unexport f_delown
Christoph Hellwig [Tue, 19 Oct 2004 01:04:24 +0000 (18:04 -0700)]
[PATCH] unexport f_delown

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] unexport files_lock and put_filp
Christoph Hellwig [Tue, 19 Oct 2004 01:04:12 +0000 (18:04 -0700)]
[PATCH] unexport files_lock and put_filp

Rather lowlevel functions that modules shouldn't mess with and fortunately
currently don't.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] unexport exit_mm
Christoph Hellwig [Tue, 19 Oct 2004 01:04:00 +0000 (18:04 -0700)]
[PATCH] unexport exit_mm

Not exactly a thing we want done from modules, and no module uses it
anyway.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] unexport do_execve/do_select
Christoph Hellwig [Tue, 19 Oct 2004 01:03:48 +0000 (18:03 -0700)]
[PATCH] unexport do_execve/do_select

These are basically shared code for native/32bit compat code, but as
CONFIG_COMPAT is a bool there's no need to export them.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] unexport devfs_mk_symlink
Christoph Hellwig [Tue, 19 Oct 2004 01:03:37 +0000 (18:03 -0700)]
[PATCH] unexport devfs_mk_symlink

Only legit user is the partitioning code, in addition some uml code is
still using despite the uml people beeing told to fix it at least two
times.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] unexport is_subdir and shrink_dcache_anon
Christoph Hellwig [Tue, 19 Oct 2004 01:03:25 +0000 (18:03 -0700)]
[PATCH] unexport is_subdir and shrink_dcache_anon

Two dcache.c functions that shouldn't be used by filesystems directly
(probably a leftover of the intermezzo mess).

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] unexport proc_sys_root
Christoph Hellwig [Tue, 19 Oct 2004 01:03:14 +0000 (18:03 -0700)]
[PATCH] unexport proc_sys_root

Only used by kernel/sysctl.c which absolutely can't be modular

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] remove dead code and exports from signal.c
Christoph Hellwig [Tue, 19 Oct 2004 01:03:02 +0000 (18:03 -0700)]
[PATCH] remove dead code and exports from signal.c

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] remove pm_find, unexport pm_send
Christoph Hellwig [Tue, 19 Oct 2004 01:02:52 +0000 (18:02 -0700)]
[PATCH] remove pm_find, unexport pm_send

cutting back some unused legacy PM code

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] don't export shmem_file_setup
Christoph Hellwig [Tue, 19 Oct 2004 01:02:40 +0000 (18:02 -0700)]
[PATCH] don't export shmem_file_setup

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] remove posix_acl_masq_nfs_mode
Christoph Hellwig [Tue, 19 Oct 2004 01:02:30 +0000 (18:02 -0700)]
[PATCH] remove posix_acl_masq_nfs_mode

Completely unused but exported function in fs/posix_acl.c

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] remove dead code from fs/mbcache.c
Christoph Hellwig [Tue, 19 Oct 2004 01:02:18 +0000 (18:02 -0700)]
[PATCH] remove dead code from fs/mbcache.c

mb_cache_entry_takeout and mb_cache_entry_dup are totally unused.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] don't export blkdev_open and def_blk_ops
Christoph Hellwig [Tue, 19 Oct 2004 01:02:05 +0000 (18:02 -0700)]
[PATCH] don't export blkdev_open and def_blk_ops

Already since 2.4 all block devices use block_device_operations and
shouldn't deal with file operations directly.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] convert jiffies <-> msecs for io schedulers
Jens Axboe [Tue, 19 Oct 2004 01:01:53 +0000 (18:01 -0700)]
[PATCH] convert jiffies <-> msecs for io schedulers

The various io schedulers don't convert to and from jiffies and ms in their
sysfs exported values.  This patch adds that.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] cfq-v2 I/O scheduler update
Jens Axboe [Tue, 19 Oct 2004 01:01:41 +0000 (18:01 -0700)]
[PATCH] cfq-v2 I/O scheduler update

Here is the next incarnation of the CFQ io scheduler, so far known as
CFQ v2 locally. It attempts to address some of the limitations of the
original CFQ io scheduler (hence forth known as CFQ v1). Some of the
problems with CFQ v1 are:

- It does accounting for the lifetime of the cfq_queue, which is setup
  and torn down for the time when a process has io in flight. For a fork
  heavy work load (such as a kernel compile, for instance), new
  processes can effectively starve io of running processes. This is in
  part due to the fact that CFQ v1 gives preference to a new processes
  to get better latency numbers. Removing that heuristic is not an
  option exactly because of that.

- It makes no attempts to address inter-cfq_queue fairness.

- It makes no attempt to limit upper latency bound of a single request.

- It only provides per-tgid grouping. You need to change the source to
  group on a different criteria.

- It uses a mempool for the cfq_queues. Theoretically this could
  deadlock if io bound processes never exit.

- The may_queue() logic can be unfair since it fluctuates quickly, thus
  leaving processes sleeping while new processes are allowed to allocate
  a request.

CFQ v2 attempts to fix these issues. It uses the process io_context
logic to maintain a cfq_queue lifetime of the duration of the process
(and its io). This means we can now be a lot more clever in deciding
which process is allowed to queue or dispatch io to the device. The
cfq_io_context is per-process per-queue, this is an extension to what AS
currently does in that we truly do have a unique per-process identifier
for io grouping. Busy queues are sorted by service time used, sub sorted
by in_flight requests. Queues that have no io in flight are also
preferred at dispatch time.

Accounting is done on completion time of a request, or with a fixed cost
for tagged command queueing. Requests are fifo'ed like with deadline, to
make sure that a single request doesn't stay in the io scheduler for
ages.

Process grouping is selectable at runtime. I provide 4 grouping
criterias: process group, thread group id, user id, and group id.

As usual, settings are sysfs tweakable in /sys/block/<dev>/queue/iosched

axboe@apu:[.]s/block/hda/queue/iosched $ ls
back_seek_max      fifo_batch_expire  find_best_crq  queued
back_seek_penalty  fifo_expire_async  key_type       show_status
clear_elapsed      fifo_expire_sync   quantum        tagged

In order, each of these settings control:

back_seek_max
back_seek_penalty:
Useful logic stolen from AS that allow small backwards seeks in
the io stream if we deem them useful. CFQ uses a strict
ascending elevator otherwise. _max controls the maximum allowed
backwards seek, defaulting to 16MiB. _penalty denotes how
expensive we account a backwards seek compared to a forward
seek. Default is 2, meaning it's twice as expensive.

clear_elapsed:
Really a debug switch, will go away in the future. It clears the
maximum values for completion and dispatch time, shown in
show_status.

fifo_batch_expire
fifo_batch_async
fifo_batch_sync:
The settings for the expiry fifo. batch_expire is how often we
allow the fifo expire to control which request to select.
Default is 125ms. _async is the deadline for async requests
(typically writes), _sync is the deadline for sync requests
(reads and sync writes). Defaults are, respectively, 5 seconds
and 0.5 seconds.

key_type:
The grouping key. Can be set to pgid, tgid, uid, or gid. The
current value is shown bracketed:

axboe@apu:[.]s/block/hda/queue/iosched $ cat key_type
[pgid] tgid uid gid

Default is tgid. To set, simply echo any of the 4 words into the
file.

quantum:
The amount of requests we select for dispatch when the driver
asks for work to do and the current pending list is empty.
Default is 4.

queued:
The minimum amount of requests a group is allowed to queue.
Default is 8.

show_status:
Debug output showing the current state of the queues.

tagged:
Set this to 1 if the device is using tagged command queueing.
This cannot be reliably detected by CFQ yet, since most drivers
don't use the block layer (well it could, by looking at number
of requests being between dispatch and completion. but not
completely reliably). Default is 0.

The patch is a little big, but works reliably here on my laptop. There
are a number of other changes and fixes in there (like converting to
hlist for hashes). The code is commented a lot better, CFQ v1 has
basically no comments (reflecting that it was writting in one go, no
touched or tuned much since then). This is of course only done to
increase the AAF, akpm acceptance factor. Since I'm on the road, I
cannot provide any really good numbers of CFQ v1 compared to v2, maybe
someone will help me out there.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] switchable and modular io schedulers
Jens Axboe [Tue, 19 Oct 2004 01:01:28 +0000 (18:01 -0700)]
[PATCH] switchable and modular io schedulers

This patch modularizes the io schedulers completely, allowing them to be
modular.  Additionally it enables online switching of io schedulers.  See
also http://lwn.net/Articles/102593/ .

There's a scheduler file in the sysfs directory for the block device
queue:

axboe@router:/sys/block/hda/queue> ls
iosched            max_sectors_kb  read_ahead_kb
max_hw_sectors_kb  nr_requests     scheduler

If you list the contents of the file, it will show available schedulers
and the active one:

axboe@router:/sys/block/hda/queue> cat scheduler
[cfq]

Lets load a few more.

router:/sys/block/hda/queue # modprobe deadline-iosched
router:/sys/block/hda/queue # modprobe as-iosched
router:/sys/block/hda/queue # cat scheduler
[cfq] deadline anticipatory

Changing is done with

router:/sys/block/hda/queue # echo deadline > scheduler
router:/sys/block/hda/queue # cat scheduler
cfq [deadline] anticipatory

deadline is now the new active io scheduler for hda.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] unreachable code in ext3_direct_IO()
Andrew Morton [Tue, 19 Oct 2004 01:01:16 +0000 (18:01 -0700)]
[PATCH] unreachable code in ext3_direct_IO()

davej points out that in this code local variable `ret' is already known to be
positive non-zero, so this test is meaningless.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] jbd wakeup fix
Andrew Morton [Tue, 19 Oct 2004 01:01:03 +0000 (18:01 -0700)]
[PATCH] jbd wakeup fix

Processes can sleep in do_get_write_access(), waiting for buffers to be
removed from the BJ_Shadow state.  We did this by doing a wake_up_buffer() in
the commit path and sleeping on the buffer in do_get_write_access().

With the filtered bit-level wakeup code this doesn't work properly any more -
the wake_up_buffer() accidentally wakes up tasks which are sleeping in
lock_buffer() as well.  Those tasks now implicitly assume that the buffer came
unlocked.  Net effect: Bogus I/O errors when reading journal blocks, because
the buffer isn't up to date yet.  Hence the recently spate of journal_bmap()
failure reports.

The patch creates a new jbd-private BH flag purely for this wakeup function.
So a wake_up_bit(..., BH_Unshadow) doesn't wake up someone who is waiting for
a wake_up_bit(BH_Lock).

JBD was the only user of wake_up_buffer(), so remove it altogether.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] document wake_up_bit()'s requirement for preceding memory barriers
William Lee Irwin III [Tue, 19 Oct 2004 01:00:51 +0000 (18:00 -0700)]
[PATCH] document wake_up_bit()'s requirement for preceding memory barriers

Document the requirement to use a memory barrier prior to wake_up_bit().

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] reduce number of parameters to __wait_on_bit() and __wait_on_bit_lock()
William Lee Irwin III [Tue, 19 Oct 2004 01:00:40 +0000 (18:00 -0700)]
[PATCH] reduce number of parameters to __wait_on_bit() and __wait_on_bit_lock()

Some of the parameters to __wait_on_bit() and __wait_on_bit_lock() are
redundant, as the wait_bit_queue parameter holds the flags word and the bit
number.  This patch updates __wait_on_bit() and __wait_on_bit_lock() to
fetch that information from the wait_bit_queue passed to them and so reduce
the number of parameters so that -mregparm may be more effective.

Incremental atop the complete out-of-lining of the contention cases and the
fastcall and wait_on_bit_lock()/test_and_set_bit() fixes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] move wait ops' contention case completely out of line
William Lee Irwin III [Tue, 19 Oct 2004 01:00:29 +0000 (18:00 -0700)]
[PATCH] move wait ops' contention case completely out of line

Move the slow paths of wait_on_bit() and wait_on_bit_lock() out of line.
Also uninline wake_up_bit() to reduce the number of callsites generated,
and adjust loop startup in __wait_on_bit_lock() to properly reflect its
usage in the contention case.

Incremental atop the fastcall and wait_on_bit_lock()/test_and_set_bit()
fixes.  Successfully tested on x86-64.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] eliminate inode waitqueue hashtable
William Lee Irwin III [Tue, 19 Oct 2004 01:00:17 +0000 (18:00 -0700)]
[PATCH] eliminate inode waitqueue hashtable

Eliminate the inode waitqueue hashtable using bit_waitqueue() via
wait_on_bit() and wake_up_bit() to locate the waitqueue head associated
with a bit.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] eliminate bh waitqueue hashtable
William Lee Irwin III [Tue, 19 Oct 2004 01:00:05 +0000 (18:00 -0700)]
[PATCH] eliminate bh waitqueue hashtable

Eliminate the bh waitqueue hashtable using bit_waitqueue() via
wait_on_bit() and wake_up_bit() to locate the waitqueue head associated
with a bit.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] consolidate bit waiting code patterns
William Lee Irwin III [Tue, 19 Oct 2004 00:59:53 +0000 (17:59 -0700)]
[PATCH] consolidate bit waiting code patterns

Consolidate bit waiting code patterns for page waitqueues using
__wait_on_bit() and __wait_on_bit_lock().

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] standardize bit waiting data type
William Lee Irwin III [Tue, 19 Oct 2004 00:59:41 +0000 (17:59 -0700)]
[PATCH] standardize bit waiting data type

Eliminate specialized page and bh waitqueue hashing structures in favor of
a standardized structure, using wake_up_bit() to wake waiters using the
standardized wait_bit_key structure.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] move waitqueue functions to kernel/wait.c
William Lee Irwin III [Tue, 19 Oct 2004 00:59:28 +0000 (17:59 -0700)]
[PATCH] move waitqueue functions to kernel/wait.c

The following patch series consolidates the various instances of waitqueue
hashing to use a uniform structure and share the per-zone hashtable among all
waitqueue hashers.  This is expected to increase the number of hashtable
buckets available for waiting on bh's and inodes and eliminate statically
allocated kernel data structures for greater node locality and reduced kernel
image size.  Some attempt was made to look similar to Oleg Nesterov's
suggested API in order to provide some kind of credit for independent
invention of something very similar (the original versions of these patches
predated my public postings on the subject of filtered waitqueues).

These patches have the further benefit and intention of enabling aio to use
filtered wakeups by standardizing the data structure passed to wake functions
so that embedded waitqueue elements in aio structures may be succesfully
passed to the filtered wakeup wake functions, though this patch series doesn't
implement that particular functionality.

Successfully stress-tested on x86-64, and ia64 in recent prior versions.

This patch:

Move waitqueue -related functions not needing static functions in sched.c
to kernel/wait.c

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] TIOCCONS security
Olaf Dabrunz [Tue, 19 Oct 2004 00:59:16 +0000 (17:59 -0700)]
[PATCH] TIOCCONS security

The ioctl TIOCCONS allows any user to redirect console output to another
tty.  This allows anyone to suppress messages to the console at will.

AFAIK nowadays not many programs write to /dev/console, except for start
scripts and the kernel (printk() above console log level).

Still, I believe that administrators and operators would not like any user
to be able to hijack messages that were written to the console.

The only user of TIOCCONS that I am aware of is bootlogd/blogd, which runs
as root.  Please comment if there are other users.

Is there any reason why normal users should be able to use TIOCCONS?

Otherwise I would suggest to restrict access to root (CAP_SYS_ADMIN), e.g.
with this patch.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] kallsyms data size reduction / lookup speedup
Paulo Marques [Tue, 19 Oct 2004 00:59:03 +0000 (17:59 -0700)]
[PATCH] kallsyms data size reduction / lookup speedup

This patch is an improvement over my first kallsyms speedup patch posted about
2 weeks ago.

It changes scripts/kallsyms as to produce a different format for
kallsyms_names and extra data to speedup lookups.  The compression algorithm
is quite simple: it uses all the char codes not actually used in symbols to
build a lookup table that translates these codes into small strings.  For
instance, in my test runs the code 0xFE was being translated into "acpi_"
giving a 4 byte save on every translation.

The advantage of this algorithm is that to translate a symbol we only require
information that is stored on that symbol position, and never need to go back
on the compressed stream to get information from other symbols.

To give an idea about the benefits of this algorithm here are some benchmark
results on a P4 2.8GHz with a symbol table with 10000 entries:

kallsyms_lookup average time:
  vanilla           1346.0 us
  speedup             14.4 us
  with this patch      0.5 us

total data produced by scripts/kallsyms:
  uncompressed         169 Kb
  vanilla              134 Kb
  with this patch       91 Kb

(speedup was my latest patch, that only changed the way kallsyms_lookup worked
and not the data format)

I removed a cond_resched() from the proc/kallsyms handling code path, because
using stem compression, if the current position went backwards, the hole
stream would be uncompressed up to the current position.  It seemed that by
removing this loop it would be safe to remove the conditional reschedule
altogether.

There is just one catch with this patch: the time it takes to compile the
kernel goes up just a bit (about 0.8s on a P4 2.8GHz with defconfig).  If this
delay is not acceptable I can change the compression algorithm so that it can
use the previous table (calculating a new table is what consumes most of the
time, and not doing the actual compression) and check to see if it obtains a
similar compression ratio.  If it does, then this is a sign that the symbol
patterns haven't changed that much and this table is still good to use.  This
would not only cut the time down to half on any compilation (because of the 2
pass symbol build method), but in frequent cases where a developer is
compiling a single file and linking everything over and over again, the table
optimization process would never run.

I'm CC'ing Brent Casavant on this email, because last june he sent a patch
trying a different approach that used a 32 entry symbol cache, because there
was a problem with the time "top" took to read "proc/<pid>/wchan".  I was
hopping he would be willing to test this patch and comment on the results.

Signed-off-by: Paulo Marques <pmarques@grupopie.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] implement in-kernel keys & keyring management
David Howells [Tue, 19 Oct 2004 00:58:51 +0000 (17:58 -0700)]
[PATCH] implement in-kernel keys & keyring management

The feature set the patch includes:

 - Key attributes:
   - Key type
   - Description (by which a key of a particular type can be selected)
   - Payload
   - UID, GID and permissions mask
   - Expiry time
 - Keyrings (just a type of key that holds links to other keys)
 - User-defined keys
 - Key revokation
 - Access controls
 - Per user key-count and key-memory consumption quota
 - Three std keyrings per task: per-thread, per-process, session
 - Two std keyrings per user: per-user and default-user-session
 - prctl() functions for key and keyring creation and management
 - Kernel interfaces for filesystem, blockdev, net stack access
 - JIT key creation by usermode helper

There are also two utility programs available:

 (*) http://people.redhat.com/~dhowells/keys/keyctl.c

     A comprehensive key management tool, permitting all the interfaces
     available to userspace to be exercised.

 (*) http://people.redhat.com/~dhowells/keys/request-key

     An example shell script (to be installed in /sbin) for instantiating a
     key.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] keys: new error codes for Alpha, MIPS, PA-RISC, Sparc & Sparc64
David Howells [Tue, 19 Oct 2004 00:58:38 +0000 (17:58 -0700)]
[PATCH] keys: new error codes for Alpha, MIPS, PA-RISC, Sparc & Sparc64

The attached patch adds the new error codes I added for key-related errors to
those archs that don't make use of <asm-generic/errno.h>, including Alpha,
MIPS, PA-RISC, Sparc and Sparc64.  This is required to compile with
CONFIG_KEYS on those platforms.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Add some key management specific error codes
David Howells [Tue, 19 Oct 2004 00:58:25 +0000 (17:58 -0700)]
[PATCH] Add some key management specific error codes

Here's a patch to add some new error codes specific to key management.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] reiserfs: rename struct key
Andrew Morton [Tue, 19 Oct 2004 00:58:13 +0000 (17:58 -0700)]
[PATCH] reiserfs: rename struct key

Rename resierfs's `struct key' to `struct reiserfs_key' to avoid namespace
clashes.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] Create nodemask_t
Matthew Dobson [Tue, 19 Oct 2004 00:58:00 +0000 (17:58 -0700)]
[PATCH] Create nodemask_t

The idea behind this patch is to create a nodemask_t as a node analog of
cpumask_t.  As NUMA machines become more common, the need for a standard,
cross-platform bitmap of both online & possible nodes becomes more
apparent.  We believe we've worked out most of the kinks of the variable
length bitmap types with the recent cpumask_t patches.  Nodemasks are also
currently far less widespread than cpumasks.  Further, inclusion at this
point in the kernel would mean consistency in node handling between 2.6 and
2.7.

Future goals would be to get rid of the 'numnodes' variable used to count
the number of online nodes, and replace with node_online_map.  This would
allow arbitrary node numbering and facilitate node hotplugging.

(Nothing actually uses this yet, but several projects need it, and it does
model a well-defined physical grouping).

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] cdrom: buffer sizing fix
Peter Osterlund [Tue, 19 Oct 2004 00:57:46 +0000 (17:57 -0700)]
[PATCH] cdrom: buffer sizing fix

The problem is that some drives fail the "GET CONFIGURATION" command when
asked to only return 8 bytes.  This happens for example on my drive, which
is identified as:

        hdc: HL-DT-ST DVD+RW GCA-4040N, ATAPI CD/DVD-ROM drive

Since the cdrom_mmc3_profile() function already allocates 32 bytes for the
reply buffer, this patch is enough to make the command succeed on my drive.

Signed-off-by: Peter Osterlund <petero2@telia.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] CDRW packet writing support
Peter Osterlund [Tue, 19 Oct 2004 00:57:34 +0000 (17:57 -0700)]
[PATCH] CDRW packet writing support

This patch implements CDRW packet writing as a kernel block device.  Usage
instructions are in the packet-writing.txt file.

A hint: If you don't want to wait for a complete disc format, you can
format just a part of the disc.  For example:

        cdrwtool -d /dev/hdc -m 10240

This will format 10240 blocks, ie 20MB.

Signed-off-by: Peter Osterlund <petero2@telia.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] packet-writing: add credits
Peter Osterlund [Tue, 19 Oct 2004 00:57:21 +0000 (17:57 -0700)]
[PATCH] packet-writing: add credits

Nigel pointed out that the earlier patches contained attributions that
are not present in this patch. The 2.4 patch contains:

  Nov 5 2001, Aug 8 2002. Modified by Andy Polyakov
  <appro@fy.chalmers.se> to support MMC-3 complaint DVD+RW units.

and Nigel changed it to this in his 2.6 patch:

  Modified by Nigel Kukard <nkukard@lbsd.net> - support DVD+RW
  2.4.x patch by Andy Polyakov <appro@fy.chalmers.se>

The patch I sent you deleted most of the earlier work and moved the
rest to cdrom.c, but the comments were not moved over, since the
earlier authors didn't modify cdrom.c.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] DVD+RW support
Peter Osterlund [Tue, 19 Oct 2004 00:57:09 +0000 (17:57 -0700)]
[PATCH] DVD+RW support

This patch adds support for using DVD+RW drives as writable block devices.

The patch is based on work from:

        Andy Polyakov <appro@fy.chalmers.se> - Wrote the 2.4 patch
        Nigel Kukard <nkukard@lbsd.net> - Initial porting to 2.6.x

It works for me using an Iomega Super DVD 8x USB drive.

  Nov 5 2001, Aug 8 2002. Modified by Andy Polyakov
  <appro@fy.chalmers.se> to support MMC-3 complaint DVD+RW units.

  Modified by Nigel Kukard <nkukard@lbsd.net> - support DVD+RW
  2.4.x patch by Andy Polyakov <appro@fy.chalmers.se>

This patch implements CDRW packet writing as a kernel block device.  Usage
instructions are in the packet-writing.txt file.

A hint: If you don't want to wait for a complete disc format, you can
format just a part of the disc.  For example:

        cdrwtool -d /dev/hdc -m 10240

This will format 10240 blocks, ie 20MB.

Signed-off-by: Peter Osterlund <petero2@telia.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years agoFix pci config syscall definitions.
Linus Torvalds [Mon, 18 Oct 2004 17:16:19 +0000 (10:16 -0700)]
Fix pci config syscall definitions.

Including the proper header file showed that they didn't
match the declared prototypes.

21 years agoDon't use obsolete gcc named initializer syntax.
Linus Torvalds [Mon, 18 Oct 2004 16:58:48 +0000 (09:58 -0700)]
Don't use obsolete gcc named initializer syntax.

The proper C99 syntax is much preferred.

21 years agoFix old-style fn declaration.
Linus Torvalds [Mon, 18 Oct 2004 16:57:41 +0000 (09:57 -0700)]
Fix old-style fn declaration.

21 years ago[PATCH] return full SCSI status byte in SG_IO
Jens Axboe [Mon, 18 Oct 2004 16:37:38 +0000 (09:37 -0700)]
[PATCH] return full SCSI status byte in SG_IO

This has been around for a while. Return the full scsi result byte in
rq->errors for SG_IO generated requests.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] fix & clean up zombie/dead task handling & preemption
Ingo Molnar [Mon, 18 Oct 2004 16:12:06 +0000 (09:12 -0700)]
[PATCH] fix & clean up zombie/dead task handling & preemption

This patch fixes all the preempt-after-task->state-is-TASK_DEAD problems we
had.  Right now, the moment procfs does a down() that sleeps in
proc_pid_flush() [it could] our TASK_DEAD state is zapped and we might be
back to TASK_RUNNING to and we trigger this assert:

        schedule();
        BUG();
        /* Avoid "noreturn function does return".  */
        for (;;) ;

I have split out TASK_ZOMBIE and TASK_DEAD into a separate p->exit_state
field, to allow the detaching of exit-signal/parent/wait-handling from
descheduling a dead task.  Dead-task freeing is done via PF_DEAD.

Tested the patch on x86 SMP and UP, but all architectures should work
fine.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>