From: Michael Ellerman <mpe@ellerman•id.au>
To: David Laight <David.Laight@ACULAB•COM>
Cc: 'Michal Sojka' <sojkam1@fel•cvut.cz>,
Christophe LEROY <christophe.leroy@c-s•fr>,
Scott Wood <scottwood@freescale•com>,
Paul Mackerras <paulus@samba•org>,
"linuxppc-dev@lists•ozlabs.org" <linuxppc-dev@lists•ozlabs.org>
Subject: Re: memcpy regression
Date: Tue, 08 Sep 2015 13:54:22 +1000 [thread overview]
Message-ID: <1441684462.14597.3.camel@ellerman.id.au> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1CB8E77D@AcuExch.aculab.com>
On Mon, 2015-09-07 at 10:59 +0000, David Laight wrote:
> From: Michal Sojka
> > >> I think GCC uses memcpy() in well known situations like initialising
> > >> structures or copying structures.
> > >> Shouldn't we just avoid this kind of actions in the very few early init
> > >> functions ?
> > > Which are the "very few" early init functions? Can you make a list, for 32-bit
> > > and 64-bit? And can we keep it updated over time and not introduce regressions?
> > >
> > If the code that runs without caches is concentrated in few files, we
> > may either modify the buildsystem to check whether there is a call to
> > memcpy from these files (e.g. by using nm) or these files can be
> > "prelinked" with special version of memcpy that doesn't require caches.
> > Would any of these be acceptable?
>
> What about run-time patching memcpy() after the caches are initialised?
Yeah, that's the solution we use on 64-bit.
It also means you can have cpu specific optimisations, which can be patched in
or out using the cpu feature patching.
cheers
next prev parent reply other threads:[~2015-09-08 3:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-04 13:33 memcpy regression Michal Sojka
2015-09-04 13:57 ` Christophe LEROY
2015-09-04 14:35 ` Michal Sojka
2015-09-04 18:10 ` christophe leroy
2015-09-04 19:49 ` Michal Sojka
2015-09-05 0:08 ` Michal Sojka
2015-09-06 8:18 ` christophe leroy
2015-09-06 19:05 ` Michal Sojka
2015-09-06 21:01 ` Michal Sojka
2015-09-07 1:14 ` Michael Ellerman
2015-09-07 7:08 ` Christophe LEROY
2015-09-07 8:40 ` Michael Ellerman
2015-09-07 9:45 ` Michal Sojka
2015-09-07 10:59 ` David Laight
2015-09-08 3:54 ` Michael Ellerman [this message]
2015-09-08 8:59 ` David Laight
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=1441684462.14597.3.camel@ellerman.id.au \
--to=mpe@ellerman$(echo .)id.au \
--cc=David.Laight@ACULAB$(echo .)COM \
--cc=christophe.leroy@c-s$(echo .)fr \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=paulus@samba$(echo .)org \
--cc=scottwood@freescale$(echo .)com \
--cc=sojkam1@fel$(echo .)cvut.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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