Page MenuHomeFreeBSD

D45920.1794710550.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D45920.1794710550.diff

diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -5595,8 +5595,7 @@
pv = &pc->pc_pventry[field * 64 + bit];
pc->pc_map[field] &= ~(1ul << bit);
/* If this was the last item, move it to tail */
- if (pc->pc_map[0] == 0 && pc->pc_map[1] == 0 &&
- pc->pc_map[2] == 0) {
+ if (pc_is_full(pc)) {
TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list);
TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc,
pc_list);
@@ -5807,8 +5806,7 @@
va_last = va + NBPDR - PAGE_SIZE;
for (;;) {
pc = TAILQ_FIRST(&pmap->pm_pvchunk);
- KASSERT(pc->pc_map[0] != 0 || pc->pc_map[1] != 0 ||
- pc->pc_map[2] != 0, ("pmap_pv_demote_pde: missing spare"));
+ KASSERT(!pc_is_full(pc), ("pmap_pv_demote_pde: missing spare"));
for (field = 0; field < _NPCM; field++) {
while (pc->pc_map[field]) {
bit = bsfq(pc->pc_map[field]);
@@ -5829,7 +5827,7 @@
TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list);
}
out:
- if (pc->pc_map[0] == 0 && pc->pc_map[1] == 0 && pc->pc_map[2] == 0) {
+ if (pc_is_full(pc)) {
TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list);
TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 15, 2:42 AM (3 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41736382
Default Alt Text
D45920.1794710550.diff (1 KB)

Event Timeline