Make the page daemon's notion of what kind of pass is being performed
by vm_pageout_scan() local to vm_pageout_worker(). There is no reason to store the pass in the NUMA domain structure. Reviewed by: kib MFC after: 3 weeks
This commit is contained in:
parent
f30cad3355
commit
70cf3ced3c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=306712
@ -394,7 +394,6 @@ vm_page_domain_init(struct vm_domain *vmd)
|
||||
vmd->vmd_free_count = 0;
|
||||
vmd->vmd_segs = 0;
|
||||
vmd->vmd_oom = FALSE;
|
||||
vmd->vmd_pass = 0;
|
||||
for (i = 0; i < PQ_COUNT; i++) {
|
||||
pq = &vmd->vmd_pagequeues[i];
|
||||
TAILQ_INIT(&pq->pq_pl);
|
||||
@ -3928,14 +3927,12 @@ DB_SHOW_COMMAND(pageq, vm_page_print_pageq_info)
|
||||
db_printf("pq_free %d pq_cache %d\n",
|
||||
vm_cnt.v_free_count, vm_cnt.v_cache_count);
|
||||
for (dom = 0; dom < vm_ndomains; dom++) {
|
||||
db_printf(
|
||||
"dom %d page_cnt %d free %d pq_act %d pq_inact %d pass %d\n",
|
||||
db_printf("dom %d page_cnt %d free %d pq_act %d pq_inact %d\n",
|
||||
dom,
|
||||
vm_dom[dom].vmd_page_count,
|
||||
vm_dom[dom].vmd_free_count,
|
||||
vm_dom[dom].vmd_pagequeues[PQ_ACTIVE].pq_cnt,
|
||||
vm_dom[dom].vmd_pagequeues[PQ_INACTIVE].pq_cnt,
|
||||
vm_dom[dom].vmd_pass);
|
||||
vm_dom[dom].vmd_pagequeues[PQ_INACTIVE].pq_cnt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -226,7 +226,6 @@ struct vm_domain {
|
||||
u_int vmd_free_count;
|
||||
long vmd_segs; /* bitmask of the segments */
|
||||
boolean_t vmd_oom;
|
||||
int vmd_pass; /* local pagedaemon pass */
|
||||
int vmd_oom_seq;
|
||||
int vmd_last_active_scan;
|
||||
struct vm_page vmd_marker; /* marker for pagedaemon private use */
|
||||
|
@ -1509,11 +1509,12 @@ static void
|
||||
vm_pageout_worker(void *arg)
|
||||
{
|
||||
struct vm_domain *domain;
|
||||
int domidx;
|
||||
int domidx, pass;
|
||||
bool target_met;
|
||||
|
||||
domidx = (uintptr_t)arg;
|
||||
domain = &vm_dom[domidx];
|
||||
pass = 0;
|
||||
target_met = true;
|
||||
|
||||
/*
|
||||
@ -1575,9 +1576,9 @@ vm_pageout_worker(void *arg)
|
||||
* and try again later.
|
||||
*/
|
||||
mtx_unlock(&vm_page_queue_free_mtx);
|
||||
if (domain->vmd_pass > 1)
|
||||
if (pass > 1)
|
||||
pause("psleep", hz / 2);
|
||||
domain->vmd_pass++;
|
||||
pass++;
|
||||
} else {
|
||||
/*
|
||||
* Yes. Sleep until pages need to be reclaimed or
|
||||
@ -1587,12 +1588,12 @@ vm_pageout_worker(void *arg)
|
||||
&vm_page_queue_free_mtx, PDROP | PVM, "psleep",
|
||||
hz) == 0) {
|
||||
PCPU_INC(cnt.v_pdwakeups);
|
||||
domain->vmd_pass = 1;
|
||||
pass = 1;
|
||||
} else
|
||||
domain->vmd_pass = 0;
|
||||
pass = 0;
|
||||
}
|
||||
|
||||
target_met = vm_pageout_scan(domain, domain->vmd_pass);
|
||||
target_met = vm_pageout_scan(domain, pass);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user