Eliminate spurious "Approaching the limit on PV entries, ..."

warnings.  Specifically, whenever vm_page_alloc(9) returned NULL to
get_pv_entry(), we issued a warning regardless of the number of pv
entries in use.  (Note: The older pv entry allocator in RELENG_6 does
not have this problem.)

Reported by:	Jeremy Chadwick

Eliminate the direct call to pagedaemon_wakeup() by get_pv_entry().
This was a holdover from earlier times when the page daemon was
responsible for the reclamation of pv entries.

MFC after: 5 days
This commit is contained in:
alc 2007-11-03 05:15:26 +00:00
parent 274f85e40e
commit 1fd60b45c3
2 changed files with 8 additions and 11 deletions

View File

@ -1732,7 +1732,10 @@ get_pv_entry(pmap_t pmap, int try)
PV_STAT(pv_entry_allocs++);
pv_entry_count++;
if (pv_entry_count > pv_entry_high_water)
pagedaemon_wakeup();
if (ratecheck(&lastprint, &printinterval))
printf("Approaching the limit on PV entries, consider "
"increasing either the vm.pmap.shpgperproc or the "
"vm.pmap.pv_entry_max sysctl.\n");
pc = TAILQ_FIRST(&pmap->pm_pvchunk);
if (pc != NULL) {
for (field = 0; field < _NPCM; field++) {
@ -1767,10 +1770,6 @@ get_pv_entry(pmap_t pmap, int try)
* pages. After that, if a pv chunk entry is still needed,
* destroy mappings to active pages.
*/
if (ratecheck(&lastprint, &printinterval))
printf("Approaching the limit on PV entries, consider "
"increasing sysctl vm.pmap.shpgperproc or "
"vm.pmap.pv_entry_max\n");
PV_STAT(pmap_collect_inactive++);
pmap_collect(pmap, &vm_page_queues[PQ_INACTIVE]);
m = vm_page_alloc(NULL, colour,

View File

@ -1805,7 +1805,10 @@ get_pv_entry(pmap_t pmap, int try)
PV_STAT(pv_entry_allocs++);
pv_entry_count++;
if (pv_entry_count > pv_entry_high_water)
pagedaemon_wakeup();
if (ratecheck(&lastprint, &printinterval))
printf("Approaching the limit on PV entries, consider "
"increasing either the vm.pmap.shpgperproc or the "
"vm.pmap.pv_entry_max tunable.\n");
pc = TAILQ_FIRST(&pmap->pm_pvchunk);
if (pc != NULL) {
for (field = 0; field < _NPCM; field++) {
@ -1851,11 +1854,6 @@ get_pv_entry(pmap_t pmap, int try)
* inactive pages. After that, if a pv chunk entry
* is still needed, destroy mappings to active pages.
*/
if (ratecheck(&lastprint, &printinterval))
printf("Approaching the limit on PV entries, "
"consider increasing tunables "
"vm.pmap.shpgperproc or "
"vm.pmap.pv_entry_max\n");
PV_STAT(pmap_collect_inactive++);
pmap_collect(pmap, &vm_page_queues[PQ_INACTIVE]);
if (m == NULL)