summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-12-29 16:09:11 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-12-29 16:10:52 +0100
commit6802c64d56f1d6603d95b3305f1dd9908c3777bf (patch)
tree0af3bde73065c0c1a9759315a8d08614d8645b2e
parente3372f9819e603914db63aa8aed1293488c5299d (diff)
Upgrade pager-memcpy parameters
* libpager/pager-memcpy.c (VMCOPY_BETTER_THAN_MEMCPY): Increase to 8 pages. (VMCOPY_WINDOW_DEFAULT_SIZE, MEMCPY_WINDOW_DEFAULT_SIZE): Increase to 32 pages.
-rw-r--r--libpager/pager-memcpy.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libpager/pager-memcpy.c b/libpager/pager-memcpy.c
index e5f4cdac..f2be5585 100644
--- a/libpager/pager-memcpy.c
+++ b/libpager/pager-memcpy.c
@@ -23,9 +23,10 @@
#include <assert.h>
#include <string.h>
-/* Start using vm_copy over memcpy when we have at a page. (This
- value *cannot* be less than vm_page_size.) */
-#define VMCOPY_BETTER_THAN_MEMCPY (vm_page_size)
+/* Start using vm_copy over memcpy when we have that many page. This is
+ roughly the L1 cache size. (This value *cannot* be less than
+ vm_page_size.) */
+#define VMCOPY_BETTER_THAN_MEMCPY (8*vm_page_size)
/* Try to copy *SIZE bytes between the region OTHER points to
and the region at OFFSET in the pager indicated by PAGER and MEMOBJ.
@@ -42,8 +43,8 @@ pager_memcpy (struct pager *pager, memory_object_t memobj,
error_t err;
size_t n = *size;
-#define VMCOPY_WINDOW_DEFAULT_SIZE (16 * vm_page_size)
-#define MEMCPY_WINDOW_DEFAULT_SIZE (8 * vm_page_size)
+#define VMCOPY_WINDOW_DEFAULT_SIZE (32 * vm_page_size)
+#define MEMCPY_WINDOW_DEFAULT_SIZE (32 * vm_page_size)
vm_address_t window;
vm_size_t window_size;