diff options
author | alc <alc@FreeBSD.org> | 2004-04-24 20:53:55 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-04-24 20:53:55 +0000 |
commit | 106fdfcb2b41f5994fcce7d63193060ddf3fd6ec (patch) | |
tree | b1edd1c09e5fbd01f822423350dbe7bf2ca92c4a /sys/dev/agp/agp.c | |
parent | abc6dc77728ccca216d89be00cb15898f75de565 (diff) | |
download | FreeBSD-src-106fdfcb2b41f5994fcce7d63193060ddf3fd6ec.zip FreeBSD-src-106fdfcb2b41f5994fcce7d63193060ddf3fd6ec.tar.gz |
Push down the responsibility for zeroing a physical page from the
caller to vm_page_grab(). Although this gives VM_ALLOC_ZERO a
different meaning for vm_page_grab() than for vm_page_alloc(), I feel
such change is necessary to accomplish other goals. Specifically, I
want to make the PG_ZERO flag immutable between the time it is
allocated by vm_page_alloc() and freed by vm_page_free() or
vm_page_free_zero() to avoid locking overheads. Once we gave up on
the ability to automatically recognize a zeroed page upon entry to
vm_page_free(), the ability to mutate the PG_ZERO flag became useless.
Instead, I would like to say that "Once a page becomes valid, its
PG_ZERO flag must be ignored."
Diffstat (limited to 'sys/dev/agp/agp.c')
-rw-r--r-- | sys/dev/agp/agp.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index fc4fd1f..f507aa6 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -524,8 +524,6 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem, m = vm_page_grab(mem->am_obj, OFF_TO_IDX(i), VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_RETRY); VM_OBJECT_UNLOCK(mem->am_obj); - if ((m->flags & PG_ZERO) == 0) - pmap_zero_page(m); AGP_DPF("found page pa=%#x\n", VM_PAGE_TO_PHYS(m)); /* |