From: Jiri Pirko <jiri@resnulli.us>
To: Vlad Buslov <vladbu@mellanox.com>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, davem@davemloft.net,
pablo@netfilter.org, alexanderk@mellanox.com, pabeni@redhat.com,
mlxsw@mellanox.com, Jiri Pirko <jiri@mellanox.com>
Subject: Re: [PATCH net] net: sched: flower: don't call synchronize_rcu() on mask creation
Date: Thu, 13 Jun 2019 17:49:53 +0200 [thread overview]
Message-ID: <20190613154953.GB2242@nanopsycho> (raw)
In-Reply-To: <20190613145404.4774-1-vladbu@mellanox.com>
Thu, Jun 13, 2019 at 04:54:04PM CEST, vladbu@mellanox.com wrote:
>Current flower mask creating code assumes that temporary mask that is used
>when inserting new filter is stack allocated. To prevent race condition
>with data patch synchronize_rcu() is called every time fl_create_new_mask()
>replaces temporary stack allocated mask. As reported by Jiri, this
>increases runtime of creating 20000 flower classifiers from 4 seconds to
>163 seconds. However, this design is no longer necessary since temporary
>mask was converted to be dynamically allocated by commit 2cddd2014782
>("net/sched: cls_flower: allocate mask dynamically in fl_change()").
>
>Remove synchronize_rcu() calls from mask creation code. Instead, refactor
>fl_change() to always deallocate temporary mask with rcu grace period.
>
>Fixes: 195c234d15c9 ("net: sched: flower: handle concurrent mask insertion")
>Reported-by: Jiri Pirko <jiri@mellanox.com>
>Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Tested-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Thanks Vlad!
next prev parent reply other threads:[~2019-06-13 15:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 14:54 [PATCH net] net: sched: flower: don't call synchronize_rcu() on mask creation Vlad Buslov
2019-06-13 15:49 ` Jiri Pirko [this message]
2019-06-15 2:30 ` 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=20190613154953.GB2242@nanopsycho \
--to=jiri@resnulli.us \
--cc=alexanderk@mellanox.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@mellanox.com \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=vladbu@mellanox.com \
--cc=xiyou.wangcong@gmail.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