1. 14 12月, 2006 15 次提交
    • A
      [PATCH] hci endianness annotations · 905f3ed6
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      905f3ed6
    • R
      [PATCH] Fix numerous kcalloc() calls, convert to kzalloc() · cd861280
      Robert P. J. Day 提交于
      All kcalloc() calls of the form "kcalloc(1,...)" are converted to the
      equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect
      ordering of the first two arguments are fixed.
      Signed-off-by: NRobert P. J. Day <rpjday@mindspring.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: Adam Belay <ambx1@neo.rr.com>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Neil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      cd861280
    • I
      [PATCH] lockdep: print irq-trace info on asserts · 3117df04
      Ingo Molnar 提交于
      When we print an assert due to scheduling-in-atomic bugs, and if lockdep
      is enabled, then the IRQ tracing information of lockdep can be printed
      to pinpoint the code location that disabled interrupts. This saved me
      quite a bit of debugging time in cases where the backtrace did not
      identify the irq-disabling site well enough.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3117df04
    • I
      [PATCH] debug: add sysrq_always_enabled boot option · 5d6f647f
      Ingo Molnar 提交于
      Most distributions enable sysrq support but set it to 0 by default.  Add a
      sysrq_always_enabled boot option to always-enable sysrq keys.  Useful for
      debugging - without having to modify the disribution's config files (which
      might not be possible if the kernel is on a live CD, etc.).
      
      Also, while at it, clean up the sysrq interfaces.
      
      [bunk@stusta.de: make sysrq_always_enabled_setup() static]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5d6f647f
    • C
      [PATCH] optimize o_direct on block devices · e61c9018
      Chen, Kenneth W 提交于
      Implement block device specific .direct_IO method instead of going through
      generic direct_io_worker for block device.
      
      direct_io_worker() is fairly complex because it needs to handle O_DIRECT on
      file system, where it needs to perform block allocation, hole detection,
      extents file on write, and tons of other corner cases.  The end result is
      that it takes tons of CPU time to submit an I/O.
      
      For block device, the block allocation is much simpler and a tight triple
      loop can be written to iterate each iovec and each page within the iovec in
      order to construct/prepare bio structure and then subsequently submit it to
      the block layer.  This significantly speeds up O_D on block device.
      
      [akpm@osdl.org: small speedup]
      Signed-off-by: NKen Chen <kenneth.w.chen@intel.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Zach Brown <zach.brown@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e61c9018
    • V
      [PATCH] relative atime · 47ae32d6
      Valerie Henson 提交于
      Add "relatime" (relative atime) support.  Relative atime only updates the
      atime if the previous atime is older than the mtime or ctime.  Like
      noatime, but useful for applications like mutt that need to know when a
      file has been read since it was last modified.
      
      A corresponding patch against mount(8) is available at
      http://userweb.kernel.org/~akpm/mount-relative-atime.txtSigned-off-by: NValerie Henson <val_henson@linux.intel.com>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Karel Zak <kzak@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      47ae32d6
    • C
      [PATCH] Xtensa: Add ktermios and minor filename fix · 1c0350bd
      Chris Zankel 提交于
      The kernel termios (ktermios) changes were somehow missed for Xtensa.  This
      patch adds the ktermios structure and also includes some minor file name
      fix that was missed in the syscall patch.
      Signed-off-by: NChris Zankel <chris@zankel.net>
      Acked-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1c0350bd
    • R
      [PATCH] PM: Fix SMP races in the freezer · 8a102eed
      Rafael J. Wysocki 提交于
      Currently, to tell a task that it should go to the refrigerator, we set the
      PF_FREEZE flag for it and send a fake signal to it.  Unfortunately there
      are two SMP-related problems with this approach.  First, a task running on
      another CPU may be updating its flags while the freezer attempts to set
      PF_FREEZE for it and this may leave the task's flags in an inconsistent
      state.  Second, there is a potential race between freeze_process() and
      refrigerator() in which freeze_process() running on one CPU is reading a
      task's PF_FREEZE flag while refrigerator() running on another CPU has just
      set PF_FROZEN for the same task and attempts to reset PF_FREEZE for it.  If
      the refrigerator wins the race, freeze_process() will state that PF_FREEZE
      hasn't been set for the task and will set it unnecessarily, so the task
      will go to the refrigerator once again after it's been thawed.
      
      To solve first of these problems we need to stop using PF_FREEZE to tell
      tasks that they should go to the refrigerator.  Instead, we can introduce a
      special TIF_*** flag and use it for this purpose, since it is allowed to
      change the other tasks' TIF_*** flags and there are special calls for it.
      
      To avoid the freeze_process()-refrigerator() race we can make
      freeze_process() to always check the task's PF_FROZEN flag after it's read
      its "freeze" flag.  We should also make sure that refrigerator() will
      always reset the task's "freeze" flag after it's set PF_FROZEN for it.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8a102eed
    • E
      [PATCH] SLAB: use a multiply instead of a divide in obj_to_index() · 6a2d7a95
      Eric Dumazet 提交于
      When some objects are allocated by one CPU but freed by another CPU we can
      consume lot of cycles doing divides in obj_to_index().
      
      (Typical load on a dual processor machine where network interrupts are
      handled by one particular CPU (allocating skbufs), and the other CPU is
      running the application (consuming and freeing skbufs))
      
      Here on one production server (dual-core AMD Opteron 285), I noticed this
      divide took 1.20 % of CPU_CLK_UNHALTED events in kernel.  But Opteron are
      quite modern cpus and the divide is much more expensive on oldest
      architectures :
      
      On a 200 MHz sparcv9 machine, the division takes 64 cycles instead of 1
      cycle for a multiply.
      
      Doing some math, we can use a reciprocal multiplication instead of a divide.
      
      If we want to compute V = (A / B)  (A and B being u32 quantities)
      we can instead use :
      
      V = ((u64)A * RECIPROCAL(B)) >> 32 ;
      
      where RECIPROCAL(B) is precalculated to ((1LL << 32) + (B - 1)) / B
      
      Note :
      
      I wrote pure C code for clarity. gcc output for i386 is not optimal but
      acceptable :
      
      mull   0x14(%ebx)
      mov    %edx,%eax // part of the >> 32
      xor     %edx,%edx // useless
      mov    %eax,(%esp) // could be avoided
      mov    %edx,0x4(%esp) // useless
      mov    (%esp),%ebx
      
      [akpm@osdl.org: small cleanups]
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6a2d7a95
    • P
      [PATCH] cpuset: rework cpuset_zone_allowed api · 02a0e53d
      Paul Jackson 提交于
      Elaborate the API for calling cpuset_zone_allowed(), so that users have to
      explicitly choose between the two variants:
      
        cpuset_zone_allowed_hardwall()
        cpuset_zone_allowed_softwall()
      
      Until now, whether or not you got the hardwall flavor depended solely on
      whether or not you or'd in the __GFP_HARDWALL gfp flag to the gfp_mask
      argument.
      
      If you didn't specify __GFP_HARDWALL, you implicitly got the softwall
      version.
      
      Unfortunately, this meant that users would end up with the softwall version
      without thinking about it.  Since only the softwall version might sleep,
      this led to bugs with possible sleeping in interrupt context on more than
      one occassion.
      
      The hardwall version requires that the current tasks mems_allowed allows
      the node of the specified zone (or that you're in interrupt or that
      __GFP_THISNODE is set or that you're on a one cpuset system.)
      
      The softwall version, depending on the gfp_mask, might allow a node if it
      was allowed in the nearest enclusing cpuset marked mem_exclusive (which
      requires taking the cpuset lock 'callback_mutex' to evaluate.)
      
      This patch removes the cpuset_zone_allowed() call, and forces the caller to
      explicitly choose between the hardwall and the softwall case.
      
      If the caller wants the gfp_mask to determine this choice, they should (1)
      be sure they can sleep or that __GFP_HARDWALL is set, and (2) invoke the
      cpuset_zone_allowed_softwall() routine.
      
      This adds another 100 or 200 bytes to the kernel text space, due to the few
      lines of nearly duplicate code at the top of both cpuset_zone_allowed_*
      routines.  It should save a few instructions executed for the calls that
      turned into calls of cpuset_zone_allowed_hardwall, thanks to not having to
      set (before the call) then check (within the call) the __GFP_HARDWALL flag.
      
      For the most critical call, from get_page_from_freelist(), the same
      instructions are executed as before -- the old cpuset_zone_allowed()
      routine it used to call is the same code as the
      cpuset_zone_allowed_softwall() routine that it calls now.
      
      Not a perfect win, but seems worth it, to reduce this chance of hitting a
      sleeping with irq off complaint again.
      Signed-off-by: NPaul Jackson <pj@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      02a0e53d
    • C
      [PATCH] More slab.h cleanups · 55935a34
      Christoph Lameter 提交于
      More cleanups for slab.h
      
      1. Remove tabs from weird locations as suggested by Pekka
      
      2. Drop the check for NUMA and SLAB_DEBUG from the fallback section
         as suggested by Pekka.
      
      3. Uses static inline for the fallback defs as also suggested by Pekka.
      
      4. Make kmem_ptr_valid take a const * argument.
      
      5. Separate the NUMA fallback definitions from the kmalloc_track fallback
         definitions.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      55935a34
    • C
      [PATCH] Cleanup slab headers / API to allow easy addition of new slab allocators · 2e892f43
      Christoph Lameter 提交于
      This is a response to an earlier discussion on linux-mm about splitting
      slab.h components per allocator.  Patch is against 2.6.19-git11.  See
      http://marc.theaimsgroup.com/?l=linux-mm&m=116469577431008&w=2
      
      This patch cleans up the slab header definitions.  We define the common
      functions of slob and slab in slab.h and put the extra definitions needed
      for slab's kmalloc implementations in <linux/slab_def.h>.  In order to get
      a greater set of common functions we add several empty functions to slob.c
      and also rename slob's kmalloc to __kmalloc.
      
      Slob does not need any special definitions since we introduce a fallback
      case.  If there is no need for a slab implementation to provide its own
      kmalloc mess^H^H^Hacros then we simply fall back to __kmalloc functions.
      That is sufficient for SLOB.
      
      Sort the function in slab.h according to their functionality.  First the
      functions operating on struct kmem_cache * then the kmalloc related
      functions followed by special debug and fallback definitions.
      
      Also redo a lot of comments.
      
      Signed-off-by: Christoph Lameter <clameter@sgi.com>?
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2e892f43
    • E
      [PATCH] reorder struct pipe_buf_operations · 6a8ba9d1
      Eric Dumazet 提交于
      Fields of struct pipe_buf_operations have not a precise layout (ie not
      optimized to fit cache lines nor reduce cache line ping pongs)
      
      The bufs[] array is *large* and is placed near the beginning of the
      structure, so all following fields have a large offset.  This is
      unfortunate because many archs have smaller instructions when using small
      offsets relative to a base register.  On x86 for example, 7 bits offsets
      have smaller instruction lengths.
      
      Moving bufs[] at the end of pipe_buf_operations permits all fields to have
      small offsets, and reduce text size, and icache pressure.
      
      # size vmlinux.pre vmlinux
          text    data     bss     dec     hex filename
      3268989  664356  492196 4425541  438745 vmlinux.pre
      3268765  664356  492196 4425317  438665 vmlinux
      
      So this patch reduces text size by 224 bytes on my x86_64 machine. Similar
      results on ia32.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6a8ba9d1
    • E
      [PATCH] Revert "[PATCH] identifier to nsproxy" · 5f8442ed
      Eric W. Biederman 提交于
      This reverts commit 373beb35.
      
      No one is using this identifier yet.  The purpose of this identifier is to
      export nsproxy to user space which is wrong.  nsproxy is an internal
      implementation optimization, which should keep our fork times from getting
      slower as we increase the number of global namespaces you don't have to
      share.
      
      Adding a global identifier like this is inappropriate because it makes
      namespaces inherently non-recursive, greatly limiting what we can do with
      them in the future.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Cc: Cedric Le Goater <clg@fr.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5f8442ed
    • E
      [PATCH] constify pipe_buf_operations · d4c3cca9
      Eric Dumazet 提交于
      - pipe/splice should use const pipe_buf_operations and file_operations
      
      - struct pipe_inode_info has an unused field "start" : get rid of it.
      Signed-off-by: NEric Dumazet <dada1@cosmosbay.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d4c3cca9
  2. 13 12月, 2006 13 次提交
  3. 12 12月, 2006 12 次提交