From f4bf87a056265d2c693a86c38637c766bffa114f Mon Sep 17 00:00:00 2001 From: alc Date: Sun, 24 Oct 2004 07:31:07 +0000 Subject: [PATCH] Use VM_ALLOC_NOBUSY to eliminate an unneeded vm_page_wakeup() call and the synchronization that one entails. --- sys/dev/agp/agp_i810.c | 5 +---- sys/pci/agp_i810.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c index 37c033d8c94e..14ecfb2a688d 100644 --- a/sys/dev/agp/agp_i810.c +++ b/sys/dev/agp/agp_i810.c @@ -609,13 +609,10 @@ agp_i810_alloc_memory(device_t dev, int type, vm_size_t size) vm_page_t m; VM_OBJECT_LOCK(mem->am_obj); - m = vm_page_grab(mem->am_obj, 0, + m = vm_page_grab(mem->am_obj, 0, VM_ALLOC_NOBUSY | VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_RETRY); VM_OBJECT_UNLOCK(mem->am_obj); - vm_page_lock_queues(); mem->am_physical = VM_PAGE_TO_PHYS(m); - vm_page_wakeup(m); - vm_page_unlock_queues(); } else { mem->am_physical = 0; } diff --git a/sys/pci/agp_i810.c b/sys/pci/agp_i810.c index 37c033d8c94e..14ecfb2a688d 100644 --- a/sys/pci/agp_i810.c +++ b/sys/pci/agp_i810.c @@ -609,13 +609,10 @@ agp_i810_alloc_memory(device_t dev, int type, vm_size_t size) vm_page_t m; VM_OBJECT_LOCK(mem->am_obj); - m = vm_page_grab(mem->am_obj, 0, + m = vm_page_grab(mem->am_obj, 0, VM_ALLOC_NOBUSY | VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_RETRY); VM_OBJECT_UNLOCK(mem->am_obj); - vm_page_lock_queues(); mem->am_physical = VM_PAGE_TO_PHYS(m); - vm_page_wakeup(m); - vm_page_unlock_queues(); } else { mem->am_physical = 0; }