From: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
To: GNU C Library <libc-alpha@sourceware.org>
Subject: [libc/string] State of PAGE_COPY_FWD / PAGE_COPY_THRESHOLD
Date: Tue, 01 Nov 2016 09:28:00 -0000 [thread overview]
Message-ID: <E122D105-776D-4B9B-A15C-0A7C24BC0910@linaro.org> (raw)
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
next reply other threads:[~2016-11-01 9:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 9:28 Maxim Kuvyrkov [this message]
2016-11-01 13:59 ` Adhemerval Zanella
2016-11-10 7:39 ` Maxim Kuvyrkov
2016-11-10 7:48 ` Andrew Pinski
2016-11-10 7:52 ` Maxim Kuvyrkov
2016-11-10 8:01 ` Andrew Pinski
2016-11-10 8:05 ` Andrew Pinski
2016-11-10 8:25 ` Florian Weimer
2016-11-10 8:34 ` Andrew Pinski
2016-11-10 8:55 ` Andrew Pinski
2016-11-10 9:25 ` Siddhesh Poyarekar
2016-11-10 9:29 ` Florian Weimer
2016-11-10 9:34 ` Siddhesh Poyarekar
2016-11-30 11:18 ` Siddhesh Poyarekar
2016-11-10 8:26 ` Florian Weimer
2016-11-10 8:27 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E122D105-776D-4B9B-A15C-0A7C24BC0910@linaro.org \
--to=maxim.kuvyrkov@linaro.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).