From: David Miller <davem@davemloft.net>
To: vladbu@mellanox.com
Cc: netdev@vger.kernel.org, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us, pablo@netfilter.org,
alexanderk@mellanox.com, pabeni@redhat.com, mlxsw@mellanox.com,
jiri@mellanox.com
Subject: Re: [PATCH net] net: sched: flower: don't call synchronize_rcu() on mask creation
Date: Fri, 14 Jun 2019 19:30:47 -0700 (PDT) [thread overview]
Message-ID: <20190614.193047.261788013564267611.davem@davemloft.net> (raw)
In-Reply-To: <20190613145404.4774-1-vladbu@mellanox.com>
From: Vlad Buslov <vladbu@mellanox.com>
Date: Thu, 13 Jun 2019 17:54:04 +0300
> 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>
Applied, thanks.
prev parent reply other threads:[~2019-06-15 2:30 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
2019-06-15 2:30 ` David Miller [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=20190614.193047.261788013564267611.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexanderk@mellanox.com \
--cc=jhs@mojatatu.com \
--cc=jiri@mellanox.com \
--cc=jiri@resnulli.us \
--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