From: Cong Wang <xiyou.wangcong@gmail.com>
To: Maxim Mikityanskiy <maximmi@nvidia.com>
Cc: Maxim Mikityanskiy <maximmi@mellanox.com>,
"David S. Miller" <davem@davemloft.net>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Pirko <jiri@resnulli.us>, Saeed Mahameed <saeedm@nvidia.com>,
Jakub Kicinski <kuba@kernel.org>,
Tariq Toukan <tariqt@mellanox.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
Tariq Toukan <tariqt@nvidia.com>,
Yossi Kuperman <yossiku@nvidia.com>
Subject: Re: [PATCH net-next v2 2/4] sch_htb: Hierarchical QoS hardware offload
Date: Mon, 14 Dec 2020 11:35:12 -0800 [thread overview]
Message-ID: <CAM_iQpVrQAT2frpiVYj4eevSO4jFPY8v2moJdorCe3apF7p6mA@mail.gmail.com> (raw)
In-Reply-To: <7f4b1039-b1be-b8a4-2659-a2b848120f67@nvidia.com>
On Mon, Dec 14, 2020 at 7:13 AM Maxim Mikityanskiy <maximmi@nvidia.com> wrote:
>
> On 2020-12-11 21:16, Cong Wang wrote:
> > On Fri, Dec 11, 2020 at 7:26 AM Maxim Mikityanskiy <maximmi@mellanox.com> wrote:
> >>
> >> HTB doesn't scale well because of contention on a single lock, and it
> >> also consumes CPU. This patch adds support for offloading HTB to
> >> hardware that supports hierarchical rate limiting.
> >>
> >> This solution addresses two main problems of scaling HTB:
> >>
> >> 1. Contention by flow classification. Currently the filters are attached
> >> to the HTB instance as follows:
> >
> > I do not think this is the reason, tcf_classify() has been called with RCU
> > only on the ingress side for a rather long time. What contentions are you
> > talking about here?
>
> When one attaches filters to HTB, tcf_classify is called from
> htb_classify, which is called from htb_enqueue, which is called with the
> root spinlock of the qdisc taken.
So it has nothing to do with tcf_classify() itself... :-/
[...]
> > And doesn't TBF already work with mq? I mean you can attach it as
> > a leaf to each mq so that the tree lock will not be shared either, but you'd
> > lose the benefits of a global rate limit too.
>
> Yes, I'd lose not only the global rate limit, but also multi-level
> hierarchical limits, which are all provided by this HTB offload - that's
> why TBF is not really a replacement for this feature.
Interesting, please explain how your HTB offload still has a global rate
limit and borrowing across queues? I simply can't see it, all I can see
is you offload HTB into each queue in ->attach(), where I assume the
hardware will do rate limit on each queue, if the hardware also has a
global control, why it is not reflected on the root qdisc?
Thanks!
next prev parent reply other threads:[~2020-12-14 19:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 15:26 [PATCH net-next v2 0/4] HTB offload Maxim Mikityanskiy
2020-12-11 15:26 ` [PATCH net-next v2 1/4] net: sched: Add multi-queue support to sch_tree_lock Maxim Mikityanskiy
2020-12-11 15:26 ` [PATCH net-next v2 2/4] sch_htb: Hierarchical QoS hardware offload Maxim Mikityanskiy
2020-12-11 19:16 ` Cong Wang
2020-12-14 15:12 ` Maxim Mikityanskiy
2020-12-14 19:35 ` Cong Wang [this message]
2020-12-14 20:30 ` Maxim Mikityanskiy
2020-12-15 16:37 ` Jamal Hadi Salim
2020-12-16 11:47 ` Maxim Mikityanskiy
2020-12-17 15:09 ` Jamal Hadi Salim
2020-12-18 10:48 ` Maxim Mikityanskiy
2020-12-16 19:01 ` Cong Wang
2020-12-17 14:24 ` Maxim Mikityanskiy
2020-12-11 15:26 ` [PATCH net-next v2 3/4] sch_htb: Stats for offloaded HTB Maxim Mikityanskiy
2020-12-11 15:26 ` [PATCH net-next v2 4/4] net/mlx5e: Support HTB offload Maxim Mikityanskiy
2020-12-11 19:58 ` kernel test robot
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=CAM_iQpVrQAT2frpiVYj4eevSO4jFPY8v2moJdorCe3apF7p6mA@mail.gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=maximmi@mellanox.com \
--cc=maximmi@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=tariqt@mellanox.com \
--cc=tariqt@nvidia.com \
--cc=yossiku@nvidia.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).