1. 09 2月, 2008 15 次提交
  2. 08 2月, 2008 10 次提交
    • C
      SLUB: Alternate fast paths using cmpxchg_local · 1f84260c
      Christoph Lameter 提交于
      Provide an alternate implementation of the SLUB fast paths for alloc
      and free using cmpxchg_local. The cmpxchg_local fast path is selected
      for arches that have CONFIG_FAST_CMPXCHG_LOCAL set. An arch should only
      set CONFIG_FAST_CMPXCHG_LOCAL if the cmpxchg_local is faster than an
      interrupt enable/disable sequence. This is known to be true for both
      x86 platforms so set FAST_CMPXCHG_LOCAL for both arches.
      
      Currently another requirement for the fastpath is that the kernel is
      compiled without preemption. The restriction will go away with the
      introduction of a new per cpu allocator and new per cpu operations.
      
      The advantages of a cmpxchg_local based fast path are:
      
      1. Potentially lower cycle count (30%-60% faster)
      
      2. There is no need to disable and enable interrupts on the fast path.
         Currently interrupts have to be disabled and enabled on every
         slab operation. This is likely avoiding a significant percentage
         of interrupt off / on sequences in the kernel.
      
      3. The disposal of freed slabs can occur with interrupts enabled.
      
      The alternate path is realized using #ifdef's. Several attempts to do the
      same with macros and inline functions resulted in a mess (in particular due
      to the strange way that local_interrupt_save() handles its argument and due
      to the need to define macros/functions that sometimes disable interrupts
      and sometimes do something else).
      
      [clameter: Stripped preempt bits and disabled fastpath if preempt is enabled]
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Reviewed-by: NPekka Enberg <penberg@cs.helsinki.fi>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      1f84260c
    • T
      Fix compilation of powerpc asm-offsets.c with old gcc · 151db1fc
      Tony Breeds 提交于
      Commit ad7f7167 ("[POWERPC] Use a
      sensible default for clock_getres() in the VDSO") corrected the clock
      resolution reported by the VDSO clock_getres() but introduced another
      problem in that older versions of gcc (gcc-4.0 and earlier) fail to
      compile the new code in arch/powerpc/kernel/asm-offsets.c.
      
      This fixes it by introducing a new MONOTONIC_RES_NSEC define in the
      generic code which is equivalent to KTIME_MONOTONIC_RES but is just an
      integer constant, not a ktime union.
      Signed-off-by: NTony Breeds <tony@bakeyournoodle.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      151db1fc
    • G
      m68k: correct setting of struct user.u_ar0 · 145e9230
      Geert Uytterhoeven 提交于
      Commit 6e16d89b ("Sanitize the type of
      struct user.u_ar0") forgot to change the m68k setting code, causing the
      following compiler warning:
      
          arch/m68k/kernel/process.c:338: warning: assignment makes integer from pointer without a cast
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      145e9230
    • B
      I8K: add i8k driver to the x86_64 Kconfig · 300ec130
      Bradley Smith 提交于
      Adds i8k driver to the x86_64 Kconfig.
      Signed-off-by: NBradley Smith <bradjsmith@btinternet.com>
      Cc: Frank Sorenson <frank@tuxrocks.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      300ec130
    • M
      m32r: build fix of arch/m32r/kernel/smpboot.c · df0f65f0
      Mathieu Desnoyers 提交于
      This patch is for Mathieu Desnoyers's include/asm-m32r/local.h.
      Applying the new include/asm-m32r/local.h, inclusion of linux/sched.h
      is needed to fix a build error of arch/m32r/kernel/smpboot.c.
      
      <--  snip  -->
        ...
        CC      arch/m32r/kernel/smpboot.o
      /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c: In function 'do_boot_cpu':
      /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:279: error: implicit declaration of function 'fork_idle'
      /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:279: warning: assignment makes pointer from integer without a cast
      /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:283: error: dereferencing pointer to incomplete type
      /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:289: error: dereferencing pointer to incomplete type
      /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:290: error: implicit declaration of function 'task_thread_info'
      /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:290: error: invalid type argument of '->'
      /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c: In function 'start_secondary':
      /project/m32r-linux/kernel/work/linux-2.6_dev.git/arch/m32r/kernel/smpboot.c:429: error: implicit declaration of function 'cpu_init'
      make[2]: *** [arch/m32r/kernel/smpboot.o] Error 1
      <--  snip  -->
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      df0f65f0
    • H
      Sanitize the type of struct user.u_ar0 · 6e16d89b
      H. Peter Anvin 提交于
      struct user.u_ar0 is defined to contain a pointer offset on all
      architectures in which it is defined (all architectures which define an
      a.out format except SPARC.) However, it has a pointer type in the headers,
      which is pointless -- <asm/user.h> is not exported to userspace, and it
      just makes the code messy.
      
      Redefine the field as "unsigned long" (which is the same size as a pointer
      on all Linux architectures) and change the setting code to user offsetof()
      instead of hand-coded arithmetic.
      
      Cc: Linux Arch Mailing List <linux-arch@vger.kernel.org>
      Cc: Bryan Wu <bryan.wu@analog.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Lennert Buytenhek <kernel@wantstofly.org>
      Cc: Håvard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6e16d89b
    • K
      vmcoreinfo: fix the configuration dependencies · 92df5c3e
      Ken'ichi Ohmichi 提交于
      This patch fixes the configuration dependencies in the vmcoreinfo data.
      
      i386's "node_data" is defined in arch/x86/mm/discontig_32.c,
      and x86_64's one is defined in arch/x86/mm/numa_64.c.
      They depend on CONFIG_NUMA:
        arch/x86/mm/Makefile_32:7
          obj-$(CONFIG_NUMA) += discontig_32.o
        arch/x86/mm/Makefile_64:7
          obj-$(CONFIG_NUMA) += numa_64.o
      
      ia64's "pgdat_list" is defined in arch/ia64/mm/discontig.c,
      and it depends on CONFIG_DISCONTIGMEM and CONFIG_SPARSEMEM:
        arch/ia64/mm/Makefile:9-10
          obj-$(CONFIG_DISCONTIGMEM) += discontig.o
          obj-$(CONFIG_SPARSEMEM)    += discontig.o
      
      ia64's "node_memblk" is defined in arch/ia64/mm/numa.c,
      and it depends on CONFIG_NUMA:
        arch/ia64/mm/Makefile:8
          obj-$(CONFIG_NUMA)         += numa.o
      Signed-off-by: NKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
      Acked-by: NSimon Horman <horms@verge.net.au>
      Cc: David Rientjes <rientjes@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      92df5c3e
    • K
      vmcoreinfo: rename vmcoreinfo's macros returning the size · c76f860c
      Ken'ichi Ohmichi 提交于
      This patchset is for the vmcoreinfo data.
      
      The vmcoreinfo data has the minimum debugging information only for dump
      filtering.  makedumpfile (dump filtering command) gets it to distinguish
      unnecessary pages, and makedumpfile creates a small dumpfile.
      
      This patch:
      
      VMCOREINFO_SIZE() should be renamed VMCOREINFO_STRUCT_SIZE() since it's always
      returning the size of the struct with a given name. This change would allow
      VMCOREINFO_TYPEDEF_SIZE() to simply become VMCOREINFO_SIZE() since it need not
      be used exclusively for typedefs.
      
      This discussion is the following:
      http://www.ussg.iu.edu/hypermail/linux/kernel/0709.3/0582.htmlSigned-off-by: NKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
      Acked-by: NDavid Rientjes <rientjes@google.com>
      Acked-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c76f860c
    • B
      Use BOOTMEM_EXCLUSIVE for kdump · 18a01a3b
      Bernhard Walle 提交于
      Use the BOOTMEM_EXCLUSIVE, introduced in the previous patch, to avoid
      conflicts while reserving the memory for the kdump capture kernel
      (crashkernel=).
      Signed-off-by: NBernhard Walle <bwalle@suse.de>
      Cc: <linux-arch@vger.kernel.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Vivek Goyal <vgoyal@in.ibm.com>
      Acked-by: NPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      18a01a3b
    • B
      Introduce flags for reserve_bootmem() · 72a7fe39
      Bernhard Walle 提交于
      This patchset adds a flags variable to reserve_bootmem() and uses the
      BOOTMEM_EXCLUSIVE flag in crashkernel reservation code to detect collisions
      between crashkernel area and already used memory.
      
      This patch:
      
      Change the reserve_bootmem() function to accept a new flag BOOTMEM_EXCLUSIVE.
      If that flag is set, the function returns with -EBUSY if the memory already
      has been reserved in the past.  This is to avoid conflicts.
      
      Because that code runs before SMP initialisation, there's no race condition
      inside reserve_bootmem_core().
      
      [akpm@linux-foundation.org: coding-style fixes]
      [akpm@linux-foundation.org: fix powerpc build]
      Signed-off-by: NBernhard Walle <bwalle@suse.de>
      Cc: <linux-arch@vger.kernel.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Vivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      72a7fe39
  3. 07 2月, 2008 15 次提交