cvs commit: src/sys/fs/procfs procfs_ctl.c src/sys/sys proc.h src/sys/vm vm_glue.c

John Baldwin jhb at FreeBSD.org
Tue Apr 22 13:00:27 PDT 2003


jhb         2003/04/22 13:00:26 PDT

  FreeBSD src repository

  Modified files:
    sys/fs/procfs        procfs_ctl.c 
    sys/sys              proc.h 
    sys/vm               vm_glue.c 
  Log:
  - Always call faultin() in _PHOLD() if PS_INMEM is clear.  This closes a
    race where a thread could assume that a process was swapped in by
    PHOLD() when it actually wasn't fully swapped in yet.
  - In faultin(), always msleep() if PS_SWAPPINGIN is set instead of doing
    this check after bumping p_lock in the PS_INMEM == 0 case.  Also,
    sched_lock is only needed for setting and clearning swapping PS_*
    flags and the swap thread inhibitor.
  - Don't set and clear the thread swap inhibitor in the same loops as the
    pmap_swapin/out_thread() since we have to do it under sched_lock.
    Instead, mimic the treatment of the PS_INMEM flag and use separate loops
    to set the inhibitors when clearing PS_INMEM and clear the inhibitors
    when setting PS_INMEM.
  - swapout() now returns with the proc lock held as it holds the lock
    while adjusting the swapping-related PS_* flags so that the proc lock
    can be used to test those flags.
  - Only use the proc lock to check the swapping-related PS_* flags in
    several places.
  - faultin() no longer requires sched_lock to be held by callers.
  - Rename PS_SWAPPING to PS_SWAPPINGOUT to be less ambiguous now that we
    have PS_SWAPPINGIN.
  
  Revision  Changes    Path
  1.50      +0 -2      src/sys/fs/procfs/procfs_ctl.c
  1.320     +4 -6      src/sys/sys/proc.h
  1.166     +36 -42    src/sys/vm/vm_glue.c


More information about the cvs-src mailing list