[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5537f391-681f-1107-c838-b045f0482b3a@gmail.com>
Date: Fri, 21 Jul 2023 13:57:48 -0700
From: Kui-Feng Lee <sinquersw@...il.com>
To: David Ahern <dsahern@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Kui-Feng Lee <thinker.li@...il.com>, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, netdev@...r.kernel.org,
martin.lau@...ux.dev, kernel-team@...a.com, yhs@...a.com
Cc: Kui-Feng Lee <kuifeng@...a.com>
Subject: Re: [PATCH net-next v2 2/2] selftests: fib_tests: Add a test case for
IPv6 garbage collection
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
Powered by blists - more mailing lists