1. 22 9月, 2009 3 次提交
  2. 17 6月, 2009 5 次提交
  3. 18 5月, 2009 1 次提交
    • M
      [ARM] Double check memmap is actually valid with a memmap has unexpected holes V2 · eb33575c
      Mel Gorman 提交于
      pfn_valid() is meant to be able to tell if a given PFN has valid memmap
      associated with it or not. In FLATMEM, it is expected that holes always
      have valid memmap as long as there is valid PFNs either side of the hole.
      In SPARSEMEM, it is assumed that a valid section has a memmap for the
      entire section.
      
      However, ARM and maybe other embedded architectures in the future free
      memmap backing holes to save memory on the assumption the memmap is never
      used. The page_zone linkages are then broken even though pfn_valid()
      returns true. A walker of the full memmap must then do this additional
      check to ensure the memmap they are looking at is sane by making sure the
      zone and PFN linkages are still valid. This is expensive, but walkers of
      the full memmap are extremely rare.
      
      This was caught before for FLATMEM and hacked around but it hits again for
      SPARSEMEM because the page_zone linkages can look ok where the PFN linkages
      are totally screwed. This looks like a hatchet job but the reality is that
      any clean solution would end up consumning all the memory saved by punching
      these unexpected holes in the memmap. For example, we tried marking the
      memmap within the section invalid but the section size exceeds the size of
      the hole in most cases so pfn_valid() starts returning false where valid
      memmap exists. Shrinking the size of the section would increase memory
      consumption offsetting the gains.
      
      This patch identifies when an architecture is punching unexpected holes
      in the memmap that the memory model cannot automatically detect and sets
      ARCH_HAS_HOLES_MEMORYMODEL. At the moment, this is restricted to EP93xx
      which is the model sub-architecture this has been reported on but may expand
      later. When set, walkers of the full memmap must call memmap_valid_within()
      for each PFN and passing in what it expects the page and zone to be for
      that PFN. If it finds the linkages to be broken, it assumes the memmap is
      invalid for that PFN.
      Signed-off-by: NMel Gorman <mel@csn.ul.ie>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      eb33575c
  4. 03 4月, 2009 1 次提交
  5. 01 4月, 2009 1 次提交
  6. 30 3月, 2009 1 次提交
  7. 01 1月, 2009 1 次提交
  8. 23 10月, 2008 4 次提交
  9. 20 10月, 2008 7 次提交
  10. 28 8月, 2008 1 次提交
    • M
      [ARM] Skip memory holes in FLATMEM when reading /proc/pagetypeinfo · e80d6a24
      Mel Gorman 提交于
      Ordinarily, memory holes in flatmem still have a valid memmap and is safe
      to use. However, an architecture (ARM) frees up the memmap backing memory
      holes on the assumption it is never used. /proc/pagetypeinfo reads the
      whole range of pages in a zone believing that the memmap is valid and that
      pfn_valid will return false if it is not. On ARM, freeing the memmap breaks
      the page->zone linkages even though pfn_valid() returns true and the kernel
      can oops shortly afterwards due to accessing a bogus struct zone *.
      
      This patch lets architectures say when FLATMEM can have holes in the
      memmap. Rather than an expensive check for valid memory, /proc/pagetypeinfo
      will confirm that the page linkages are still valid by checking page->zone
      is still the expected zone. The lookup of page_zone is safe as there is a
      limited range of memory that is accessed when calling page_zone.  Even if
      page_zone happens to return the correct zone, the impact is that the counters
      in /proc/pagetypeinfo are slightly off but fragmentation monitoring is
      unlikely to be relevant on an embedded system.
      Reported-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Signed-off-by: NMel Gorman <mel@csn.ul.ie>
      Tested-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      e80d6a24
  11. 25 7月, 2008 1 次提交
  12. 24 5月, 2008 1 次提交
  13. 13 5月, 2008 1 次提交
  14. 30 4月, 2008 2 次提交
  15. 28 4月, 2008 3 次提交
  16. 16 4月, 2008 1 次提交
    • K
      add "Isolate" migratetype name to /proc/pagetypeinfo · 91446b06
      KOSAKI Motohiro 提交于
      In a5d76b54 (memory unplug: page isolation by
      KAMEZAWA Hiroyuki), "isolate" migratetype added.  but unfortunately, it
      doesn't treat /proc/pagetypeinfo display logic.
      
      this patch add "Isolate" to pagetype name field.
      
      /proc/pagetype
      before:
      ------------------------------------------------------------------------------------------------------------------------
      Free pages count per migrate type at order       0      1      2      3      4      5      6      7      8      9     10
      Node    0, zone      DMA, type    Unmovable      1      2      2      2      1      2      2      1      1      0      0
      Node    0, zone      DMA, type  Reclaimable      0      0      0      0      0      0      0      0      0      0      0
      Node    0, zone      DMA, type      Movable      2      3      3      1      3      3      2      0      0      0      0
      Node    0, zone      DMA, type      Reserve      0      0      0      0      0      0      0      0      0      0      1
      Node    0, zone      DMA, type       <NULL>      0      0      0      0      0      0      0      0      0      0      0
      Node    0, zone   Normal, type    Unmovable      1      9      7      4      1      1      1      1      0      0      0
      Node    0, zone   Normal, type  Reclaimable      5      2      0      0      1      1      0      0      0      1      0
      Node    0, zone   Normal, type      Movable      0      1      1      0      0      0      1      0      0      1     60
      Node    0, zone   Normal, type      Reserve      0      0      0      0      0      0      0      0      0      0      1
      Node    0, zone   Normal, type       <NULL>      0      0      0      0      0      0      0      0      0      0      0
      Node    0, zone  HighMem, type    Unmovable      0      0      1      1      1      0      1      1      2      2      0
      Node    0, zone  HighMem, type  Reclaimable      0      0      0      0      0      0      0      0      0      0      0
      Node    0, zone  HighMem, type      Movable    236     62      6      2      2      1      1      0      1      1     16
      Node    0, zone  HighMem, type      Reserve      0      0      0      0      0      0      0      0      0      0      1
      Node    0, zone  HighMem, type       <NULL>      0      0      0      0      0      0      0      0      0      0      0
      
      Number of blocks type     Unmovable  Reclaimable      Movable      Reserve       <NULL>
      Node 0, zone      DMA            1            0            2       1            0
      Node 0, zone   Normal           10           40          169       1            0
      Node 0, zone  HighMem            2            0          283       1            0
      
      after:
      ------------------------------------------------------------------------------------------------------------------------
      Free pages count per migrate type at order       0      1      2      3      4      5      6      7      8      9     10
      Node    0, zone      DMA, type    Unmovable      1      2      2      2      1      2      2      1      1      0      0
      Node    0, zone      DMA, type  Reclaimable      0      0      0      0      0      0      0      0      0      0      0
      Node    0, zone      DMA, type      Movable      2      3      3      1      3      3      2      0      0      0      0
      Node    0, zone      DMA, type      Reserve      0      0      0      0      0      0      0      0      0      0      1
      Node    0, zone      DMA, type      Isolate      0      0      0      0      0      0      0      0      0      0      0
      Node    0, zone   Normal, type    Unmovable      0      2      1      1      0      1      0      0      0      0      0
      Node    0, zone   Normal, type  Reclaimable      1      1      1      1      1      0      1      1      1      0      0
      Node    0, zone   Normal, type      Movable      0      1      1      1      0      1      0      1      0      0    196
      Node    0, zone   Normal, type      Reserve      0      0      0      0      0      0      0      0      0      0      1
      Node    0, zone   Normal, type      Isolate      0      0      0      0      0      0      0      0      0      0      0
      Node    0, zone  HighMem, type    Unmovable      0      1      0      0      0      1      1      1      2      2      0
      Node    0, zone  HighMem, type  Reclaimable      0      0      0      0      0      0      0      0      0      0      0
      Node    0, zone  HighMem, type      Movable      1      0      1      1      0      0      0      0      1      0    200
      Node    0, zone  HighMem, type      Reserve      0      0      0      0      0      0      0      0      0      0      1
      Node    0, zone  HighMem, type      Isolate      0      0      0      0      0      0      0      0      0      0      0
      
      Number of blocks type     Unmovable  Reclaimable      Movable      Reserve      Isolate
      Node 0, zone      DMA            1            0            2       1            0
      Node 0, zone   Normal            8            4          207       1            0
      Node 0, zone  HighMem            2            0          283       1            0
      Signed-off-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Acked-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Acked-by: NMel Gorman <mel@csn.ul.ie>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      91446b06
  17. 06 2月, 2008 3 次提交
  18. 15 11月, 2007 1 次提交
  19. 17 10月, 2007 2 次提交