[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <vbfzhyrbr26.fsf@reg-r-vrt-018-180.mtr.labs.mlnx>
Date: Mon, 16 Jul 2018 10:03:29 +0300
From: Vlad Buslov <vladbu@...lanox.com>
To: Or Gerlitz <gerlitz.or@...il.com>
Cc: Simon Horman <simon.horman@...ronome.com>,
Linux Netdev List <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>
Subject: Re: [PATCH net-next] net: sched: refactor flower walk to iterate over idr
On Sat 14 Jul 2018 at 15:50, Or Gerlitz <gerlitz.or@...il.com> wrote:
> On Tue, Jul 10, 2018 at 8:02 PM, Vlad Buslov <vladbu@...lanox.com> wrote:
>>
>> On Tue 10 Jul 2018 at 13:55, Simon Horman <simon.horman@...ronome.com> wrote:
>>> On Mon, Jul 09, 2018 at 01:29:11PM +0300, Vlad Buslov wrote:
>>>> Extend struct tcf_walker with additional 'cookie' field. It is intended to
>>>> be used by classifier walk implementations to continue iteration directly
>>>> from particular filter, instead of iterating 'skip' number of times.
>>>>
>>>> Change flower walk implementation to save filter handle in 'cookie'. Each
>>>> time flower walk is called, it looks up filter with saved handle directly
>>>> with idr, instead of iterating over filter linked list 'skip' number of
>>>> times. This change improves complexity of dumping flower classifier from
>>>> quadratic to linearithmic. (assuming idr lookup has logarithmic complexity)
>>>>
>>>> Reviewed-by: Jiri Pirko <jiri@...lanox.com>
>>>> Signed-off-by: Vlad Buslov <vladbu@...lanox.com>
>>>
>>> Reported-by: Simon Horman <simon.horman@...ronome.com>
>>>
>>> Thanks, I'm very pleased to see this change. I would appreciate it if
>>> we could have a little time to test its impact on performance
>>> thoroughly.
>>
>> For me it reduced time needed to dump 5m flows to ~50 seconds. Not a
>> very thorough benchmark, but performance improvement was so dramatic
>> that I decided to not investigate further.
>
>
> down from how long to 50 seconds??
>From this:
gact$ time sudo tc -s filter show dev eth0_0 ingress | grep in_hw | wc -l
5000000
real 2099m29.689s
user 0m42.036s
sys 2098m55.680s
Powered by blists - more mailing lists