From: "H. Peter Anvin" <hpa@zytor.com>
To: Eric Dumazet <eric.dumazet@gmail.com>, Tom Herbert <tom@herbertland.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, kernel-team@fb.com,
tglx@linutronix.de, mingo@redhat.com, x86@kernel.org
Subject: Re: [PATCH v2 net-next] net: Implement fast csum_partial for x86_64
Date: Tue, 05 Jan 2016 17:10:10 -0800 [thread overview]
Message-ID: <568C6972.8020908@zytor.com> (raw)
In-Reply-To: <1452032313.8255.135.camel@edumazet-glaptop2.roam.corp.google.com>
On 01/05/2016 02:18 PM, Eric Dumazet wrote:
> On Tue, 2016-01-05 at 10:41 -0800, Tom Herbert wrote:
>> Implement assembly routine for csum_partial for 64 bit x86. This
>> primarily speeds up checksum calculation for smaller lengths such as
>> those that are present when doing skb_postpull_rcsum when getting
>> CHECKSUM_COMPLETE from device or after CHECKSUM_UNNECESSARY
>> conversion.
>
> Very nice !
>
>
> You might add a comment telling the '4' comes from length of 'adcq
> 6*8(%rdi),%rax' instruction, and that the 'nop' is to compensate that
> 'adcq 0*8(%rdi),%rax' is using 3 bytes instead.
>
> We also could use .byte 0x48, 0x13, 0x47, 0x00 to force a 4 bytes
> instruction and remove the nop.
>
Apparently "adcq.d8" will do The Right Thing for this.
-hpa
next prev parent reply other threads:[~2016-01-06 1:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 18:41 [PATCH v2 net-next] net: Implement fast csum_partial for x86_64 Tom Herbert
2016-01-05 22:18 ` Eric Dumazet
2016-01-06 1:10 ` H. Peter Anvin [this message]
2016-01-06 3:02 ` Eric Dumazet
2016-01-06 10:16 ` David Laight
2016-01-06 14:25 ` Eric Dumazet
2016-01-06 14:49 ` David Laight
2016-01-06 15:03 ` Eric Dumazet
2016-01-05 23:35 ` Hannes Frederic Sowa
2016-01-06 3:21 ` Eric Dumazet
2016-01-06 20:05 ` Andi Kleen
2016-01-07 1:52 ` Hannes Frederic Sowa
2016-01-07 2:36 ` Tom Herbert
2016-01-07 2:43 ` Hannes Frederic Sowa
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=568C6972.8020908@zytor.com \
--to=hpa@zytor.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=kernel-team@fb.com \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tom@herbertland.com \
--cc=x86@kernel.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