[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150305002640.GA20449@gmail.com>
Date: Thu, 5 Mar 2015 01:26:40 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Borislav Petkov <bp@...en8.de>
Cc: X86 ML <x86@...nel.org>, Andy Lutomirski <luto@...capital.net>,
LKML <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH v2 15/15] x86/lib/memcpy_64.S: Convert memcpy to
ALTERNATIVE_2 macro
* Borislav Petkov <bp@...en8.de> wrote:
> On Wed, Mar 04, 2015 at 08:26:33AM +0100, Ingo Molnar wrote:
> > Since most CPUs we care about have ERMS, wouldn't it be better to
> > patch in the actual memcpy_erms sequence into the primary memcpy()
> > function? It's just about 9 bytes AFAICT.
>
> Actually, most set REP_GOOD - all Intel family 6 and all relevant
> AMDs.
>
> And only the newer Intels have ERMS. My SNB, for example doesn't
> while IVB has it. So I'd guess everything >= IVB would have it.
Well, my point equally applies to all variants: it's better to avoid
the NOP or JMP overhead (however small it may be), by simply copying
the ideal memcpy routine into memcpy()?
I.e. while I'd not want to patch in memcpy_orig (it's legacy really),
but the other two variants, ERMS and REP MOVSQ could be patched in
directly via ALTERNATIVE_2()?
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists