Over the years, the amount of data we have stored in each process' U
area has eroded to the point where all we have left are the following:
- A struct kinfo_proc that is only used for a.out core dumps.
This can be reconstructed at the time of the core dump, so
it doesn't need to be there.
- The struct pstats for the process, which takes a mere 216 bytes
In exchange for the ability to swap out this 216-byte structure, we
keep around a 4096-byte page, a 132-byte vm_object, and a couple of
pointers. Moreover, there is a small amount of runtime overhead
associated with this, and developers need to remember to PHOLD() and
PRELE() the process as appropriate.
I propose to remove the ability to swap the U area, allocating p_stats
from malloced memory instead. Medium-term scheduling and swapping of
kernel stacks would be retained. Here are the patches; !i386 testers