Shrink the size of struct vm_page on amd64 and i386 by eliminating

pv_list_count from struct md_page.  Ever since Peter rewrote the pv
entry allocator for amd64 and i386 pv_list_count has been correctly
maintained but otherwise unused.
This commit is contained in:
Alan Cox 2008-01-06 18:51:04 +00:00
parent 0c5de885eb
commit 5cccf58676
4 changed files with 0 additions and 16 deletions

View File

@ -614,7 +614,6 @@ pmap_page_init(vm_page_t m)
{
TAILQ_INIT(&m->md.pv_list);
m->md.pv_list_count = 0;
}
/*
@ -1699,7 +1698,6 @@ pmap_collect(pmap_t locked_pmap, struct vpgqueues *vpq)
TAILQ_REMOVE(&m->md.pv_list, pv, pv_list);
if (TAILQ_EMPTY(&m->md.pv_list))
vm_page_flag_clear(m, PG_WRITEABLE);
m->md.pv_list_count--;
free_pv_entry(pmap, pv);
if (pmap != locked_pmap)
PMAP_UNLOCK(pmap);
@ -1847,7 +1845,6 @@ pmap_remove_entry(pmap_t pmap, vm_page_t m, vm_offset_t va)
}
KASSERT(pv != NULL, ("pmap_remove_entry: pv not found"));
TAILQ_REMOVE(&m->md.pv_list, pv, pv_list);
m->md.pv_list_count--;
if (TAILQ_EMPTY(&m->md.pv_list))
vm_page_flag_clear(m, PG_WRITEABLE);
free_pv_entry(pmap, pv);
@ -1867,7 +1864,6 @@ pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m)
pv = get_pv_entry(pmap, FALSE);
pv->pv_va = va;
TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list);
m->md.pv_list_count++;
}
/*
@ -1884,7 +1880,6 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m)
(pv = get_pv_entry(pmap, TRUE)) != NULL) {
pv->pv_va = va;
TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list);
m->md.pv_list_count++;
return (TRUE);
} else
return (FALSE);
@ -2118,7 +2113,6 @@ pmap_remove_all(vm_page_t m)
pmap_invalidate_page(pmap, pv->pv_va);
pmap_free_zero_pages(free);
TAILQ_REMOVE(&m->md.pv_list, pv, pv_list);
m->md.pv_list_count--;
free_pv_entry(pmap, pv);
PMAP_UNLOCK(pmap);
}
@ -3045,7 +3039,6 @@ pmap_remove_pages(pmap_t pmap)
PV_STAT(pv_entry_spare++);
pv_entry_count--;
pc->pc_map[field] |= bitmask;
m->md.pv_list_count--;
TAILQ_REMOVE(&m->md.pv_list, pv, pv_list);
if (TAILQ_EMPTY(&m->md.pv_list))
vm_page_flag_clear(m, PG_WRITEABLE);

View File

@ -231,7 +231,6 @@ struct pv_entry;
struct pv_chunk;
struct md_page {
int pv_list_count;
TAILQ_HEAD(,pv_entry) pv_list;
};

View File

@ -518,7 +518,6 @@ pmap_page_init(vm_page_t m)
{
TAILQ_INIT(&m->md.pv_list);
m->md.pv_list_count = 0;
}
#ifdef PAE
@ -1752,7 +1751,6 @@ pmap_collect(pmap_t locked_pmap, struct vpgqueues *vpq)
TAILQ_REMOVE(&m->md.pv_list, pv, pv_list);
if (TAILQ_EMPTY(&m->md.pv_list))
vm_page_flag_clear(m, PG_WRITEABLE);
m->md.pv_list_count--;
free_pv_entry(pmap, pv);
if (pmap != locked_pmap)
PMAP_UNLOCK(pmap);
@ -1907,7 +1905,6 @@ pmap_remove_entry(pmap_t pmap, vm_page_t m, vm_offset_t va)
}
KASSERT(pv != NULL, ("pmap_remove_entry: pv not found"));
TAILQ_REMOVE(&m->md.pv_list, pv, pv_list);
m->md.pv_list_count--;
if (TAILQ_EMPTY(&m->md.pv_list))
vm_page_flag_clear(m, PG_WRITEABLE);
free_pv_entry(pmap, pv);
@ -1927,7 +1924,6 @@ pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m)
pv = get_pv_entry(pmap, FALSE);
pv->pv_va = va;
TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list);
m->md.pv_list_count++;
}
/*
@ -1944,7 +1940,6 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m)
(pv = get_pv_entry(pmap, TRUE)) != NULL) {
pv->pv_va = va;
TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list);
m->md.pv_list_count++;
return (TRUE);
} else
return (FALSE);
@ -2160,7 +2155,6 @@ pmap_remove_all(vm_page_t m)
pmap_invalidate_page(pmap, pv->pv_va);
pmap_free_zero_pages(free);
TAILQ_REMOVE(&m->md.pv_list, pv, pv_list);
m->md.pv_list_count--;
free_pv_entry(pmap, pv);
PMAP_UNLOCK(pmap);
}
@ -3128,7 +3122,6 @@ pmap_remove_pages(pmap_t pmap)
PV_STAT(pv_entry_spare++);
pv_entry_count--;
pc->pc_map[field] |= bitmask;
m->md.pv_list_count--;
TAILQ_REMOVE(&m->md.pv_list, pv, pv_list);
if (TAILQ_EMPTY(&m->md.pv_list))
vm_page_flag_clear(m, PG_WRITEABLE);

View File

@ -314,7 +314,6 @@ struct pv_entry;
struct pv_chunk;
struct md_page {
int pv_list_count;
TAILQ_HEAD(,pv_entry) pv_list;
};