1. 24 Jun, 2004 40 commits
    • Andrew Morton's avatar
      [PATCH] update ikconfig help text · b2129c4f
      Andrew Morton authored
      From: "Randy.Dunlap" <rddunlap@osdl.org>
      
      Some elements of ikconfig have been removed, but the help text wasn't
      updated to reflect those changes.
      Signed-off-by: default avatarRandy Dunlap <rddunlap@osdl.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      b2129c4f
    • Andrew Morton's avatar
      [PATCH] cirrusfb: major update · aa888075
      Andrew Morton authored
      From: David Eger <eger@havoc.gtf.org>
      
      This patch brings the cirrusfb driver up to date with 2.6.  cirrusfb has
      suffered bit rot like you wouldn't believe (last updated...  2.3.x era?).
      The driver will now compile again, and you can change to a high resolution
      text mode with stty.  Known defects: doesn't play nice with X, nor fbset.
      
      C = Cosmetic change
      L = Logical change
      A = API change
      W = register Writing change
      
      (1-CA) fb_info and cirrusfb_info:
         - mostly cosmetic, but a lot less confusing, and no more nasty casting.
      
        It used to be stylish to embed struct fb_info_gen (now struct fb_info)
        as the first member of struct clgenfb_info (now struct cirrusfb_info),
        and then you'd cast to the deisred struct.
        Now we pass the size of our data structure to framebuffer_alloc(), 
        and we make fb_info and cirrusfb_info reference each other with 
        pointers (as in radeonfb).
      
        In the old code, there two declarations were common:
      
        clgenfb_info *fb_info;
        clgenfb_info *info;
      
        since there's also a 'struct fb_info' now, I found this really confusing,
        and unified usage as:
      
        cirrusfb_info *cinfo;
        fb_info *info;
      
        This accounts for a lot of the search and replace cosmetic upgrade.
      
      (2-A) All of the FB knowledge of FB internals is gone in 2.6
      
      (3-LW) revised maxclock numbers (cirrusfb_board_info_rec.maxclock[5])
      
      	In my quest to get fbset to work, I borrowed some maxclock data
      	from the X.Org tree for various chipsets.  It didn't really seem 
      	to help.  oh well.
      
      (3-LA) upgraded PCI registration
      
      	Instead of doing PCI walking from the driver, we hand off a
      	pci_device_id table to the PCI subsystem and just get called when
      	it finds a relevant board.
      
      (4-L) striking lots of __init and __initdata specifiers
      
      	I was running into some things not working when I moved the call to
      	init_vgachip() from the driver registration to set_par().  I thought
      	perhaps this was due to some things being marked __init accidentally
      	so I axed said annotations.  Turns out it was something else.  See 5.
      
      (5-LA) delayed chip initialization, nasty double-set_par() pseudo-bug
      
        Tony says that the fb drivers shouldn't do any chipset initialization
        until they get a set_par() call.  This way, fb modules can be safely
        unloaded if no one gets around to using them, and the vga_con -> fbcon
        hand off is smoother, as fbcon can still grab the back-scroll data from
        vga_con...
      
        In any case, moving the calls to init_vgachip() and fbgen_do_set_var()
        from driver initialization to set_par() revealed that the cirrus
        register-writing function needs to be called twice for a mode change to
        work.  I don't understand why.
      
      (6-LA) split clgen_decode_var() into the bits that check the var and the
        bits that actually generate register information (par/regs) to write
      
        Adding modedb hooks here might actually fix fbset, i think...
      
      (7-LW) No longer write the palette in init_vgachip() nor in set_par().
        Someone else (fbcon?) seems to be making its own calls to setcolreg()
        for us.
      
      (8-LW) setcolreg() -- while removing all of the console cruft, I had
        to try to reconstitute the palette code. I think I got this right, 
        but I could be off -- the penguin boots in the correct colors at least ;-)
      
      (9-L) pan_display() - we don't do wrap, silly. that's only on the amiga.
      
      (10-L) pan+BLT - to make pan play nicely with copyarea()/fillrect()
         I had to add a couple of calls to cirrusfb_WaitBLT() to make sure
      	the engine is idle.
      
      (11-LW) cirrusfb_blank() - I upgraded the switch here to use the new
        VESA_* blanking mode constants.  I think I translated the right
        logic for the right blanking levels.
      Signed-off-by: default avatarDavid Eger <eger@havoc.gtf.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      aa888075
    • Andrew Morton's avatar
      [PATCH] h8300: delete obsolute header · c8e8d619
      Andrew Morton authored
      From: Yoshinori Sato <ysato@users.sourceforge.jp>
      
      - delete obsolute(unused) header file
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      c8e8d619
    • Andrew Morton's avatar
      [PATCH] zap_pte_range speedup · 1d5e0f06
      Andrew Morton authored
      From: Hugh Dickins <hugh@veritas.com>
      
      zap_pte_range is wasting time marking anon pages accessed: its original
      !PageSwapCache test should have been reinstated when page_mapping was
      changed to return swapper_space; or more simply, just check !PageAnon.
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      1d5e0f06
    • Andrew Morton's avatar
      [PATCH] drivers/media/video/tda9840.c: honour return code of i2c_add_driver() · 4a37dd4c
      Andrew Morton authored
      From: Michael Hunold <m.hunold@gmx.de>
      
      i2c_add_driver() may actually fail, but my driver returns 0 regardless. 
      Thanks to Arthur Othieno <a.othieno@bluewin.ch> for this obviously correct
      patch.
      Signed-off-by: default avatarMichael Hunold <hunold@linuxtv.org>
      Signed-off-by: default avatarArthur Othieno <a.othieno@bluewin.ch>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      4a37dd4c
    • Andrew Morton's avatar
      [PATCH] fix allocate_pgdat comments · 01ae403b
      Andrew Morton authored
      From: "Martin J. Bligh" <mbligh@aracnet.com>
      
      From: Andy Whitcroft <apw@shadowen.org>
      
      The comments for i386 allocate_pgdat indicate that the routine should be
      modified to place the pgdat into node local memory.  However, this has
      already been done as the pgdat is placed at node_remap_start_vaddr.  This
      patch updates the comments to reflect this reality.
      Signed-off-by: default avatarAndy Whitcroft <apw@shadowen.org>
      Signed-off-by: default avatarMartin J. Bligh <mbligh@aracnet.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      01ae403b
    • Andrew Morton's avatar
      [PATCH] SELinux: Extend and revise calls to secondary module · 75c4f219
      Andrew Morton authored
      From: Stephen Smalley <sds@epoch.ncsc.mil>
      
      This patch extends the set of calls to the secondary security module by
      SELinux as well as revising a few existing calls to support other security
      modules and to more cleanly stack with the capability module.  Please
      apply.
      Signed-off-by: default avatarStephen Smalley <sds@epoch.ncsc.mil>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      75c4f219
    • Andrew Morton's avatar
      [PATCH] (o)profile Documentation/basic_profiling.txt updates · d2c40dc0
      Andrew Morton authored
      From: bert hubert <ahu@ds9a.nl>
      Signed-off-by: default avatarbert hubert <ahu@ds9a.nl>
      Signed-off-by: default avatarJohn Levon <levon@movementarian.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      d2c40dc0
    • Andrew Morton's avatar
      [PATCH] Add PPC85xx MAINTAINERS entry · c98476cb
      Andrew Morton authored
      From: Kumar Gala <kumar.gala@freescale.com>
      
      Added myself to the MAINTAINERS file for 85xx.  Added an entry into the
      CREDITS file for me.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      c98476cb
    • Andrew Morton's avatar
      [PATCH] ppc64: fix POWER3 NUMA init · 0d7040ad
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
      
      We were passing in the hole size as kB not pages to free_area_init which
      made the VM misbehave.  This only hit on POWER3 because POWER4 and newer
      places IO above all memory and so doesnt have a hole.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0d7040ad
    • Andrew Morton's avatar
      [PATCH] fbdev: video mode change notify (fbset) · 81d5fd84
      Andrew Morton authored
      From: "Antonino A. Daplas" <adaplas@hotpop.com>
      
      This patch allows fbset to change the video mode and the console window
      size via the notifier call chain.  It will only notify fbcon of mode
      changes from user space.  Changes coming from upstream will be ignored.
      
      The code will only update the current console.
      Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      81d5fd84
    • Andrew Morton's avatar
      [PATCH] Core fbcon fixes · 0a88d609
      Andrew Morton authored
      From: "Antonino A. Daplas" <adaplas@hotpop.com>
      
      This patch fixes the following bugs/regressions for fbcon:
      
      1.  Initialize and update global arrays used by fbcon during
         initialization and and by set_con2fbmap code.
      
      2.  Fixed screen corruption (white rectangle) at initial mode setting
         plaguing cards with VGA cores and with VGA console enabled.  (vga16fb,
         however, still shows remnants of previous text if boot logo is enabled)
      
      3. Improved fbcon_startup/fbcon_init code.
      
      4. Fixed set_con2fbmap code -- should support multiple devices mapped to
      Signed-off-by: default avatarAntonino A. Daplas <adaplas@pol.net>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0a88d609
    • Andrew Morton's avatar
      [PATCH] SubmittingDrivers fix · 4c03b073
      Andrew Morton authored
      From: Jesper Juhl <juhl-lkml@dif.dk>
      
      Here's a small patch that lists X.Org as well as XFree86 in
      Documentation/SubmittingDrivers in the section talking about video drivers.
      Signed-off-by: default avatarJesper Juhl <juhl-lkml@dif.dk>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      4c03b073
    • Andrew Morton's avatar
      [PATCH] OProfile: allow normal user to trigger sample dumps · 77a5fdb0
      Andrew Morton authored
      From: John Levon <levon@movementarian.org>
      
      In 2.4, OProfile allowed normal users to trigger sample dumps (useful under
      low sample load).  The patch below, by Will Cohen, allows this for 2.6 too.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      77a5fdb0
    • Andrew Morton's avatar
      [PATCH] Fix early CPU vendor detection for non intel cpus · 537bc91c
      Andrew Morton authored
      From: Andi Kleen <ak@suse.de>
      
      Early CPU detect can only work after the various sub CPU drivers have
      registered their devices.
      
      Currently the vendor would be always 0, which is Intel.
      
      This prevents Athlons from being recognized as buggy PPros and fixes some
      other workarounds for non Intel CPUs too.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      537bc91c
    • Andrew Morton's avatar
      [PATCH] fix linker trouble with CONFIG_FB_RIVA_I2C=y and modular I2C · 901c036a
      Andrew Morton authored
      From: Adrian Bunk <bunk@fs.tum.de>
      
      > This version causes linker trouble with
      > CONFIG_I2C=m
      > CONFIG_I2C_ALGOBIT=m
      > CONFIG_FB_RIVA_I2C=y
      >
      >   CC      init/version.o
      >   LD      init/built-in.o
      >   LD      .tmp_vmlinux1
      > drivers/built-in.o(.text+0xda101): In function `riva_setup_i2c_bus':
      > : undefined reference to `i2c_bit_add_bus'
      > drivers/built-in.o(.text+0xda218): In function `riva_delete_i2c_busses':
      > : undefined reference to `i2c_bit_del_bus'
      > drivers/built-in.o(.text+0xda237): In function `riva_delete_i2c_busses':
      > : undefined reference to `i2c_bit_del_bus'
      > drivers/built-in.o(.text+0xda2c9): In function `riva_do_probe_i2c_edid':
      > : undefined reference to `i2c_transfer'
      > make: *** [.tmp_vmlinux1] Error 1
      >...
      
      The problem is:
      FB_RIVA=y
      FB_RIVA_I2C=y
      I2C=m
      I2C_ALGOBIT=m
      
      The patch below fixes this.
      
      Besides this, it contains:
      - help text by Antonino A. Daplas
      - converted spaces to tabs
      - it was forgotten that FB_RIVA_I2C requires I2C_ALGOBIT
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      901c036a
    • Andrew Morton's avatar
      [PATCH] Indydog update · 1f1b84f0
      Andrew Morton authored
      From: Ralf Baechle <ralf@linux-mips.org>
      
      Forward port of the 2.4 driver with changes required for 2.6.
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      1f1b84f0
    • Andrew Morton's avatar
      [PATCH] MIPS Update · fb9c90ba
      Andrew Morton authored
      From: Ralf Baechle <ralf@linux-mips.org>
      
      MIPS update:
      
       - Further conversion of MIPS kernel configuration to reverse dependencies.
       - Support for the PMC-Sierra Yosemite evaluation board.
       - Merge arch/mips/mm-32 and arch/mips/mm-32 into arch/mips/mm.
       - Partial support for the R8000 now that I finally have clearance for the
         documentation previously covered by NDA.
       - Make distclean fixes.
       - Regenerate default configuration files against latest Kconfig files.
       - Fix handling of data bus errors in modules.
       - Make R4000 bug probing more bullet proof.
       - Rewrite semaphore code folloing the PPC implementation to no longer
         manipulate 2 32-bit quantities atomically using 64-bit instructions.
         Occasionally this did cause problems due to struct semaphore not having
         sufficient alignment.
       - Make sys_pipe() code bullet proof against gcc 3.5 over-optimization.
       - Fix possibly exploitable bug in IRIX compatibility statvfs(2).
       - Make sched_clock() an outline function.
       - Support for the MIPS 24K and 25K processors.
       - Make functions static that aren't needed anywhere else.
       - Factor out some more generic MIPS SMP code.
       - Factor out common part of the GT-64240 code.
       - Ocelot C now uses the generic MV-64340 interrupt handler code.
       - Factor out common board support code
       - More cleanup and bug fixes for the NEC VR41xx code.
       - Start cleanup of hazard handling as required for MIPS32/64 V2 processors.
       - Enforce minimal kmalloc alignment of 8 byte so 64-bit registers can be
         stored into fields without exceptions.
       - Speeling and warning fixes.
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      fb9c90ba
    • Andrew Morton's avatar
      [PATCH] Dell laptop lockup fix for ALSA · d07cdd16
      Andrew Morton authored
      From: Alan Cox <alan@redhat.com>
      
      OSS avoids the Dell lockup by not hitting the problem register (which
      apparently breaks resume on a Sony laptop).  ALSA keeps a flag and uses pci
      subvendor info to clear it for problem Dell laptops.  Unfortunately there
      is at least one other Dell laptop which is affected.  This adds its sub
      id's
      
      [Patch from Dan Williams @ Red Hat slightly reformatted by me]
      Signed-off-by: default avatarAlan Cox <alan@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      d07cdd16
    • Andrew Morton's avatar
      [PATCH] mips: SGI A2 audio rewrite and 2.6 fixes · adaa6aad
      Andrew Morton authored
      From: Ralf Baechle <ralf@linux-mips.org>
      
      Fix HAL2 audio driver for the SGI A2 audio subsystem and rewrite large
      parts of it to finally work.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      adaa6aad
    • Andrew Morton's avatar
      [PATCH] make total_swap_pages a long · e62d1b67
      Andrew Morton authored
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      e62d1b67
    • Andrew Morton's avatar
      [PATCH] Make nr_swap_pages a long · a5b5323b
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
      
      ../include/linux/swap.h:extern int nr_swap_pages;       /* XXX: shouldn't this be ulong? --hch */
      
      Sounds like it should be too me.  Some of the code checks for nr_swap_pages
      < 0 so I made it a long instead.  I had to fix up the ppc64 show_mem() (Im
      guessing there will be other trivial changes required in other 64bit archs,
      I can find and fix those if you want).
      
      I also noticed that the ppc64 show_mem() used ints to store page counts.
      We can overflow that, so make them unsigned long.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      a5b5323b
    • Andrew Morton's avatar
      [PATCH] nr_pagecache can go negative · 6a948bc8
      Andrew Morton authored
      We use per-cpu counters for the system-wide pagecache accounting.  The
      counters spill into the global nr_pagecache atomic_t when they underflow or
      overflow.
      
      Hence it is possible, under weird circumstances, for nr_pagecache to go
      negative.  Anton says he has hit this.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      6a948bc8
    • Andrew Morton's avatar
      [PATCH] help text for FB_RIVA_I2C · 26b193e6
      Andrew Morton authored
      From: "Antonino A. Daplas" <adaplas@hotpop.com>
      Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      26b193e6
    • Andrew Morton's avatar
      [PATCH] Support NetMOS based PCI cards providing serial and parallel ports · 296d3c78
      Andrew Morton authored
      From: Christoph Lameter <christoph@graphe.net>
      
      Attached a patch to support a variety of PCI based serial and parallel port
      I/O ports (typically labeled 222N-2 or 9835).
      
      I think this should go into 2.6.0 since it has been out there for a long
      time and is just some additional driver support that somehow fell through
      the cracks in 2.4.X. Tim Waugh submitted it in the 2.4.X series.
      
      See also http://winterwolf.co.uk/pciioSigned-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      296d3c78
    • Andrew Morton's avatar
      [PATCH] abs() fixes · 8dac3248
      Andrew Morton authored
      OK, the pending abs() disaster has hit:
      
      drivers/usb/class/audio.c:404: warning: static declaration of 'abs' follows non-static declaration
      
      This is due to the declaration in kernel.h.  AFAIK there's not even a matching
      definition for that.
      
      The patch implements abs() as a macro in kernel.h and kills off various
      private implementations.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      8dac3248
    • Andrew Morton's avatar
      [PATCH] reduce function inlining in slab.c · f875aa02
      Andrew Morton authored
      From: Manfred Spraul <manfred@colorfullife.com>
      
      slab.c contains too many inline functions:
      
      - some functions that are not performance critical were inlined.  Waste
        of text size.
      
      - The debug code relies on __builtin_return_address(0) to keep track of
        the callers.  According to rmk, gcc didn't inline some functions as
        expected and that resulted in useless debug output.  This was probably
        caused by the large debug-only inline functions.
      
      The attached patche removes most inline functions:
      
      - the empty on release/huge on debug inline functions were replaced with
        empty macros on release/normal functions on debug.
      
      - spurious inline statements were removed.
      
      The code is down to 6 inline functions: three one-liners for struct
      abstractions, one for a might_sleep_if test and two for the performance
      critical __cache_alloc / __cache_free functions.
      
      Note: If an embedded arch wants to save a few bytes by uninlining
      __cache_{free,alloc}: The right way to do that is to fold the functions
      into kmem_cache_xy and then replace kmalloc with
      kmem_cache_alloc(kmem_find_general_cachep(),).
      
      Signed-Off: Manfred Spraul <manfred@colorfullife.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      f875aa02
    • Andrew Morton's avatar
      [PATCH] hwcache align kmalloc caches · b167eef8
      Andrew Morton authored
      From: Manfred Spraul <manfred@colorfullife.com>
      
      Reversing the patches that made all caches hw cacheline aligned had an
      unintended side effect on the kmalloc caches: Before they had the
      SLAB_HWCACHE_ALIGN flag set, now it's clear.  This breaks one sgi driver -
      it expects aligned caches.  Additionally I think it's the right thing to
      do: It costs virtually nothing (the caches are power-of-two sized) and
      could reduce false sharing.
      
      Additionally, the patch adds back the documentation for the
      SLAB_HWCACHE_ALIGN flag.
      
      Signed-Off: Manfred Spraul <manfred@colorfullife.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      b167eef8
    • Andrew Morton's avatar
      [PATCH] tweak the buddy allocator for better I/O merging · c75b81a5
      Andrew Morton authored
      From: William Lee Irwin III <wli@holomorphy.com>
      
      Based on Arjan van de Ven's idea, with guidance and testing from James
      Bottomley.
      
      The physical ordering of pages delivered to the IO subsystem is strongly
      related to the order in which fragments are subdivided from larger blocks
      of memory tracked by the page allocator.
      
      Consider a single MAX_ORDER block of memory in isolation acted on by a
      sequence of order 0 allocations in an otherwise empty buddy system.
      Subdividing the block beginning at the highest addresses will yield all the
      pages of the block in reverse, and subdividing the block begining at the
      lowest addresses will yield all the pages of the block in physical address
      order.
      
      Empirical tests demonstrate this ordering is preserved, and that changing
      the order of subdivision so that the lowest page is split off first
      resolves the sglist merging difficulties encountered by driver authors at
      Adaptec and others in James Bottomley's testing.
      
      James found that before this patch, there were 40 merges out of about 32K
      segments.  Afterward, there were 24007 merges out of 19513 segments, for a
      merge rate of about 55%.  Merges of 128 segments, the maximum allowed, were
      observed afterward, where beforehand they never occurred.  It also improves
      dbench on my workstation and works fine there.
      Signed-off-by: default avatarWilliam Lee Irwin III <wli@holomorphy.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      c75b81a5
    • Andrew Morton's avatar
      [PATCH] Use fancy wakeups in wait.h · 758e48e4
      Andrew Morton authored
      Use the more SMP-friendly prepare_to_wait()/finish_wait() in wait_event() and
      friends.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      758e48e4
    • Andrew Morton's avatar
      [PATCH] dnotify.c: use inode->i_lock in place of dn_lock · 0ac04ac1
      Andrew Morton authored
      From: "Adam J. Richter" <adam@yggdrasil.com>
      
      Replace the use of a global spinlock with the per-inode ->i_lock.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0ac04ac1
    • Andrew Morton's avatar
      [PATCH] vm: vfs shrinkage tuning · a4411519
      Andrew Morton authored
      Some people want the dentry and inode caches shrink harder, others want them
      shrunk more reluctantly.
      
      The patch adds /proc/sys/vm/vfs_cache_pressure, which tunes the vfs cache
      versus pagecache scanning pressure.
      
      - at vfs_cache_pressure=0 we don't shrink dcache and icache at all.
      
      - at vfs_cache_pressure=100 there is no change in behaviour.
      
      - at vfs_cache_pressure > 100 we reclaim dentries and inodes harder.
      
      
      The number of megabytes of slab left after a slocate.cron on my 256MB test
      box:
      
      vfs_cache_pressure=100000   33480
      vfs_cache_pressure=10000    61996
      vfs_cache_pressure=1000     104056
      vfs_cache_pressure=200      166340
      vfs_cache_pressure=100      190200
      vfs_cache_pressure=50       206168
      
      Of course, this just left more directory and inode pagecache behind instead of
      vfs cache.  Interestingly, on this machine the entire slocate run fits into
      pagecache, but not into VFS caches.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      a4411519
    • Andrew Morton's avatar
      [PATCH] vmscan.c: dont reclaim too many pages · 42b8d994
      Andrew Morton authored
      The shrink_zone() logic can, under some circumstances, cause far too many
      pages to be reclaimed.  Say, we're scanning at high priority and suddenly hit
      a large number of reclaimable pages on the LRU.
      
      Change things so we bale out when SWAP_CLUSTER_MAX pages have been reclaimed.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      42b8d994
    • Andrew Morton's avatar
      [PATCH] vmscan.c scan rate fixes · 2332dc78
      Andrew Morton authored
      We've been futzing with the scan rates of the inactive and active lists far
      too much, and it's still not right (Anton reports interrupt-off times of over
      a second).
      
      - We have this logic in there from 2.4.early (at least) which tries to keep
        the inactive list 1/3rd the size of the active list.  Or something.
      
        I really cannot see any logic behind this, so toss it out and change the
        arithmetic in there so that all pages on both lists have equal scan rates.
      
      - Chunk the work up so we never hold interrupts off for more that 32 pages
        worth of scanning.
      
      - Make the per-zone scan-count accumulators unsigned long rather than
        atomic_t.
      
        Mainly because atomic_t's could conceivably overflow, but also because
        access to these counters is racy-by-design anyway.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      2332dc78
    • Andrew Morton's avatar
      [PATCH] vmscan.c: shuffle things around · acba6041
      Andrew Morton authored
      Move all the data structure declarations, macros and variable definitions to
      less surprising places.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      acba6041
    • Andrew Morton's avatar
      [PATCH] Fix and Reenable MSI Support on x86_64 · 0342e162
      Andrew Morton authored
      From: long <tlnguyen@snoqualmie.dp.intel.com>
      
      MSI support for x86_64 is currently disabled in the kernel 2.6.x.  Below is
      the patch, which provides a fix and reenable it.
      
      In addition, the patch provides a info message during kernel boot if
      configuring vector-base indexing.
      
      Cc: Andi Kleen <ak@muc.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0342e162
    • Andrew Morton's avatar
      [PATCH] make irqaction use a cpu mask · 8c05319f
      Andrew Morton authored
      From: William Lee Irwin III <wli@holomorphy.com>
      
      The following patch makes irqaction's ->mask a cpumask as it was intended
      to be and wraps up the rest of the sweep.  Only struct irqaction is
      usefully greppable, so there may be some assignments to ->mask missing
      still.  This removes more code than it adds.
      
      From: William Lee Irwin III <wli@holomorphy.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      8c05319f
    • Andrew Morton's avatar
      [PATCH] alpha: cpumask fixups · 4320cbbd
      Andrew Morton authored
      From: William Lee Irwin III <wli@holomorphy.com>
      
      The cpumask patches broke alpha's build, even without the irqaction
      patch, largely centering around cpu_possible_map.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      4320cbbd
    • Andrew Morton's avatar
      [PATCH] clean up cpumask_t temporaries · a3dcb7f4
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Paul Jackson's cpumask tour-de-force allows us to get rid of those stupid
      temporaries which we used to hold CPU_MASK_ALL to hand them to functions.
      This used to break NR_CPUS > BITS_PER_LONG.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      a3dcb7f4
    • Andrew Morton's avatar
      [PATCH] cpumask: comment, spacing tweaks · 02d7effd
      Andrew Morton authored
      From: Paul Jackson <pj@sgi.com>
      
      Tweak cpumask.h comments, spacing:
      
      - Add comments for cpu_present_map macros: num_present_cpus() and
        cpu_present()
      
      - Remove comments for obsolete macros: cpu_set_online(),
        cpu_set_offline()
      
      - Reorder a few comment lines, to match the code and confuse readers of
        this patch
      
      - Tabify one chunk of code
      Signed-off-by: default avatarPaul Jackson <pj@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      02d7effd