summaryrefslogtreecommitdiffstats
path: root/sys/dev/agp
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-04-24 20:53:55 +0000
committeralc <alc@FreeBSD.org>2004-04-24 20:53:55 +0000
commit106fdfcb2b41f5994fcce7d63193060ddf3fd6ec (patch)
treeb1edd1c09e5fbd01f822423350dbe7bf2ca92c4a /sys/dev/agp
parentabc6dc77728ccca216d89be00cb15898f75de565 (diff)
downloadFreeBSD-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')
-rw-r--r--sys/dev/agp/agp.c2
-rw-r--r--sys/dev/agp/agp_i810.c2
2 files changed, 0 insertions, 4 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));
/*
diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c
index 9210247..30aca50 100644
--- a/sys/dev/agp/agp_i810.c
+++ b/sys/dev/agp/agp_i810.c
@@ -612,8 +612,6 @@ agp_i810_alloc_memory(device_t dev, int type, vm_size_t size)
m = vm_page_grab(mem->am_obj, 0,
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);
vm_page_lock_queues();
mem->am_physical = VM_PAGE_TO_PHYS(m);
vm_page_wakeup(m);
OpenPOWER on IntegriCloud