diff options
author | attilio <attilio@FreeBSD.org> | 2014-06-16 18:15:27 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2014-06-16 18:15:27 +0000 |
commit | 2802c525ad1ace89e32dfadc6121f67fcdd9132f (patch) | |
tree | 84adf2de9d1ba827bc45bbdc6f1e76f230319e94 /sys/dev/agp | |
parent | 4b840db0c44a4742d5d824c47328d0b1c89de43b (diff) | |
download | FreeBSD-src-2802c525ad1ace89e32dfadc6121f67fcdd9132f.zip FreeBSD-src-2802c525ad1ace89e32dfadc6121f67fcdd9132f.tar.gz |
- Modify vm_page_unwire() and vm_page_enqueue() to directly accept
the queue where to enqueue pages that are going to be unwired.
- Add stronger checks to the enqueue/dequeue for the pagequeues when
adding and removing pages to them.
Of course, for unmanaged pages the queue parameter of vm_page_unwire() will
be ignored, just as the active parameter today.
This makes adding new pagequeues quicker.
This change effectively modifies the KPI. __FreeBSD_version will be,
however, bumped just when the full cache of free pages will be
evicted.
Sponsored by: EMC / Isilon storage division
Reviewed by: alc
Tested by: pho
Diffstat (limited to 'sys/dev/agp')
-rw-r--r-- | sys/dev/agp/agp.c | 4 | ||||
-rw-r--r-- | sys/dev/agp/agp_i810.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index 5970943..9eed774 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -629,7 +629,7 @@ bad: if (k >= i) vm_page_xunbusy(m); vm_page_lock(m); - vm_page_unwire(m, 0); + vm_page_unwire(m, PQ_INACTIVE); vm_page_unlock(m); } VM_OBJECT_WUNLOCK(mem->am_obj); @@ -663,7 +663,7 @@ agp_generic_unbind_memory(device_t dev, struct agp_memory *mem) for (i = 0; i < mem->am_size; i += PAGE_SIZE) { m = vm_page_lookup(mem->am_obj, atop(i)); vm_page_lock(m); - vm_page_unwire(m, 0); + vm_page_unwire(m, PQ_INACTIVE); vm_page_unlock(m); } VM_OBJECT_WUNLOCK(mem->am_obj); diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c index 725aa99..dbf34e3 100644 --- a/sys/dev/agp/agp_i810.c +++ b/sys/dev/agp/agp_i810.c @@ -2009,7 +2009,7 @@ agp_i810_free_memory(device_t dev, struct agp_memory *mem) VM_OBJECT_WLOCK(mem->am_obj); m = vm_page_lookup(mem->am_obj, 0); vm_page_lock(m); - vm_page_unwire(m, 0); + vm_page_unwire(m, PQ_INACTIVE); vm_page_unlock(m); VM_OBJECT_WUNLOCK(mem->am_obj); } else { |