aboutsummaryrefslogtreecommitdiff
path: root/sys/mips
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2018-02-20 10:13:13 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2018-02-20 10:13:13 +0000
commit2c0f13aa59d231f43cf33b10fe2c0e8b11e4942d (patch)
tree924b5bbfaa1bf2cd47ffb5a6554b44254a35d161 /sys/mips
parentf32ebdc85c52bb788024e0511716013adda4e5f2 (diff)
downloadsrc-2c0f13aa59d231f43cf33b10fe2c0e8b11e4942d.tar.gz
src-2c0f13aa59d231f43cf33b10fe2c0e8b11e4942d.zip
vm_wait() rework.
Make vm_wait() take the vm_object argument which specifies the domain set to wait for the min condition pass. If there is no object associated with the wait, use curthread' policy domainset. The mechanics of the wait in vm_wait() and vm_wait_domain() is supplied by the new helper vm_wait_doms(), which directly takes the bitmask of the domains to wait for passing min condition. Eliminate pagedaemon_wait(). vm_domain_clear() handles the same operations. Eliminate VM_WAIT and VM_WAITPFAULT macros, the direct functions calls are enough. Eliminate several control state variables from vm_domain, unneeded after the vm_wait() conversion. Scetched and reviewed by: jeff Tested by: pho Sponsored by: The FreeBSD Foundation, Mellanox Technologies Differential revision: https://reviews.freebsd.org/D14384
Notes
Notes: svn path=/head/; revision=329636
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/mips/pmap.c4
-rw-r--r--sys/mips/mips/uma_machdep.c10
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c
index 4df99fdd66fb..387661d429a6 100644
--- a/sys/mips/mips/pmap.c
+++ b/sys/mips/mips/pmap.c
@@ -1050,11 +1050,11 @@ pmap_grow_direct_page(int req)
{
#ifdef __mips_n64
- VM_WAIT;
+ vm_wait(NULL);
#else
if (!vm_page_reclaim_contig(req, 1, 0, MIPS_KSEG0_LARGEST_PHYS,
PAGE_SIZE, 0))
- VM_WAIT;
+ vm_wait(NULL);
#endif
}
diff --git a/sys/mips/mips/uma_machdep.c b/sys/mips/mips/uma_machdep.c
index eb97ea1887fe..917e5a085ebd 100644
--- a/sys/mips/mips/uma_machdep.c
+++ b/sys/mips/mips/uma_machdep.c
@@ -67,13 +67,11 @@ uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags,
0, MIPS_KSEG0_LARGEST_PHYS, PAGE_SIZE, 0))
continue;
#endif
- if (m == NULL) {
- if (wait & M_NOWAIT)
- return (NULL);
- else
- VM_WAIT;
- } else
+ if (m != NULL)
break;
+ if ((wait & M_NOWAIT) != 0)
+ return (NULL);
+ vm_wait(NULL);
}
pa = VM_PAGE_TO_PHYS(m);