]> git.hungrycats.org Git - linux/log
linux
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>
21 years ago[PATCH] sched: fix SCHED_SMT & numa=fake=2 lockup
Ingo Molnar [Mon, 18 Oct 2004 16:11:52 +0000 (09:11 -0700)]
[PATCH] sched: fix SCHED_SMT & numa=fake=2 lockup

This patch fixes an interaction between the numa=fake=<domains> feature,
the domain setup code and cpu_siblings_map[].  The bug leads to a bootup
crash when using numa=fake=2 on a 2-way/4-way SMP+HT box.

When SCHED_SMT is turned on the domains-setup code relies on siblings not
spanning multiple domains (which makes perfect sense).  But numa=fake=2
creates an assymetric 1101/0010 splitup between CPUs, which results in two
siblings being on different nodes.

The patch adds a check_siblings_map() function that checks the sibling maps
and fixes them up if they violate this rule.  (it also prints a warning in
that case.)

The patch also turns SCHED_DOMAIN_DEBUG back on - had this been enabled
we'd have noticed this bug much earlier.

From: Badari Pulavarty <pbadari@us.ibm.com>

  arch/x86_64/mm/numa.c: In function `numa_setup':
  arch/x86_64/mm/numa.c:332: error: `numa_fake' undeclared (first use in this function)
  arch/x86_64/mm/numa.c:332: error: (Each undeclared identifier is reported only once
  arch/x86_64/mm/numa.c:332: error: for each function it appears in.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] sched: remove NODE_BALANCE_RATE definitions
Matthew Dobson [Mon, 18 Oct 2004 16:11:39 +0000 (09:11 -0700)]
[PATCH] sched: remove NODE_BALANCE_RATE definitions

NODE_BALANCE_RATE is defined all over the place, but used nowhere.  Let's
remove it.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] sched_domains: Make SD_NODE_INIT per-arch #2
Matthew Dobson [Mon, 18 Oct 2004 16:11:27 +0000 (09:11 -0700)]
[PATCH] sched_domains: Make SD_NODE_INIT per-arch #2

Here's yet another version of a patch to implement per-arch SD_*_INITs.
This follows the same basic idea of my last patch, but

1) defines an arch-specific SD_NODE_INIT for the 4 NUMA arches (i386,
   x86_64, IA64 & PPC64),

2) defines *default* SD_CPU_INIT & SD_SIBLING_INIT for *all* arches,
   with the possibility of them being overridden by simply defining an
   arch-specific version in include/asm/topology.h.

The motivation behind the third version of this patch is that Martin feels
that there should be no "default" NUMA initializer because NUMA
characteristics are *very* arch/platform specific, and hence a "default"
NUMA initializer can only lead to confusion.  I agree with most of that,
but don't quite see as much harm in having a default as he does.
Nevertheless, to keep him quiet, I've run up this version of the patch.
Martin, please run this through your magic test suite and make sure I
didn't break anything trivial.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] CPU Scheduler: fix potential error in runqueue nr_uninterruptible count
Peter Williams [Mon, 18 Oct 2004 16:11:14 +0000 (09:11 -0700)]
[PATCH] CPU Scheduler: fix potential error in runqueue nr_uninterruptible count

Problem:

In the function try_to_wake_up(), when the runqueue's nr_uninterruptible
field is decremented it's possible (on SMP systems) that the pointer no
longer points to the runqueue that the task being woken was on when it went
to sleep.  This would cause the wrong runqueue's field to be decremented
and the correct one tp remain unchanged.

Fix:

Save a pointer to the old runqueue at the beginning of the function and use
it when decrementing nr_uninterruptible.

Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] sched: print preempt count
Andrew Morton [Mon, 18 Oct 2004 16:11:02 +0000 (09:11 -0700)]
[PATCH] sched: print preempt count

Better debugging output when the CPU scheduler detects atomicity errors.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] sched: fixes for ia64 domain setup
Nick Piggin [Mon, 18 Oct 2004 16:10:50 +0000 (09:10 -0700)]
[PATCH] sched: fixes for ia64 domain setup

Still having some trouble with ia64 domain setup on the Altixes.  Jesse
hasn't had much time to look into it, and I'm lacking an Altix, so I'm not
sure if this is right or not...

Anyway, it again does the right thing on the NUMAQ, and fixes some real
bugs, so can you include it please?

* Increase SD_NODES_PER_DOMAIN to 6 from 4 to better match Altix's
   topology. A setting of 4 will include this node, the other one
   in the brick, and the 2 nodes in the next closest brick, while 6
   will catch 2 other bricks. Probably it could be increased even
   more.

* Work correctly with sparse and not completely full node maps.

* Nasty typo fixed in find_next_best_node:
-               val = node_distance(node, i);
+               val = node_distance(node, n);

* Ensure all nodes are themselves a member of their numa balancing
   domain. This is more a precaution against creative implementations
   of node_distance.. but it makes the setup easier to verify without
   having to look at a table of node_distance's, which is possibly
   generated at runtime.

So again, I'm not too sure if this will fix the Altix setup or not.  But if
you do a release, it will surely be less broken than it was before.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] sched: use CPU_DOWN_FAILED notifier
Nick Piggin [Mon, 18 Oct 2004 16:10:37 +0000 (09:10 -0700)]
[PATCH] sched: use CPU_DOWN_FAILED notifier

Use CPU_DOWN_FAILED notifier in the sched-domains hotplug code.  This goes
with 4/8 "integrate cpu hotplug and sched domains"

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] sched: hotplug add a CPU_DOWN_FAILED notifier
Nick Piggin [Mon, 18 Oct 2004 16:10:25 +0000 (09:10 -0700)]
[PATCH] sched: hotplug add a CPU_DOWN_FAILED notifier

Introduce CPU_DOWN_FAILED notifier, so we can cope with a failure after a
CPU_DOWN_PREPARE notice.

This fixes 3/8 "add CPU_DOWN_PREPARE notifier" to be 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] sched: enable SD_LOAD_BALANCE
Nick Piggin [Mon, 18 Oct 2004 16:10:13 +0000 (09:10 -0700)]
[PATCH] sched: enable SD_LOAD_BALANCE

Actually turn on SD_LOAD_BALANCE for the regular domains.  Introduced by
5/8 "sched add load balance flag".

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] sched: fix domain debug for isolcpus
Nick Piggin [Mon, 18 Oct 2004 16:10:00 +0000 (09:10 -0700)]
[PATCH] sched: fix domain debug for isolcpus

Fix an oops in the domain debug code when isolated CPUs are specified.
Introduced by 5/8 "sched add load balance flag"

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] sched: IA64 add disjoint NUMA domain support
Nick Piggin [Mon, 18 Oct 2004 16:09:48 +0000 (09:09 -0700)]
[PATCH] sched: IA64 add disjoint NUMA domain support

Implement disjoint NUMA domain setup for IA64 architecture.  Most of the code
was what was ripped out of kernel/sched.c, which was written by Jesse Barnes
<jbarnes@sgi.com>.  I fixed up the tricky NUMA groups initialistion.

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] sched: make domain setup overridable
Nick Piggin [Mon, 18 Oct 2004 16:09:35 +0000 (09:09 -0700)]
[PATCH] sched: make domain setup overridable

Allow sched domain setup to be overridden by arch code. This functionality
is needed again.

From: Paul Jackson <pj@sgi.com>

  Builds of 2.6.9-rc1-mm5 ia64 NUMA configs fail, with many complaints that
  SD_NODE_INIT is defined twice, in asm/processor.h and linux/sched.h.

  I guess that the preprocessor conditionals were wrong when Nick added the
  per-arch override ability again of SD_NODE_INIT were wrong.  At least this
  change lets me rebuild ia64 again.

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] sched: remove disjoint NUMA domains setup
Nick Piggin [Mon, 18 Oct 2004 16:09:23 +0000 (09:09 -0700)]
[PATCH] sched: remove disjoint NUMA domains setup

Remove the disjoint NUMA domains setup code. It was broken.

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] sched: sched add load balance flag
Nick Piggin [Mon, 18 Oct 2004 16:09:10 +0000 (09:09 -0700)]
[PATCH] sched: sched add load balance flag

Introduce SD_LOAD_BALANCE flag for domains where we don't want to do load
balancing (so we don't have to set up meaningless spans and groups).  Use this
for the initial dummy domain, and just leave isolated CPUs on the dummy
domain.

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] sched: arch_destroy_sched_domains warning fix
Andrew Morton [Mon, 18 Oct 2004 16:08:58 +0000 (09:08 -0700)]
[PATCH] sched: arch_destroy_sched_domains warning fix

kernel/sched.c:4114: warning: `arch_destroy_sched_domains' defined but not used

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] sched: integrate cpu hotplug and sched domains
Nick Piggin [Mon, 18 Oct 2004 16:08:46 +0000 (09:08 -0700)]
[PATCH] sched: integrate cpu hotplug and sched domains

Register a cpu hotplug notifier which reinitializes the scheduler domains
hierarchy.  The notifier temporarily attaches all running cpus to a "dummy"
domain (like we currently do during boot) to avoid balancing.  It then calls
arch_init_sched_domains which rebuilds the "real" domains and reattaches the
cpus to them.

Also change __init attributes to __devinit where necessary.

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
Alterations from Nick Piggin:

* Detach all domains in CPU_UP|DOWN_PREPARE notifiers. Reinitialise and
  reattach in CPU_ONLINE|DEAD|UP_CANCELED. This ensures the domains as
  seen from the scheduler won't become out of synch with the cpu_online_map.

* This allows us to remove runtime cpu_online verifications. Do that.

* Dummy domains are __devinitdata.

* Remove the hackery in arch_init_sched_domains to work around the fact that
  the domains used to work with cpu_possible maps, but node_to_cpumask returned
  a cpu_online map.

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] sched: add CPU_DOWN_PREPARE notifier
Nick Piggin [Mon, 18 Oct 2004 16:08:34 +0000 (09:08 -0700)]
[PATCH] sched: add CPU_DOWN_PREPARE notifier

Add a CPU_DOWN_PREPARE hotplug CPU notifier.  This is needed so we can dettach
all sched-domains before a CPU goes down, thus we can build domains from
online cpumasks, and not have to check for the possibility of a CPU coming up
or going down.

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] sched: trivial sched changes
Nick Piggin [Mon, 18 Oct 2004 16:08:22 +0000 (09:08 -0700)]
[PATCH] sched: trivial sched changes

The following patches properly intergrate sched domains and cpu hotplug (using
Nathan's code), by having sched-domains *always* only represent online CPUs,
and having hotplug notifier to keep them up to date.

Then tackle Jesse's domain setup problem: the disjoint top-level domains were
completely broken.  The group-list builder thingy simply can't handle distinct
sets of groups containing the same CPUs.  The code is ugly and specific enough
that I'm re-introducing the arch overridable domains.

I doubt we'll get a proliferation of implementations, because the current
generic code can do the job for everyone but SGI.  I'd rather take a look at
it again down the track if we need to rather than try to shoehorn this into
the generic code.

Nathan and I have tested the hotplug work. He's happy with it.

I've tested the disjoint domain stuff (copied it to i386 for the test), and it
does the right thing on the NUMAQ.  I've asked Jesse to test it as well, but
it should be fine - maybe just help me out and run a test compile on ia64 ;)

This really gets sched domains into much better shape.  Without further ado,
the patches.

This patch:

Make a definition static and slightly sanitize ifdefs.

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] xtime value may become incorrect
Vladimir Grouzdev [Mon, 18 Oct 2004 16:08:10 +0000 (09:08 -0700)]
[PATCH] xtime value may become incorrect

The xtime value may become incorrect when the update_wall_time(ticks)
function is called with "ticks" > 1.  In such a case, the xtime variable is
updated multiple times inside the loop but it is normalized only once
outside of the loop.

This bug was reported at:

http://bugme.osdl.org/show_bug.cgi?id=3403

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] ReiserFS: Fix several missing reiserfs_write_unlock calls
Jeff Mahoney [Mon, 18 Oct 2004 16:07:58 +0000 (09:07 -0700)]
[PATCH] ReiserFS: Fix several missing reiserfs_write_unlock calls

This patch fixes several missing reiserfs_write_unlock() calls on error
paths not introduced by reiserfs-io-error-handling.diff

Signed-off-by: Jeff Mahoney <jeffm@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
21 years ago[PATCH] ReiserFS: Add I/O error handling to journal operations
Jeff Mahoney [Mon, 18 Oct 2004 16:07:45 +0000 (09:07 -0700)]
[PATCH] ReiserFS: Add I/O error handling to journal operations

This patch allows ReiserFS to handle I/O errors in the journal (or journal
flush) where it would have previously panicked.  The new behavior is to
mark the filesystem read-only, disallow new transactions to be started, and
to allow existing transactions to complete (though not to commit).  The
resultant filesystem can be safely umounted, and checked via normal
mechanisms.  As it is a journaling filesystem, the filesystem itself will
be in a similar state to the power being cut to the machine, once umounted.

Signed-off-by: Jeff Mahoney <jeffm@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>