1. 19 6月, 2013 1 次提交
    • H
      parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50 (part 2) · 91ea8207
      Helge Deller 提交于
      Make sure that we really return -1 (instead of 0x00ff) as node id for
      page frame numbers which are not physically available.
      
      This finally fixes the kernel panic when running
      cat /proc/kpageflags /proc/kpagecount.
      
      Theoretically this patch now limits the number of physical memory ranges
      to 127 instead of 254, but currently we have MAX_PHYSMEM_RANGES
      hardcoded to 8 which is sufficient for all existing parisc machines.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      91ea8207
  2. 12 5月, 2013 1 次提交
    • H
      parisc: implement irq stacks - part 2 (v2) · 416821d3
      Helge Deller 提交于
      This patch fixes few build issues which were introduced with the last
      irq stack patch, e.g. the combination of stack overflow check and irq
      stack.
      
      Furthermore we now do proper locking and change the irq bh handler
      to use the irq stack as well.
      
      In /proc/interrupts one now can monitor how huge the irq stack has grown
      and how often it was preferred over the kernel stack.
      
      IRQ stacks are now enabled by default just to make sure that we not
      overflow the kernel stack by accident.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      416821d3
  3. 08 5月, 2013 1 次提交
  4. 30 4月, 2013 2 次提交
  5. 05 5月, 2012 1 次提交
  6. 25 5月, 2011 2 次提交
    • P
      mm: now that all old mmu_gather code is gone, remove the storage · 1c395176
      Peter Zijlstra 提交于
      Fold all the mmu_gather rework patches into one for submission
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Reported-by: NHugh Dickins <hughd@google.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Nick Piggin <npiggin@kernel.dk>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1c395176
    • D
      arch, mm: filter disallowed nodes from arch specific show_mem functions · 7bf02ea2
      David Rientjes 提交于
      Architectures that implement their own show_mem() function did not pass
      the filter argument to show_free_areas() to appropriately avoid emitting
      the state of nodes that are disallowed in the current context.  This patch
      now passes the filter argument to show_free_areas() so those nodes are now
      avoided.
      
      This patch also removes the show_free_areas() wrapper around
      __show_free_areas() and converts existing callers to pass an empty filter.
      
      ia64 emits additional information for each node, so skip_free_areas_zone()
      must be made global to filter disallowed nodes and it is converted to use
      a nid argument rather than a zone for this use case.
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Helge Deller <deller@gmx.de>
      Cc: James Bottomley <jejb@parisc-linux.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7bf02ea2
  7. 21 4月, 2011 1 次提交
    • D
      [PARISC] set memory ranges in N_NORMAL_MEMORY when onlined · d9b41e0b
      David Rientjes 提交于
      When a DISCONTIGMEM memory range is brought online as a NUMA node, it
      also needs to have its bet set in N_NORMAL_MEMORY.  This is necessary for
      generic kernel code that utilizes N_NORMAL_MEMORY as a subset of N_ONLINE
      for memory savings.
      
      These types of hacks can hopefully be removed once DISCONTIGMEM is either
      removed or abstracted away from CONFIG_NUMA.
      
      Fixes a panic in the slub code which only initializes structures for
      N_NORMAL_MEMORY to save memory:
      
      	Backtrace:
      	 [<000000004021c938>] add_partial+0x28/0x98
      	 [<000000004021faa0>] __slab_free+0x1d0/0x1d8
      	 [<000000004021fd04>] kmem_cache_free+0xc4/0x128
      	 [<000000004033bf9c>] ida_get_new_above+0x21c/0x2c0
      	 [<00000000402a8980>] sysfs_new_dirent+0xd0/0x238
      	 [<00000000402a974c>] create_dir+0x5c/0x168
      	 [<00000000402a9ab0>] sysfs_create_dir+0x98/0x128
      	 [<000000004033d6c4>] kobject_add_internal+0x114/0x258
      	 [<000000004033d9ac>] kobject_add_varg+0x7c/0xa0
      	 [<000000004033df20>] kobject_add+0x50/0x90
      	 [<000000004033dfb4>] kobject_create_and_add+0x54/0xc8
      	 [<00000000407862a0>] cgroup_init+0x138/0x1f0
      	 [<000000004077ce50>] start_kernel+0x5a0/0x840
      	 [<000000004011fa3c>] start_parisc+0xa4/0xb8
      	 [<00000000404bb034>] packet_ioctl+0x16c/0x208
      	 [<000000004049ac30>] ip_mroute_setsockopt+0x260/0xf20
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      d9b41e0b
  8. 16 4月, 2011 1 次提交
    • J
      [PARISC] only make executable areas executable · d7dd2ff1
      James Bottomley 提交于
      Currently parisc has the whole kernel marked as RWX, meaning any
      kernel page at all is eligible to be executed.  This can cause a
      theoretical problem on systems with combined I/D TLB because the act
      of referencing a page causes a TLB insertion with an executable bit.
      This TLB entry may be used by the CPU as the basis for speculating the
      page into the I-Cache.  If this speculated page is subsequently used
      for a user process, there is the possibility we will get a stale
      I-cache line picked up as the binary executes.
      
      As a point of good practise, only mark actual kernel text pages as
      executable.  The same has to be done for init_text pages, but they're
      converted to data pages (and the I-Cache flushed) when the init memory
      is released.
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      d7dd2ff1
  9. 25 3月, 2011 1 次提交
  10. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  11. 28 9月, 2009 1 次提交
    • H
      parisc: rename parisc's vmalloc_start to parisc_vmalloc_start · 4255f0d2
      Helge Deller 提交于
      building kernel 2.6.32(pre), gives this compiler warning:
      /linus-linux-2.6/mm/vmalloc.c: In function 'pcpu_get_vm_areas':
      /linus-linux-2.6/mm/vmalloc.c:2104: warning: 'vmalloc_start' is used
      uninitialized in this function
      
      The reason is, that the code in mm/vmalloc defines a local variable called
      vmalloc_start, which is already defined as global variable in parisc's code.
      
      To avoid this kind of problems in future, I suggest to rename the parisc
      variable
      to parisc_vmalloc_start.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      4255f0d2
  12. 22 9月, 2009 1 次提交
  13. 03 7月, 2009 2 次提交
  14. 31 3月, 2009 1 次提交
    • H
      parisc: fix usage of 32bit PTE page table entries on 32bit kernels · 48d27cb2
      Helge Deller 提交于
      This patch fixes a long outstanding bug on 32bit parisc linux kernels
      which prevented us from using 32bit PTE table entries (instead of 64bit
      entries of which 32bit were unused).
      
      The problem was caused by this assembler statement in the L2_ptep
      macro in arch/parisc/kernel/entry.S:447:
      	EXTR \va,31-ASM_PGDIR_SHIFT,ASM_BITS_PER_PGD,\index
      which expanded to
      	extrw,u r8,9,11,r1
      and which has undefined behavior since the length value (11) extends
      beyond the leftmost bit (11-1 > 9).
      Interestingly PA2.0 processors seem to don't care and just zero-extend
      the value, while PA1.1 processors don't.
      
      Fix this problem by detecting an address space overflow with ASM_BITS_PER_PGD
      and adjusting it accordingly. To prevent such problems in the future,
      some compile time sanity checks in arch/parisc/mm/init.c were added.
      
      Since the page table now only consumes half of it's old size, we can
      use the freed memory to harmonize 32- and 64bit kernels and let both
      map 16MB for the initial page table.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      48d27cb2
  15. 13 3月, 2009 1 次提交
  16. 25 7月, 2008 2 次提交
  17. 26 6月, 2008 1 次提交
  18. 13 6月, 2008 1 次提交
  19. 15 5月, 2008 1 次提交
  20. 13 5月, 2008 1 次提交
  21. 28 4月, 2008 2 次提交
    • M
      mm: have zonelist contains structs with both a zone pointer and zone_idx · dd1a239f
      Mel Gorman 提交于
      Filtering zonelists requires very frequent use of zone_idx().  This is costly
      as it involves a lookup of another structure and a substraction operation.  As
      the zone_idx is often required, it should be quickly accessible.  The node idx
      could also be stored here if it was found that accessing zone->node is
      significant which may be the case on workloads where nodemasks are heavily
      used.
      
      This patch introduces a struct zoneref to store a zone pointer and a zone
      index.  The zonelist then consists of an array of these struct zonerefs which
      are looked up as necessary.  Helpers are given for accessing the zone index as
      well as the node index.
      
      [kamezawa.hiroyu@jp.fujitsu.com: Suggested struct zoneref instead of embedding information in pointers]
      [hugh@veritas.com: mm-have-zonelist: fix memcg ooms]
      [hugh@veritas.com: just return do_try_to_free_pages]
      [hugh@veritas.com: do_try_to_free_pages gfp_mask redundant]
      Signed-off-by: NMel Gorman <mel@csn.ul.ie>
      Acked-by: NChristoph Lameter <clameter@sgi.com>
      Acked-by: NDavid Rientjes <rientjes@google.com>
      Signed-off-by: NLee Schermerhorn <lee.schermerhorn@hp.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dd1a239f
    • M
      mm: use two zonelist that are filtered by GFP mask · 54a6eb5c
      Mel Gorman 提交于
      Currently a node has two sets of zonelists, one for each zone type in the
      system and a second set for GFP_THISNODE allocations.  Based on the zones
      allowed by a gfp mask, one of these zonelists is selected.  All of these
      zonelists consume memory and occupy cache lines.
      
      This patch replaces the multiple zonelists per-node with two zonelists.  The
      first contains all populated zones in the system, ordered by distance, for
      fallback allocations when the target/preferred node has no free pages.  The
      second contains all populated zones in the node suitable for GFP_THISNODE
      allocations.
      
      An iterator macro is introduced called for_each_zone_zonelist() that interates
      through each zone allowed by the GFP flags in the selected zonelist.
      Signed-off-by: NMel Gorman <mel@csn.ul.ie>
      Acked-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NLee Schermerhorn <lee.schermerhorn@hp.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      54a6eb5c
  22. 08 2月, 2008 1 次提交
    • 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
  23. 18 10月, 2007 1 次提交
  24. 23 5月, 2007 1 次提交
  25. 17 2月, 2007 1 次提交
  26. 13 2月, 2007 2 次提交
  27. 12 2月, 2007 1 次提交
  28. 08 12月, 2006 3 次提交
  29. 04 10月, 2006 1 次提交
  30. 26 9月, 2006 2 次提交
  31. 02 7月, 2006 1 次提交