netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kui-Feng Lee <sinquersw@gmail.com>
To: David Ahern <dsahern@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Kui-Feng Lee <thinker.li@gmail.com>,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	netdev@vger.kernel.org, martin.lau@linux.dev,
	kernel-team@meta.com, yhs@meta.com
Cc: Kui-Feng Lee <kuifeng@meta.com>
Subject: Re: [PATCH net-next v2 2/2] selftests: fib_tests: Add a test case for IPv6 garbage collection
Date: Fri, 21 Jul 2023 13:57:48 -0700	[thread overview]
Message-ID: <5537f391-681f-1107-c838-b045f0482b3a@gmail.com> (raw)
In-Reply-To: <0b992d26-f22d-7310-308a-339300628690@kernel.org>



On 7/21/23 13:01, David Ahern wrote:
> On 7/21/23 12:31 PM, Kui-Feng Lee wrote:
>>>
>>> sysctl -wq net.ipv6.route.flush=1
>>>
>>> # add routes
>>> #...
>>>
>>> # delete expired routes synchronously
>>> sysctl -wq net.ipv6.route.flush=1
>>>
>>> Note that the net.ipv6.route.flush handler uses the 'old' flush value.
>>
>> May I use bpftrace to measure time spending on writing to procfs?
>> It is in the order of microseconds. time command doesn't work.
>>
> 
> Both before this patch and after this patch are in microseconds?
> 

The test case includes two parts. First part, add 1k temporary routes
only. Second part, add 5k permanent routes before adding 1k temporary
routes. In both cases, they wait for a few second and run sysctl -wq
net.ipv6.route.flush=1 to force gc. I use bpftrace to measure the time
the syscalls that write to procfs. Following are the numbers (5 times 
average) I got.

Without the patch
  1k temp w/o 5k perm: ~588us
  1k temp w/  5k perm: ~1055us
With the patch
  1k temp w/o 5k perm: ~550us
  1k temp w/  5k perm: ~561us

      reply	other threads:[~2023-07-21 20:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18 18:03 [PATCH net-next v2 0/2] Remove expired routes with a Kui-Feng Lee
2023-07-18 18:03 ` [PATCH net-next v2 1/2] net/ipv6: Remove expired routes with a separated list of routes Kui-Feng Lee
2023-07-20  9:18   ` Paolo Abeni
2023-07-20 16:31     ` Kui-Feng Lee
2023-07-18 18:03 ` [PATCH net-next v2 2/2] selftests: fib_tests: Add a test case for IPv6 garbage collection Kui-Feng Lee
2023-07-20  9:32   ` Paolo Abeni
2023-07-20 16:32     ` Kui-Feng Lee
2023-07-20 21:36     ` Kui-Feng Lee
2023-07-21  7:14       ` Paolo Abeni
2023-07-21 18:31         ` Kui-Feng Lee
2023-07-21 20:01           ` David Ahern
2023-07-21 20:57             ` Kui-Feng Lee [this message]

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=5537f391-681f-1107-c838-b045f0482b3a@gmail.com \
    --to=sinquersw@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=kuifeng@meta.com \
    --cc=martin.lau@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=thinker.li@gmail.com \
    --cc=yhs@meta.com \
    /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;
as well as URLs for NNTP newsgroup(s).