kernel - Implement segment pmap optimizations for x86-64 (6)
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 15 Sep 2012 06:44:10 +0000 (23:44 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 15 Sep 2012 06:44:10 +0000 (23:44 -0700)
commit9df83100521ca0fada8656eb660477876ab81c58
tree12c1f0974dc137933a2b34719bad30b7c6c7c0a7
parent9e8c80c3ca1c664f299a41b930a38e4d87e3a4fd
kernel - Implement segment pmap optimizations for x86-64 (6)

* Improve process exit.  When the last process referencing a shared
  anonymous memory VM object exits the kernel destroys the object
  and its shared pmap.

  Removal of pages from the shared pmap was causing the system to IPI
  EVERY cpu for EACH pte.  Needless to say this caused a process to take
  ~2 minutes to remove a ~6GB shared segment.  Optimize this case by
  not bothering the do the IPI/invlpg invalidations since the pmap is not
  actually active.

* This also applies to any exiting process.  When cleaning out the pmap
  we no longer invlpg each pte, since nobody is referencing the pmap except
  the current thread in the kernel doing the exit.  It will simply issue
  a cpu_invltlb() when it is all done.
sys/platform/pc64/x86_64/pmap.c