From 779a2514a61d103a9a1479478ad15d2ca9478d6c Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Wed, 10 Dec 2014 01:53:10 +0100 Subject: Hurd: Fix definition of `PAGE_COPY_THRESHOLD' --- .topdeps | 2 +- .topmsg | 30 +++++++++++++++++++----------- sysdeps/mach/pagecopy.h | 2 +- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/.topdeps b/.topdeps index e7a14c6ca9..180b47c18b 100644 --- a/.topdeps +++ b/.topdeps @@ -1 +1 @@ -0323d08657f111267efa47bd448fbf6cd76befe8 +baseline diff --git a/.topmsg b/.topmsg index dd6634c886..a68dd006b9 100644 --- a/.topmsg +++ b/.topmsg @@ -1,16 +1,24 @@ -Subject: Baseline for our topic branches. +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Subject: [PATCH] Hurd: Fix definition of `PAGE_COPY_THRESHOLD' ---- - -This need not strictly be a TopGit branch, but it is for easy synchronization -between different machines. +Previously, `PAGE_THRESHOLD' was defined instead of +`PAGE_COPY_THRESHOLD', preventing the optimization of memory copy +operations using `vm_copy'. -As the baseline is merged into the topic branches, it is forward-only. +Also, increase the threshold to 4 pages. XXX Tune this. -To advance it: - - $ echo [SHA1] > .topdeps - $ git commit -m Advance. -- .topdeps - $ tg update +* sysdeps/mach/pagecopy.h (PAGE_THRESHOLD): Rename to `PAGE_COPY_THRESHOLD'. +Raise threshold to XXX pages. --- +This is however still WIP: + +“ +this currently doesn't make any difference since the +Makefile rules end up compiling sysdeps/i386/i586/memcpy{,_chk}.S, +i386/i586/memcopy.h, i386/memcopy.h instead... Also, #if +PAGE_COPY_THRESHOLD doesn't like PAGE_COPY_THRESHOLD being +2*__vm_page_size, it ends up considering it false. Also, the rtld magic +in elf/ doesn't manage to determine that it also needs to include +wordcopy.os. +” diff --git a/sysdeps/mach/pagecopy.h b/sysdeps/mach/pagecopy.h index 0a9f39d1bb..4dd1a39199 100644 --- a/sysdeps/mach/pagecopy.h +++ b/sysdeps/mach/pagecopy.h @@ -20,7 +20,7 @@ /* Threshold at which vm_copy is more efficient than well-optimized copying by words. This parameter should be tuned as necessary. */ -#define PAGE_THRESHOLD (2 * PAGE_SIZE) /* XXX ? */ +#define PAGE_COPY_THRESHOLD (16384) /* XXX Tune this. */ #define PAGE_SIZE __vm_page_size #define PAGE_COPY_FWD(dstp, srcp, nbytes_left, nbytes) \ -- cgit v1.2.3