Fix build on head after vm_pageout_grow_cache() removal.
PR: 205452
This commit is contained in:
parent
4ef6b96ba0
commit
fa499a197d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=404195
1 changed files with 13 additions and 10 deletions
|
@ -7,9 +7,9 @@ From Alan L. Cox on FreeBSD-current:
|
|||
answer that question.
|
||||
|
||||
[1] http://lists.freebsd.org/pipermail/freebsd-current/2012-November/037963.html
|
||||
--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2015-05-13 11:12:38.000000000 -0400
|
||||
+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2015-06-10 16:42:33.632228000 -0400
|
||||
@@ -168,14 +168,19 @@
|
||||
--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2015-11-10 21:23:50 UTC
|
||||
+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
|
||||
@@ -168,14 +168,19 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR
|
||||
VM_OBJECT_LOCK(pMemFreeBSD->pObject);
|
||||
#endif
|
||||
vm_page_t pPage = vm_page_find_least(pMemFreeBSD->pObject, 0);
|
||||
|
@ -29,7 +29,7 @@ From Alan L. Cox on FreeBSD-current:
|
|||
#if __FreeBSD_version >= 1000030
|
||||
VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject);
|
||||
#else
|
||||
@@ -201,12 +206,12 @@
|
||||
@@ -201,12 +206,12 @@ static vm_page_t rtR0MemObjFreeBSDContig
|
||||
vm_page_t pPages;
|
||||
int cTries = 0;
|
||||
|
||||
|
@ -44,14 +44,17 @@ From Alan L. Cox on FreeBSD-current:
|
|||
{
|
||||
#if __FreeBSD_version >= 1000030
|
||||
VM_OBJECT_WLOCK(pObject);
|
||||
@@ -220,18 +225,20 @@
|
||||
@@ -220,18 +225,23 @@ static vm_page_t rtR0MemObjFreeBSDContig
|
||||
#else
|
||||
VM_OBJECT_UNLOCK(pObject);
|
||||
#endif
|
||||
- if (pPages)
|
||||
+ if (pPages || cTries >= 1)
|
||||
break;
|
||||
+#if __FreeBSD_version >= 1000015
|
||||
+#if __FreeBSD_version >= 1100092
|
||||
+ if (!vm_page_reclaim_contig(fFlags, cPages, 0, VmPhysAddrHigh, uAlignment, 0))
|
||||
+ break;
|
||||
+#elif __FreeBSD_version >= 1000015
|
||||
vm_pageout_grow_cache(cTries, 0, VmPhysAddrHigh);
|
||||
+#else
|
||||
+ vm_contig_grow_cache(cTries, 0, VmPhysAddrHigh);
|
||||
|
@ -70,7 +73,7 @@ From Alan L. Cox on FreeBSD-current:
|
|||
break;
|
||||
vm_contig_grow_cache(cTries, 0, VmPhysAddrHigh);
|
||||
cTries++;
|
||||
@@ -239,11 +246,8 @@
|
||||
@@ -239,11 +249,8 @@ static vm_page_t rtR0MemObjFreeBSDContig
|
||||
|
||||
if (!pPages)
|
||||
return pPages;
|
||||
|
@ -83,7 +86,7 @@ From Alan L. Cox on FreeBSD-current:
|
|||
for (vm_pindex_t iPage = 0; iPage < cPages; iPage++)
|
||||
{
|
||||
vm_page_t pPage = pPages + iPage;
|
||||
@@ -255,13 +259,9 @@
|
||||
@@ -255,13 +262,9 @@ static vm_page_t rtR0MemObjFreeBSDContig
|
||||
atomic_add_int(&cnt.v_wire_count, 1);
|
||||
}
|
||||
}
|
||||
|
@ -97,7 +100,7 @@ From Alan L. Cox on FreeBSD-current:
|
|||
}
|
||||
|
||||
static int rtR0MemObjFreeBSDPhysAllocHelper(vm_object_t pObject, u_long cPages,
|
||||
@@ -291,11 +291,15 @@
|
||||
@@ -291,11 +294,15 @@ static int rtR0MemObjFreeBSDPhysAllocHel
|
||||
while (iPage-- > 0)
|
||||
{
|
||||
pPage = vm_page_lookup(pObject, iPage);
|
||||
|
@ -113,7 +116,7 @@ From Alan L. Cox on FreeBSD-current:
|
|||
}
|
||||
#if __FreeBSD_version >= 1000030
|
||||
VM_OBJECT_WUNLOCK(pObject);
|
||||
@@ -743,7 +747,12 @@
|
||||
@@ -743,7 +750,12 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(
|
||||
{
|
||||
/** @todo: is this needed?. */
|
||||
PROC_LOCK(pProc);
|
||||
|
|
Loading…
Reference in a new issue