Skip to content
  • Huang Ying's avatar
    autonuma: reduce cache footprint when scanning page tables · a818f536
    Huang Ying authored
    In auto NUMA balancing page table scanning, if the pte_protnone() is
    true, the PTE needs not to be changed because it's in target state
    already.  So other checking on corresponding struct page is unnecessary
    too.
    
    So, if we check pte_protnone() firstly for each PTE, we can avoid
    unnecessary struct page accessing, so that reduce the cache footprint of
    NUMA balancing page table scanning.
    
    In the performance test of pmbench memory accessing benchmark with 80:20
    read/write ratio and normal access address distribution on a 2 socket
    Intel server with Optance DC Persistent Memory, perf profiling shows
    that the autonuma page table scanning time reduces from 1.23% to 0.97%
    (that is, reduced 21%) with the patch.
    
    Link: http://lkml.kernel.org/r/20191101075727.26683-3-ying.huang@intel.com
    
    
    Signed-off-by: default avatar"Huang, Ying" <ying.huang@intel.com>
    Acked-by: default avatarMel Gorman <mgorman@suse.de>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Fengguang Wu <fengguang.wu@intel.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    a818f536