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
9a60aa347f
commit
0de72c67b8
@ -394,7 +394,6 @@ vm_page_domain_init(struct vm_domain *vmd)
|
|||||||
vmd->vmd_free_count = 0;
|
vmd->vmd_free_count = 0;
|
||||||
vmd->vmd_segs = 0;
|
vmd->vmd_segs = 0;
|
||||||
vmd->vmd_oom = FALSE;
|
vmd->vmd_oom = FALSE;
|
||||||
vmd->vmd_pass = 0;
|
|
||||||
for (i = 0; i < PQ_COUNT; i++) {
|
for (i = 0; i < PQ_COUNT; i++) {
|
||||||
pq = &vmd->vmd_pagequeues[i];
|
pq = &vmd->vmd_pagequeues[i];
|
||||||
TAILQ_INIT(&pq->pq_pl);
|
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",
|
db_printf("pq_free %d pq_cache %d\n",
|
||||||
vm_cnt.v_free_count, vm_cnt.v_cache_count);
|
vm_cnt.v_free_count, vm_cnt.v_cache_count);
|
||||||
for (dom = 0; dom < vm_ndomains; dom++) {
|
for (dom = 0; dom < vm_ndomains; dom++) {
|
||||||
db_printf(
|
db_printf("dom %d page_cnt %d free %d pq_act %d pq_inact %d\n",
|
||||||
"dom %d page_cnt %d free %d pq_act %d pq_inact %d pass %d\n",
|
|
||||||
dom,
|
dom,
|
||||||
vm_dom[dom].vmd_page_count,
|
vm_dom[dom].vmd_page_count,
|
||||||
vm_dom[dom].vmd_free_count,
|
vm_dom[dom].vmd_free_count,
|
||||||
vm_dom[dom].vmd_pagequeues[PQ_ACTIVE].pq_cnt,
|
vm_dom[dom].vmd_pagequeues[PQ_ACTIVE].pq_cnt,
|
||||||
vm_dom[dom].vmd_pagequeues[PQ_INACTIVE].pq_cnt,
|
vm_dom[dom].vmd_pagequeues[PQ_INACTIVE].pq_cnt);
|
||||||
vm_dom[dom].vmd_pass);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,7 +226,6 @@ struct vm_domain {
|
|||||||
u_int vmd_free_count;
|
u_int vmd_free_count;
|
||||||
long vmd_segs; /* bitmask of the segments */
|
long vmd_segs; /* bitmask of the segments */
|
||||||
boolean_t vmd_oom;
|
boolean_t vmd_oom;
|
||||||
int vmd_pass; /* local pagedaemon pass */
|
|
||||||
int vmd_oom_seq;
|
int vmd_oom_seq;
|
||||||
int vmd_last_active_scan;
|
int vmd_last_active_scan;
|
||||||
struct vm_page vmd_marker; /* marker for pagedaemon private use */
|
struct vm_page vmd_marker; /* marker for pagedaemon private use */
|
||||||
|
@ -1509,11 +1509,12 @@ static void
|
|||||||
vm_pageout_worker(void *arg)
|
vm_pageout_worker(void *arg)
|
||||||
{
|
{
|
||||||
struct vm_domain *domain;
|
struct vm_domain *domain;
|
||||||
int domidx;
|
int domidx, pass;
|
||||||
bool target_met;
|
bool target_met;
|
||||||
|
|
||||||
domidx = (uintptr_t)arg;
|
domidx = (uintptr_t)arg;
|
||||||
domain = &vm_dom[domidx];
|
domain = &vm_dom[domidx];
|
||||||
|
pass = 0;
|
||||||
target_met = true;
|
target_met = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1575,9 +1576,9 @@ vm_pageout_worker(void *arg)
|
|||||||
* and try again later.
|
* and try again later.
|
||||||
*/
|
*/
|
||||||
mtx_unlock(&vm_page_queue_free_mtx);
|
mtx_unlock(&vm_page_queue_free_mtx);
|
||||||
if (domain->vmd_pass > 1)
|
if (pass > 1)
|
||||||
pause("psleep", hz / 2);
|
pause("psleep", hz / 2);
|
||||||
domain->vmd_pass++;
|
pass++;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Yes. Sleep until pages need to be reclaimed or
|
* 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",
|
&vm_page_queue_free_mtx, PDROP | PVM, "psleep",
|
||||||
hz) == 0) {
|
hz) == 0) {
|
||||||
PCPU_INC(cnt.v_pdwakeups);
|
PCPU_INC(cnt.v_pdwakeups);
|
||||||
domain->vmd_pass = 1;
|
pass = 1;
|
||||||
} else
|
} else
|
||||||
domain->vmd_pass = 0;
|
pass = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
target_met = vm_pageout_scan(domain, domain->vmd_pass);
|
target_met = vm_pageout_scan(domain, pass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user