git: kernel - Attempt to fix a rare vm_page_queues panic

Matthew Dillon dillon at crater.dragonflybsd.org
Fri Dec 27 21:44:44 PST 2013


commit bb0d60931c54c7121a931f0ebf915700feac863d
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Dec 27 21:37:42 2013 -0800

    kernel - Attempt to fix a rare vm_page_queues panic
    
    * Change the way the vm_page_t markers are used in the pageout daemon.
      The structures are not stable because they are declared on the stack,
      but the vm pageout scan functions were assuming that a TAILQ_NEXT()
      call would yield a stable vm_page_t structure that could then be locked
      with vm_page_and_queue_spin_lock().
    
    * Fix the problem by holding the appropriate vm_page_queues[] spinlock
      across the TAILQ_NEXT() lookup.
    
    * The panic could not be definitively traced to this issue so we will have
      to see if it reoccurs.
    
    * This also fixes a potential infinite marker hop-over case when multiple
      cpus are trying to scan the same queue at the same time.  However, it
      would be exceedingly rare for this case to actually occur since only
      the pageout and swapcache daemons could compete in this way.
    
    Reported-by: swildner

Summary of changes:
 sys/vm/vm_fault.c   |  10 ++++
 sys/vm/vm_page.c    |   2 +-
 sys/vm/vm_pageout.c | 153 ++++++++++++++++++++++++++--------------------------
 3 files changed, 86 insertions(+), 79 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bb0d60931c54c7121a931f0ebf915700feac863d


-- 
DragonFly BSD source repository



More information about the Commits mailing list