diff options
author | 2011-06-23 21:54:56 +0000 | |
---|---|---|
committer | 2011-06-23 21:54:56 +0000 | |
commit | 28103a2a615f0795c1adc1e04b81e643a5f4e82c (patch) | |
tree | 76fe8a2e17c02ca6fac04092f7ac9635ea781abe /sys | |
parent | Replace handrolled version of uvmfault_unlockmaps with uvmfault_unlockmaps. (diff) | |
download | wireguard-openbsd-28103a2a615f0795c1adc1e04b81e643a5f4e82c.tar.xz wireguard-openbsd-28103a2a615f0795c1adc1e04b81e643a5f4e82c.zip |
Don't bother checking for an empty queue before calling uvm_pglistfree.
It will handle an empty list just fine (there's a small optimisation
possible here to avoid grabbing the fpageqlock if no pages need freeing,
but that is definitely another diff)
ok ariane@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/uvm/uvm_km.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/uvm/uvm_km.c b/sys/uvm/uvm_km.c index f3af1016803..24017d5811f 100644 --- a/sys/uvm/uvm_km.c +++ b/sys/uvm/uvm_km.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_km.c,v 1.104 2011/06/23 21:42:05 ariane Exp $ */ +/* $OpenBSD: uvm_km.c,v 1.105 2011/06/23 21:54:56 oga Exp $ */ /* $NetBSD: uvm_km.c,v 1.42 2001/01/14 02:10:01 thorpej Exp $ */ /* @@ -930,8 +930,7 @@ alloc_va: while (uvm_km_pages.free == 0) { if (kd->kd_waitok == 0) { mtx_leave(&uvm_km_pages.mtx); - if (!TAILQ_EMPTY(&pgl)) - uvm_pglistfree(&pgl); + uvm_pglistfree(&pgl); return NULL; } msleep(&uvm_km_pages.free, &uvm_km_pages.mtx, PVM, @@ -964,8 +963,7 @@ try_map: tsleep(map, PVM, "km_allocva", 0); goto try_map; } - if (!TAILQ_EMPTY(&pgl)) - uvm_pglistfree(&pgl); + uvm_pglistfree(&pgl); return (NULL); } } |