cvs commit: src/sys/vm swap_pager.c

David Schultz das at FreeBSD.org
Fri Nov 5 23:17:50 PST 2004


das         2004-11-06 07:17:50 UTC

  FreeBSD src repository

  Modified files:
    sys/vm               swap_pager.c 
  Log:
  Fix the last known race in swapoff(), which could lead to a spurious panic:
  
          swapoff: failed to locate %d swap blocks
  
  The race occurred because putpages() can block between the time it
  allocates swap space and the time it updates the swap metadata to
  associate that space with a vm_object, so swapoff() would complain
  about the temporary inconsistency.  I hoped to fix this by making
  swp_pager_getswapspace() and swp_pager_meta_build() a single atomic
  operation, but that proved to be inconvenient.  With this change,
  swapoff() simply doesn't attempt to be so clever about detecting when
  all the pageout activity to the target device should have drained.
  
  Revision  Changes    Path
  1.264     +14 -21    src/sys/vm/swap_pager.c


More information about the cvs-all mailing list