Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Feb 2002 10:03:02 -0800 (PST)
From:      Mike Silbersack <silby@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/alpha/alpha pmap.c src/sys/i386/i386 pmap.c src/sys/ia64/ia64 pmap.c src/sys/powerpc/powerpc pmap.c src/sys/sparc64/sparc64 pmap.c pv.c src/sys/vm pmap.h vm_pageout.c
Message-ID:  <200202271803.g1RI32Q35163@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
silby       2002/02/27 10:03:02 PST

  Modified files:
    sys/alpha/alpha      pmap.c 
    sys/i386/i386        pmap.c 
    sys/ia64/ia64        pmap.c 
    sys/powerpc/powerpc  pmap.c 
    sys/sparc64/sparc64  pmap.c pv.c 
    sys/vm               pmap.h vm_pageout.c 
  Log:
  Fix a horribly suboptimal algorithm in the vm_daemon.
  
  In order to determine what to page out, the vm_daemon checks
  reference bits on all pages belonging to all processes.  Unfortunately,
  the algorithm used reacted badly with shared pages; each shared page
  would be checked once per process sharing it; this caused an O(N^2)
  growth of tlb invalidations.  The algorithm has been changed so that
  each page will be checked only 16 times.
  
  Prior to this change, a fork/sleepbomb of 1300 processes could cause
  the vm_daemon to take over 60 seconds to complete, effectively
  freezing the system for that time period.  With this change
  in place, the vm_daemon completes in less than a second.  Any system
  with hundreds of processes sharing pages should benefit from this change.
  
  Note that the vm_daemon is only run when the system is under extreme
  memory pressure.  It is likely that many people with loaded systems saw
  no symptoms of this problem until they reached the point where swapping
  began.
  
  Special thanks go to dillon, peter, and Chuck Cranor, who helped me
  get up to speed with vm internals.
  
  PR:             33542, 20393
  Reviewed by:    dillon
  MFC after:      1 week
  
  Revision  Changes    Path
  1.84      +19 -5     src/sys/alpha/alpha/pmap.c
  1.316     +19 -8     src/sys/i386/i386/pmap.c
  1.44      +19 -6     src/sys/ia64/ia64/pmap.c
  1.14      +21 -1     src/sys/powerpc/powerpc/pmap.c
  1.35      +19 -2     src/sys/sparc64/sparc64/pmap.c
  1.11      +9 -0      src/sys/sparc64/sparc64/pv.c
  1.42      +2 -2      src/sys/vm/pmap.h
  1.189     +1 -1      src/sys/vm/vm_pageout.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202271803.g1RI32Q35163>