[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4AFD0AFC.5020603@zytor.com>
Date: Thu, 12 Nov 2009 23:30:04 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: "Ma, Ling" <ling.ma@...el.com>
CC: Pavel Machek <pavel@....cz>, "mingo@...e.hu" <mingo@...e.hu>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC] [X86] performance improvement for memcpy_64.S by
fast string.
On 11/12/2009 11:23 PM, Ma, Ling wrote:
> Hi H. Peter Anvin
>> What it sounds to me is that for Nehalem, we want to use memcpy_c for >=
>> 1024 bytes and the old code for < 1024 bytes;
>
> Yes, so we modify memcpy_c as memcpy_new for Nehalem, and keep old
> code for Core2 is acceptable?
No, what I think we should do is to rename the old memcpy to something
like memcpy_o, and then have the actual memcpy routine look like:
cmpq $1024, %rcx
ja memcpy_c
jmp memcpy_o
... where the constant as well as the ja opcode can be patched by the
alternatives mechanism (to a jb if needed).
memcpy is *definitely* frequent enough that static patching is justified.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
--
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