OpenBSD CVS

CVS log for src/usr.bin/vmstat/vmstat.c


[BACK] Up to [local] / src / usr.bin / vmstat

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: HEAD


Revision 1.158 / (download) - annotate - [select for diffs], Wed May 1 12:54:27 2024 UTC (5 weeks, 5 days ago) by mpi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.157: +6 -1 lines
Diff to previous 1.157 (colored)

Add per-CPU caches to the pmemrange allocator.

The caches are used primarily to reduce contention on uvm_lock_fpageq() during
concurrent page faults.  For the moment only uvm_pagealloc() tries to get a
page from the current CPU's cache.  So on some architectures the caches are
also used by the pmap layer.

Each cache is composed of two magazines, design is borrowed from jeff bonwick
vmem's paper and the implementation is similar to the one of pool_cache from
dlg@.  However there is no depot layer and magazines are refilled directly by
the pmemrange allocator.

This version includes splvm()/splx() dances because the buffer cache flips
buffers in interrupt context.  So we have to prevent recursive accesses to
per-CPU magazines.

Tested by naddy@, solene@, krw@, robert@, claudio@ and Laurence Tratt.

ok claudio@, kettenis@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.