Explicitly initialize the page's queue field to PQ_NONE instead of relying
on PQ_NONE being zero. Redefine PQ_NONE and PQ_COUNT so that a page queue isn't allocated for PQ_NONE. Reviewed by: kib@
This commit is contained in:
parent
339c5f1730
commit
d326a38b4b
@ -318,6 +318,7 @@ dev_pager_getfake(vm_paddr_t paddr, vm_memattr_t memattr)
|
||||
|
||||
m = uma_zalloc(fakepg_zone, M_WAITOK | M_ZERO);
|
||||
m->phys_addr = paddr;
|
||||
m->queue = PQ_NONE;
|
||||
/* Fictitious pages don't use "segind". */
|
||||
m->flags = PG_FICTITIOUS;
|
||||
/* Fictitious pages don't use "order" or "pool". */
|
||||
|
@ -242,6 +242,7 @@ sg_pager_getfake(vm_paddr_t paddr, vm_memattr_t memattr)
|
||||
|
||||
m = uma_zalloc(fakepg_zone, M_WAITOK | M_ZERO);
|
||||
m->phys_addr = paddr;
|
||||
m->queue = PQ_NONE;
|
||||
/* Fictitious pages don't use "segind". */
|
||||
m->flags = PG_FICTITIOUS;
|
||||
/* Fictitious pages don't use "order" or "pool". */
|
||||
|
@ -146,11 +146,11 @@ struct vm_page {
|
||||
#define VPO_SWAPINPROG 0x0200 /* swap I/O in progress on page */
|
||||
#define VPO_NOSYNC 0x0400 /* do not collect for syncer */
|
||||
|
||||
#define PQ_NONE 0
|
||||
#define PQ_INACTIVE 1
|
||||
#define PQ_ACTIVE 2
|
||||
#define PQ_HOLD 3
|
||||
#define PQ_COUNT 4
|
||||
#define PQ_NONE 255
|
||||
#define PQ_INACTIVE 0
|
||||
#define PQ_ACTIVE 1
|
||||
#define PQ_HOLD 2
|
||||
#define PQ_COUNT 3
|
||||
|
||||
struct vpgqueues {
|
||||
struct pglist pl;
|
||||
|
@ -385,6 +385,7 @@ vm_phys_add_page(vm_paddr_t pa)
|
||||
cnt.v_page_count++;
|
||||
m = vm_phys_paddr_to_vm_page(pa);
|
||||
m->phys_addr = pa;
|
||||
m->queue = PQ_NONE;
|
||||
m->segind = vm_phys_paddr_to_segind(pa);
|
||||
m->flags = PG_FREE;
|
||||
KASSERT(m->order == VM_NFREEORDER,
|
||||
|
Loading…
Reference in New Issue
Block a user