1. 26 3月, 2006 17 次提交
  2. 25 3月, 2006 1 次提交
  3. 24 3月, 2006 22 次提交
    • D
      [PATCH] strndup_user() · 96840aa0
      Davi Arnaut 提交于
      This patch series creates a strndup_user() function to easy copying C strings
      from userspace.  Also we avoid common pitfalls like userspace modifying the
      final \0 after the strlen_user().
      Signed-off-by: NDavi Arnaut <davi.arnaut@gmail.com>
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      96840aa0
    • I
      [PATCH] timer-irq-driven soft-watchdog, cleanups · 6687a97d
      Ingo Molnar 提交于
      Make the softlockup detector purely timer-interrupt driven, removing
      softirq-context (timer) dependencies.  This means that if the softlockup
      watchdog triggers, it has truly observed a longer than 10 seconds
      scheduling delay of a SCHED_FIFO prio 99 task.
      
      (the patch also turns off the softlockup detector during the initial bootup
      phase and does small style fixes)
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6687a97d
    • K
      [PATCH] ide: Allow IDE interface to specify its not capable of 32-bit operations · 208a08f7
      Kumar Gala 提交于
      In some embedded systems the IDE hardware interface may only support 16-bit
      or smaller accesses.  Allow the interface to specify if this is the case
      and don't allow the drive or user to override the setting.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Acked-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      208a08f7
    • P
      [PATCH] Secure Digital Host Controller id and regs · 97f2478d
      Pierre Ossman 提交于
      Class code and register definitions for the Secure Digital Host Controller
      standard.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      97f2478d
    • A
      [PATCH] fsync: extract internal code · 18e79b40
      Andrew Morton 提交于
      Pull the guts out of do_fsync() - we can use it elsewhere.
      
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      18e79b40
    • A
      [PATCH] set_page_dirty() return value fixes · 4741c9fd
      Andrew Morton 提交于
      We need set_page_dirty() to return true if it actually transitioned the page
      from a clean to dirty state.  This wasn't right in a couple of places.  Do a
      kernel-wide audit, fix things up.
      
      This leaves open the possibility of returning a negative errno from
      set_page_dirty() sometime in the future.  But we don't do that at present.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4741c9fd
    • A
      [PATCH] balance_dirty_pages_ratelimited: take nr_pages arg · fa5a734e
      Andrew Morton 提交于
      Modify balance_dirty_pages_ratelimited() so that it can take a
      number-of-pages-which-I-just-dirtied argument.  For msync().
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      fa5a734e
    • A
      [PATCH] sound: remove PC98-specific OPL3_HW_OPL3_PC98 · 2ecb9e63
      Arthur Othieno 提交于
      OPL3_HW_OPL3_PC98 #define isn't used anywhere; previously in
      sound/drivers/opl3/opl3_lib.c and sound/isa/cs423x/pc98.c, the latter of which
      went away with the rest of PC98 subarch.
      Signed-off-by: NArthur Othieno <apgo@patchbomb.org>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2ecb9e63
    • A
      [PATCH] fadvise(): write commands · ebcf28e1
      Andrew Morton 提交于
      Add two new linux-specific fadvise extensions():
      
      LINUX_FADV_ASYNC_WRITE: start async writeout of any dirty pages between file
      offsets `offset' and `offset+len'.  Any pages which are currently under
      writeout are skipped, whether or not they are dirty.
      
      LINUX_FADV_WRITE_WAIT: wait upon writeout of any dirty pages between file
      offsets `offset' and `offset+len'.
      
      By combining these two operations the application may do several things:
      
      LINUX_FADV_ASYNC_WRITE: push some or all of the dirty pages at the disk.
      
      LINUX_FADV_WRITE_WAIT, LINUX_FADV_ASYNC_WRITE: push all of the currently dirty
      pages at the disk.
      
      LINUX_FADV_WRITE_WAIT, LINUX_FADV_ASYNC_WRITE, LINUX_FADV_WRITE_WAIT: push all
      of the currently dirty pages at the disk, wait until they have been written.
      
      It should be noted that none of these operations write out the file's
      metadata.  So unless the application is strictly performing overwrites of
      already-instantiated disk blocks, there are no guarantees here that the data
      will be available after a crash.
      
      To complete this suite of operations I guess we should have a "sync file
      metadata only" operation.  This gives applications access to all the building
      blocks needed for all sorts of sync operations.  But sync-metadata doesn't fit
      well with the fadvise() interface.  Probably it should be a new syscall:
      sys_fmetadatasync().
      
      The patch also diddles with the meaning of `endbyte' in sys_fadvise64_64().
      It is made to represent that last affected byte in the file (ie: it is
      inclusive).  Generally, all these byterange and pagerange functions are
      inclusive so we can easily represent EOF with -1.
      
      As Ulrich notes, these two functions are somewhat abusive of the fadvise()
      concept, which appears to be "set the future policy for this fd".
      
      But these commands are a perfect fit with the fadvise() impementation, and
      several of the existing fadvise() commands are synchronous and don't affect
      future policy either.   I think we can live with the slight incongruity.
      
      Cc: Michael Kerrisk <mtk-manpages@gmx.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ebcf28e1
    • J
      [PATCH] abstract type/size specification for assembly · ab7efcc9
      Jan Beulich 提交于
      Provide abstraction for generating type and size information of assembly
      routines and data, while permitting architectures to override these
      defaults.
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Cc: "Russell King" <rmk@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "Andi Kleen" <ak@suse.de>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ab7efcc9
    • A
      [PATCH] s/;;/;/g · 53b3531b
      Alexey Dobriyan 提交于
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      53b3531b
    • P
      [PATCH] cpuset memory spread slab cache optimizations · c61afb18
      Paul Jackson 提交于
      The hooks in the slab cache allocator code path for support of NUMA
      mempolicies and cpuset memory spreading are in an important code path.  Many
      systems will use neither feature.
      
      This patch optimizes those hooks down to a single check of some bits in the
      current tasks task_struct flags.  For non NUMA systems, this hook and related
      code is already ifdef'd out.
      
      The optimization is done by using another task flag, set if the task is using
      a non-default NUMA mempolicy.  Taking this flag bit along with the
      PF_SPREAD_PAGE and PF_SPREAD_SLAB flag bits added earlier in this 'cpuset
      memory spreading' patch set, one can check for the combination of any of these
      special case memory placement mechanisms with a single test of the current
      tasks task_struct flags.
      
      This patch also tightens up the code, to save a few bytes of kernel text
      space, and moves some of it out of line.  Due to the nested inlines called
      from multiple places, we were ending up with three copies of this code, which
      once we get off the main code path (for local node allocation) seems a bit
      wasteful of instruction memory.
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c61afb18
    • P
      [PATCH] cpuset memory spread slab cache implementation · 101a5001
      Paul Jackson 提交于
      Provide the slab cache infrastructure to support cpuset memory spreading.
      
      See the previous patches, cpuset_mem_spread, for an explanation of cpuset
      memory spreading.
      
      This patch provides a slab cache SLAB_MEM_SPREAD flag.  If set in the
      kmem_cache_create() call defining a slab cache, then any task marked with the
      process state flag PF_MEMSPREAD will spread memory page allocations for that
      cache over all the allowed nodes, instead of preferring the local (faulting)
      node.
      
      On systems not configured with CONFIG_NUMA, this results in no change to the
      page allocation code path for slab caches.
      
      On systems with cpusets configured in the kernel, but the "memory_spread"
      cpuset option not enabled for the current tasks cpuset, this adds a call to a
      cpuset routine and failed bit test of the processor state flag PF_SPREAD_SLAB.
      
      For tasks so marked, a second inline test is done for the slab cache flag
      SLAB_MEM_SPREAD, and if that is set and if the allocation is not
      in_interrupt(), this adds a call to to a cpuset routine that computes which of
      the tasks mems_allowed nodes should be preferred for this allocation.
      
      ==> This patch adds another hook into the performance critical
          code path to allocating objects from the slab cache, in the
          ____cache_alloc() chunk, below.  The next patch optimizes this
          hook, reducing the impact of the combined mempolicy plus memory
          spreading hooks on this critical code path to a single check
          against the tasks task_struct flags word.
      
      This patch provides the generic slab flags and logic needed to apply memory
      spreading to a particular slab.
      
      A subsequent patch will mark a few specific slab caches for this placement
      policy.
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      101a5001
    • P
      [PATCH] cpuset memory spread page cache implementation and hooks · 44110fe3
      Paul Jackson 提交于
      Change the page cache allocation calls to support cpuset memory spreading.
      
      See the previous patch, cpuset_mem_spread, for an explanation of cpuset memory
      spreading.
      
      On systems without cpusets configured in the kernel, this is no change.
      
      On systems with cpusets configured in the kernel, but the "memory_spread"
      cpuset option not enabled for the current tasks cpuset, this adds a call to a
      cpuset routine and failed bit test of the processor state flag PF_SPREAD_PAGE.
      
      On tasks in cpusets with "memory_spread" enabled, this adds a call to a cpuset
      routine that computes which of the tasks mems_allowed nodes should be
      preferred for this allocation.
      
      If memory spreading applies to a particular allocation, then any other NUMA
      mempolicy does not apply.
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      44110fe3
    • P
      [PATCH] cpuset memory spread basic implementation · 825a46af
      Paul Jackson 提交于
      This patch provides the implementation and cpuset interface for an alternative
      memory allocation policy that can be applied to certain kinds of memory
      allocations, such as the page cache (file system buffers) and some slab caches
      (such as inode caches).
      
      The policy is called "memory spreading." If enabled, it spreads out these
      kinds of memory allocations over all the nodes allowed to a task, instead of
      preferring to place them on the node where the task is executing.
      
      All other kinds of allocations, including anonymous pages for a tasks stack
      and data regions, are not affected by this policy choice, and continue to be
      allocated preferring the node local to execution, as modified by the NUMA
      mempolicy.
      
      There are two boolean flag files per cpuset that control where the kernel
      allocates pages for the file system buffers and related in kernel data
      structures.  They are called 'memory_spread_page' and 'memory_spread_slab'.
      
      If the per-cpuset boolean flag file 'memory_spread_page' is set, then the
      kernel will spread the file system buffers (page cache) evenly over all the
      nodes that the faulting task is allowed to use, instead of preferring to put
      those pages on the node where the task is running.
      
      If the per-cpuset boolean flag file 'memory_spread_slab' is set, then the
      kernel will spread some file system related slab caches, such as for inodes
      and dentries evenly over all the nodes that the faulting task is allowed to
      use, instead of preferring to put those pages on the node where the task is
      running.
      
      The implementation is simple.  Setting the cpuset flags 'memory_spread_page'
      or 'memory_spread_cache' turns on the per-process flags PF_SPREAD_PAGE or
      PF_SPREAD_SLAB, respectively, for each task that is in the cpuset or
      subsequently joins that cpuset.  In subsequent patches, the page allocation
      calls for the affected page cache and slab caches are modified to perform an
      inline check for these flags, and if set, a call to a new routine
      cpuset_mem_spread_node() returns the node to prefer for the allocation.
      
      The cpuset_mem_spread_node() routine is also simple.  It uses the value of a
      per-task rotor cpuset_mem_spread_rotor to select the next node in the current
      tasks mems_allowed to prefer for the allocation.
      
      This policy can provide substantial improvements for jobs that need to place
      thread local data on the corresponding node, but that need to access large
      file system data sets that need to be spread across the several nodes in the
      jobs cpuset in order to fit.  Without this patch, especially for jobs that
      might have one thread reading in the data set, the memory allocation across
      the nodes in the jobs cpuset can become very uneven.
      
      A couple of Copyright year ranges are updated as well.  And a couple of email
      addresses that can be found in the MAINTAINERS file are removed.
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      825a46af
    • A
      [PATCH] kill include/linux/platform.h, default_idle() cleanup · cdb04527
      Adrian Bunk 提交于
      include/linux/platform.h contained nothing that was actually used except
      the default_idle() prototype, and is therefore removed by this patch.
      
      This patch does the following with the platform specific default_idle()
      functions on different architectures:
      - remove the unused function:
        - parisc
        - sparc64
      - make the needlessly global function static:
        - arm
        - h8300
        - m68k
        - m68knommu
        - s390
        - v850
        - x86_64
      - add a prototype in asm/system.h:
        - cris
        - i386
        - ia64
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Acked-by: NPatrick Mochel <mochel@digitalimplant.org>
      Acked-by: NKyle McMartin <kyle@parisc-linux.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      cdb04527
    • B
      [PATCH] Represent dirty_*_centisecs as jiffies internally · f6ef9438
      Bart Samwel 提交于
      Make that the internal values for:
      
      /proc/sys/vm/dirty_writeback_centisecs
      /proc/sys/vm/dirty_expire_centisecs
      
      are stored as jiffies instead of centiseconds.  Let the sysctl interface do
      the conversions with full precision using clock_t_to_jiffies, instead of
      doing overflow-sensitive on-the-fly conversions every time the values are
      used.
      
      Cons: apparent precision loss if HZ is not a multiple of 100, because of
      conversion back and forth.  This is a common problem for all sysctl values
      that use proc_dointvec_userhz_jiffies.  (There is only one other in-tree
      use, in net/core/neighbour.c.)
      Signed-off-by: NBart Samwel <bart@samwel.tk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f6ef9438
    • P
      [PATCH] bitmap: region cleanup · 87e24802
      Paul Jackson 提交于
      Paul Mundt <lethal@linux-sh.org> says:
      
      This patch set implements a number of patches to clean up and restructure the
      bitmap region code, in addition to extending the interface to support
      multiword spanning allocations.
      
      The current implementation (before this patch set) is limited by only being
      able to allocate pages <= BITS_PER_LONG, as noted by the strategically
      positioned BUG_ON() at lib/bitmap.c:752:
      
              /* We don't do regions of pages > BITS_PER_LONG.  The
      	 * algorithm would be a simple look for multiple zeros in the
      	 * array, but there's no driver today that needs this.  If you
      	 * trip this BUG(), you get to code it... */
              BUG_ON(pages > BITS_PER_LONG);
      
      As I seem to have been the first person to trigger this, the result ends up
      being the following patch set with the help of Paul Jackson.
      
      The final patch in the series eliminates quite a bit of code duplication, so
      the bitmap code size ends up being smaller than the current implementation as
      an added bonus.
      
      After these are applied, it should already be possible to do multiword
      allocations with dma_alloc_coherent() out of ranges established by
      dma_declare_coherent_memory() on x86 without having to change any of the code,
      and the SH store queue API will follow up on this as the other user that needs
      support for this.
      
      This patch:
      
      Some code cleanup on the lib/bitmap.c bitmap_*_region() routines:
      
       * spacing
       * variable names
       * comments
      
      Has no change to code function.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      87e24802
    • A
      [PATCH] remove ISA legacy functions: remove the helpers · 57f3ebcc
      Al Viro 提交于
      unused isa_...() helpers removed.
      
      Adrian Bunk:
      The asm-sh part was rediffed due to unrelated changes.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      57f3ebcc
    • M
      [PATCH] s390: BUG() warnings · 4896cef8
      Martin Schwidefsky 提交于
      Use __builtin_trap instead of an inline assembly in the BUG() macro.  That way
      the compiler knows that BUG() won't return.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4896cef8
    • A
      [PATCH] x86_64: {set,clear,test}_bit() related cleanup and pci_mmcfg_init() fix · 3d1712c9
      Akinobu Mita 提交于
      While working on these patch set, I found several possible cleanup on x86-64
      and ia64.
      
      akpm: I stole this from Andi's queue.
      
      Not only does it clean up bitops.  It also unrelatedly changes the prototype
      of pci_mmcfg_init() and removes its arch_initcall().  It seems that the wrong
      two patches got joined together, but this is the one which has been tested.
      
      This patch fixes the current x86_64 build error (the pci_mmcfg_init()
      declaration in arch/i386/pci/pci.h disagrees with the definition in
      arch/x86_64/pci/mmconfig.c)
      
      This also means that x86_64's pci_mmcfg_init() gets called in the same (new)
      manner as x86's: from arch/i386/pci/init.c:pci_access_init(), rather than via
      initcall.
      
      The bitops cleanups came along for free.
      
      All this worked OK in -mm testing (since 2.6.16-rc4-mm1) because x86_64 was
      tested with both patches applied.
      Signed-off-by: NAkinobu Mita <mita@miraclelinux.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Con Kolivas <kernel@kolivas.org>
      Cc: Jean Delvare <khali@linux-fr.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3d1712c9
    • T
      [PATCH] vfs: MS_VERBOSE should be MS_SILENT · 9b04c997
      Theodore Ts'o 提交于
      The meaning of MS_VERBOSE is backwards; if the bit is set, it really means,
      "don't be verbose".  This is confusing and counter-intuitive.
      
      In addition, there is also no way to set the MS_VERBOSE flag in the
      mount(8) program in util-linux, but interesting, it does define options
      which would do the right thing if MS_SILENT were defined, which
      unfortunately we do not:
      
      #ifdef MS_SILENT
        { "quiet",    0, 0, MS_SILENT    },   /* be quiet  */
        { "loud",     0, 1, MS_SILENT    },   /* print out messages. */
      #endif
      
      So the obvious fix is to deprecate the use of MS_VERBOSE and replace it
      with MS_SILENT.
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9b04c997