Skip to content
  • Christoph Lameter's avatar
    [PATCH] add schedule_on_each_cpu() · 15316ba8
    Christoph Lameter authored
    
    
    swap migration's isolate_lru_page() currently uses an IPI to notify other
    processors that the lru caches need to be drained if the page cannot be
    found on the LRU.  The IPI interrupt may interrupt a processor that is just
    processing lru requests and cause a race condition.
    
    This patch introduces a new function run_on_each_cpu() that uses the
    keventd() to run the LRU draining on each processor.  Processors disable
    preemption when dealing the LRU caches (these are per processor) and thus
    executing LRU draining from another process is safe.
    
    Thanks to Lee Schermerhorn <lee.schermerhorn@hp.com> for finding this race
    condition.
    
    Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    15316ba8