1. 01 Nov, 2011 4 commits
  2. 16 Jun, 2011 4 commits
  3. 23 Mar, 2011 4 commits
    • Andrea Arcangeli's avatar
      mm: compaction: minimise the time IRQs are disabled while isolating pages for migration · b2eef8c0
      Andrea Arcangeli authored
      compaction_alloc() isolates pages for migration in isolate_migratepages.
      While it's scanning, IRQs are disabled on the mistaken assumption the
      scanning should be short.  Tests show this to be true for the most part
      but contention times on the LRU lock can be increased.  Before this patch,
      the IRQ disabled times for a simple test looked like
      
        Total sampled time IRQs off (not real total time): 5493
        Event shrink_inactive_list..shrink_zone                  1596 us count 1
        Event shrink_inactive_list..shrink_zone                  1530 us count 1
        Event shrink_inactive_list..shrink_zone                   956 us count 1
        Event shrink_inactive_list..shrink_zone                   541 us count 1
        Event shrink_inactive_list..shrink_zone                   531 us count 1
        Event split_huge_page..add_to_swap                        232 us count 1
        Event save_args..call_softirq                              36 us count 1
        Eve...
      b2eef8c0
    • Mel Gorman's avatar
      mm: compaction: minimise the time IRQs are disabled while isolating free pages · 602605a4
      Mel Gorman authored
      compaction_alloc() isolates free pages to be used as migration targets.
      While its scanning, IRQs are disabled on the mistaken assumption the
      scanning should be short.  Analysis showed that IRQs were in fact being
      disabled for substantial time.  A simple test was run using large
      anonymous mappings with transparent hugepage support enabled to trigger
      frequent compactions.  A monitor sampled what the worst IRQ-off latencies
      were and a post-processing tool found the following;
      
        Total sampled time IRQs off (not real total time): 22355
        Event compaction_alloc..compaction_alloc                 8409 us count 1
        Event compaction_alloc..compaction_alloc                 7341 us count 1
        Event compaction_alloc..compaction_alloc                 2463 us count 1
        Event compaction_alloc..compaction_alloc                 2054 us count 1
        Event shrink_inactive_list..shrink_zone                  1864 us count 1
        Event shrink_inactive_list..shrink_zone                    88 us count 1
        Event save_args..call_softirq                              36 us count 1
        Event save_args..call_softirq                              35 us count 2
        Event __make_request..__blk_run_queue                      24 us count 1
        Event __alloc_pages_nodemask..__alloc_pages_nodemask        6 us count 1
      
      i.e.  compaction is disabled IRQs for a prolonged period of time - 8ms in
      one instance.  The full report generated by the tool can be found at
      
       http://www.csn.ul.ie/~mel/postings/minfree-20110225/irqsoff-vanilla-micro.report
      
      This patch reduces the time IRQs are disabled by simply disabling IRQs at
      the last possible minute.  An updated IRQs-off summary report then looks
      like;
      
        Total sampled time IRQs off (not real total time): 5493
        Event shrink_inactive_list..shrink_zone                  1596 us count 1
        Event shrink_inactive_list..shrink_zone                  1530 us count 1
        Event shrink_inactive_list..shrink_zone                   956 us count 1
        Event shrink_inactive_list..shrink_zone                   541 us count 1
        Event shrink_inactive_list..shrink_zone                   531 us count 1
        Event split_huge_page..add_to_swap                        232 us count 1
        Event save_args..call_softirq                              36 us count 1
        Event save_args..call_softirq                              35 us count 2
        Event __wake_up..__wake_up                                  1 us count 1
      
      A full report is again available at
      
        http://www.csn.ul.ie/~mel/postings/minfree-20110225/irqsoff-minimiseirq-free-v1r4-micro.report
      
      
      
      As should be obvious, IRQ disabled latencies due to compaction are
      almost elimimnated for this particular test.
      
      [aarcange@redhat.com: Fix initialisation of isolated]
      Signed-off-by: default avatarMel Gorman <mel@csn.ul.ie>
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Reviewed-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujisu.com>
      Reviewed-by: default avatarMinchan Kim <minchan.kim@gmail.com>
      Acked-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
      Cc: Arthur Marsh <arthur.marsh@internode.on.net>
      Cc: Clemens Ladisch <cladisch@googlemail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      602605a4
    • Minchan Kim's avatar
      mm/compaction: check migrate_pages's return value instead of list_empty() · 9d502c1c
      Minchan Kim authored
      Many migrate_page's caller check return value instead of list_empy by
      cf608ac1
      
       ("mm: compaction: fix COMPACTPAGEFAILED counting").  This patch
      makes compaction's migrate_pages consistent with others.  This patch
      should not change old behavior.
      Signed-off-by: default avatarMinchan Kim <minchan.kim@gmail.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Christoph Lameter <cl@linux.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9d502c1c
    • Andrea Arcangeli's avatar
      mm: compaction: prevent kswapd compacting memory to reduce CPU usage · d527caf2
      Andrea Arcangeli authored
      This patch reverts 5a03b051 ("thp: use compaction in kswapd for GFP_ATOMIC
      order > 0") due to reports stating that kswapd CPU usage was higher and
      IRQs were being disabled more frequently.  This was reported at
      http://www.spinics.net/linux/fedora/alsa-user/msg09885.html.
      
      Without this patch applied, CPU usage by kswapd hovers around the 20% mark
      according to the tester (Arthur Marsh:
      http://www.spinics.net/linux/fedora/alsa-user/msg09899.html).  With this
      patch applied, it's around 2%.
      
      The problem is not related to THP which specifies __GFP_NO_KSWAPD but is
      triggered by high-order allocations hitting the low watermark for their
      order and waking kswapd on kernels with CONFIG_COMPACTION set.  The most
      common trigger for this is network cards configured for jumbo frames but
      it's also possible it'll be triggered by fork-heavy workloads (order-1)
      and some wireless cards which depend on order-1 allocations.
      
      The symptoms for the user will be ...
      d527caf2
  4. 21 Jan, 2011 1 commit
  5. 14 Jan, 2011 8 commits
  6. 23 Dec, 2010 1 commit
  7. 10 Sep, 2010 1 commit
  8. 25 May, 2010 5 commits