From: Daniel Borkmann <daniel@iogearbox•net>
To: Martin KaFai Lau <kafai@fb•com>, netdev@vger•kernel.org
Cc: Alexei Starovoitov <ast@fb•com>, kernel-team@fb•com
Subject: Re: [PATCH net-next 3/3] bpf: Only set node->ref = 1 if it has not been set
Date: Fri, 01 Sep 2017 11:28:15 +0200 [thread overview]
Message-ID: <59A9282F.5080906@iogearbox.net> (raw)
In-Reply-To: <20170901062713.1842249-4-kafai@fb.com>
On 09/01/2017 08:27 AM, Martin KaFai Lau wrote:
> This patch writes 'node->ref = 1' only if node->ref is 0.
> The number of lookups/s for a ~1M entries LRU map increased by
> ~30% (260097 to 343313).
>
> Other writes on 'node->ref = 0' is not changed. In those cases, the
> same cache line has to be changed anyway.
>
> First column: Size of the LRU hash
> Second column: Number of lookups/s
>
> Before:
>> echo "$((2**20+1)): $(./map_perf_test 1024 1 $((2**20+1)) 10000000 | awk '{print $3}')"
> 1048577: 260097
>
> After:
>> echo "$((2**20+1)): $(./map_perf_test 1024 1 $((2**20+1)) 10000000 | awk '{print $3}')"
> 1048577: 343313
>
> Signed-off-by: Martin KaFai Lau <kafai@fb•com>
Acked-by: Daniel Borkmann <daniel@iogearbox•net>
next prev parent reply other threads:[~2017-09-01 9:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-01 6:27 [PATCH net-next 0/3] bpf: Improve LRU map lookup performance Martin KaFai Lau
2017-09-01 6:27 ` [PATCH net-next 1/3] bpf: Add lru_hash_lookup performance test Martin KaFai Lau
2017-09-01 9:12 ` Daniel Borkmann
2017-09-01 14:22 ` Alexei Starovoitov
2017-09-01 6:27 ` [PATCH net-next 2/3] bpf: Inline LRU map lookup Martin KaFai Lau
2017-09-01 9:18 ` Daniel Borkmann
2017-09-01 14:22 ` Alexei Starovoitov
2017-09-01 6:27 ` [PATCH net-next 3/3] bpf: Only set node->ref = 1 if it has not been set Martin KaFai Lau
2017-09-01 9:28 ` Daniel Borkmann [this message]
2017-09-01 14:22 ` Alexei Starovoitov
2017-09-01 16:57 ` [PATCH net-next 0/3] bpf: Improve LRU map lookup performance David Miller
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=59A9282F.5080906@iogearbox.net \
--to=daniel@iogearbox$(echo .)net \
--cc=ast@fb$(echo .)com \
--cc=kafai@fb$(echo .)com \
--cc=kernel-team@fb$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/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