From: Eric Dumazet <eric.dumazet@gmail.com>
To: Ling Ma <ling.ma.program@gmail.com>
Cc: linux-kernel@vger.kernel.org, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH RFC] [INET]: Get cirtical word in first 64bit of cache line
Date: Tue, 27 Nov 2012 05:58:03 -0800 [thread overview]
Message-ID: <1354024683.7553.1768.camel@edumazet-glaptop> (raw)
In-Reply-To: <CAOGi=dPQWC8hgt4jhMEHcVPb6j+jMTguNAchiLjdvvHjarCW4Q@mail.gmail.com>
On Tue, 2012-11-27 at 21:48 +0800, Ling Ma wrote:
> Ling: in the looking-up routine, hash value is the most important key,
> if it is matched, the other values have most possibility to be
> satisfied, and CFW is limited by memory bandwidth(64bit usually), so
> we only move hash value as critical first word.
In practice, we have at most one TCP socket per hash slot.
99.9999 % of lookups need all fields to complete.
Your patch introduces a misalignment error. I am not sure all 64 bit
arches are able to cope with that gracefully.
It seems all CWF docs I could find are very old stuff, mostly academic,
without good performance data.
I was asking for up2date statements from Intel/AMD/... about current
cpus and current memory. Because optimizing for 10 years olds cpus is
not worth the pain.
I am assuming cpus are implementing the CWF/ER automatically, and that
only prefetches could have a slight disadvantage if the needed word is
not the first word in the cache line. Its not clear why the prefetch()
hint could not also use CWF. It seems it also could be done by the
hardware.
So before random patches in linux kernel adding their possible bugs, we
need a good study.
Thanks
next prev parent reply other threads:[~2012-11-27 13:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1353900555-5966-1-git-send-email-ling.ma.program@gmail.com>
2012-11-26 6:44 ` [PATCH RFC] [INET]: Get cirtical word in first 64bit of cache line Eric Dumazet
2012-11-26 20:40 ` Ben Hutchings
2012-11-27 13:48 ` Ling Ma
2012-11-27 13:58 ` Eric Dumazet [this message]
2012-12-02 13:25 ` Ling Ma
2012-12-02 17:20 ` Eric Dumazet
2013-02-02 15:03 ` [PATCH v2 net-next] inet: Get critical " Eric Dumazet
2013-02-03 21:00 ` saeed bishara
2013-02-03 21:08 ` David Miller
2013-02-04 0:18 ` Eric Dumazet
2013-02-04 0:25 ` Eric Dumazet
2013-02-04 2:53 ` Ling Ma
2013-02-04 3:11 ` Eric Dumazet
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=1354024683.7553.1768.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=ling.ma.program@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.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