This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libc/string] State of PAGE_COPY_FWD / PAGE_COPY_THRESHOLD


I wanted to check performance impact of using linux zero page sharing in calls to memset (PTR, 0, SIZE).  I remembered seeing PAGE_COPY_FWD_MAYBE and PAGE_COPY_THRESHOLD in string/memcpy.c, and my plan was to copy this logic to an experimental memset() implementation.

Closer inspection of the current code showed that only Mach port attempted to use full-page copying in memcpy.c, but now even the Mach port disables it.  The net result is that code in string/memcpy.c, as well as parts of headers sysdeps/generic/pagecopy.h and sysdeps/generic/memcopy.h are dead code.

From the above we have 2 questions:
1. Is it possible to use full-page copy (with COW) in the Linux glibc port for memcpy() and/or memset(0)?

2. If not, then is there any reason to keep the dead code around or should we clean it up?

--
Maxim Kuvyrkov
www.linaro.org




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]