summaryrefslogtreecommitdiffstats
path: root/src/kernel/syscall.C
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2012-07-13 21:28:37 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-07-16 14:00:44 -0500
commit1535c27d4a7a970f3e14ace7cb980ae06820e9ec (patch)
tree5cc9f264592f90f56c40bc12a50d1c6a6261b89a /src/kernel/syscall.C
parent7f482f9ad23bd7689fdee5982ad91f8506b2dfb8 (diff)
downloadtalos-hostboot-1535c27d4a7a970f3e14ace7cb980ae06820e9ec.tar.gz
talos-hostboot-1535c27d4a7a970f3e14ace7cb980ae06820e9ec.zip
Improve user-space page allocator.
* Allow page allocation system call to force coalesce if a contiguous block is unavailable. [long-term enhancement] * Workaround lack of large contiguous memory for PageTable test-cases, which require 256K, by allocating a VMM block. This should be removed when story 43401 is implemented. [short-term workaround] Change-Id: Idddb30eaa3aeac52d56b82a70355095f31d4a0cd Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1369 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/kernel/syscall.C')
-rw-r--r--src/kernel/syscall.C9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/kernel/syscall.C b/src/kernel/syscall.C
index b6fa46f8a..b061a4877 100644
--- a/src/kernel/syscall.C
+++ b/src/kernel/syscall.C
@@ -677,8 +677,10 @@ namespace Systemcalls
*/
void MmAllocPages(task_t* t)
{
+ ssize_t pages = TASK_GETARG0(t);
+
// Attempt to allocate the page(s).
- void* page = PageManager::allocatePage(TASK_GETARG0(t), true);
+ void* page = PageManager::allocatePage(pages, true);
TASK_SETRTN(t, reinterpret_cast<uint64_t>(page));
// If we are low on memory, call into the VMM to free some up.
@@ -696,6 +698,11 @@ namespace Systemcalls
__sync_lock_release(&one_at_a_time);
}
}
+ else if ((page == NULL) && (pages > 1))
+ {
+ CpuManager::forceMemoryPeriodic();
+ }
+
}
};
OpenPOWER on IntegriCloud