mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
o Use vm_page_alloc(... | VM_ALLOC_WIRED) in place of vm_page_wire().
This commit is contained in:
parent
5113446a35
commit
4aca0b1510
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100378
@ -1523,15 +1523,13 @@ pmap_growkernel(vm_offset_t addr)
|
||||
/*
|
||||
* This index is bogus, but out of the way
|
||||
*/
|
||||
nkpg = vm_page_alloc(kptobj, nkpt, VM_ALLOC_SYSTEM);
|
||||
nkpg = vm_page_alloc(kptobj, nkpt,
|
||||
VM_ALLOC_SYSTEM | VM_ALLOC_WIRED);
|
||||
if (!nkpg)
|
||||
panic("pmap_growkernel: no memory to grow kernel");
|
||||
|
||||
nkpt++;
|
||||
|
||||
vm_page_lock_queues();
|
||||
vm_page_wire(nkpg);
|
||||
vm_page_unlock_queues();
|
||||
pmap_zero_page(nkpg);
|
||||
ptppaddr = VM_PAGE_TO_PHYS(nkpg);
|
||||
newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M);
|
||||
|
@ -1523,15 +1523,13 @@ pmap_growkernel(vm_offset_t addr)
|
||||
/*
|
||||
* This index is bogus, but out of the way
|
||||
*/
|
||||
nkpg = vm_page_alloc(kptobj, nkpt, VM_ALLOC_SYSTEM);
|
||||
nkpg = vm_page_alloc(kptobj, nkpt,
|
||||
VM_ALLOC_SYSTEM | VM_ALLOC_WIRED);
|
||||
if (!nkpg)
|
||||
panic("pmap_growkernel: no memory to grow kernel");
|
||||
|
||||
nkpt++;
|
||||
|
||||
vm_page_lock_queues();
|
||||
vm_page_wire(nkpg);
|
||||
vm_page_unlock_queues();
|
||||
pmap_zero_page(nkpg);
|
||||
ptppaddr = VM_PAGE_TO_PHYS(nkpg);
|
||||
newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M);
|
||||
|
@ -2693,13 +2693,13 @@ allocbuf(struct buf *bp, int size)
|
||||
* with paging I/O, no matter which
|
||||
* process we are.
|
||||
*/
|
||||
m = vm_page_alloc(obj, pi, VM_ALLOC_SYSTEM);
|
||||
m = vm_page_alloc(obj, pi,
|
||||
VM_ALLOC_SYSTEM | VM_ALLOC_WIRED);
|
||||
if (m == NULL) {
|
||||
VM_WAIT;
|
||||
vm_pageout_deficit += desiredpages - bp->b_npages;
|
||||
} else {
|
||||
vm_page_lock_queues();
|
||||
vm_page_wire(m);
|
||||
vm_page_wakeup(m);
|
||||
vm_page_unlock_queues();
|
||||
bp->b_flags &= ~B_CACHE;
|
||||
@ -3352,14 +3352,13 @@ vm_hold_load_pages(struct buf * bp, vm_offset_t from, vm_offset_t to)
|
||||
*/
|
||||
p = vm_page_alloc(kernel_object,
|
||||
((pg - VM_MIN_KERNEL_ADDRESS) >> PAGE_SHIFT),
|
||||
VM_ALLOC_SYSTEM);
|
||||
VM_ALLOC_SYSTEM | VM_ALLOC_WIRED);
|
||||
if (!p) {
|
||||
vm_pageout_deficit += (to - from) >> PAGE_SHIFT;
|
||||
VM_WAIT;
|
||||
goto tryagain;
|
||||
}
|
||||
vm_page_lock_queues();
|
||||
vm_page_wire(p);
|
||||
p->valid = VM_PAGE_BITS_ALL;
|
||||
vm_page_flag_clear(p, PG_ZERO);
|
||||
vm_page_unlock_queues();
|
||||
|
Loading…
Reference in New Issue
Block a user