public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net, jhs@mojatatu.com,
	xiyou.wangcong@gmail.com, mlxsw@mellanox.com,
	edumazet@google.com, daniel@iogearbox.net,
	alexander.h.duyck@intel.com, willemb@google.com,
	john.fastabend@gmail.com
Subject: Re: [patch net-next v3 2/2] net: core: introduce mini_Qdisc and eliminate usage of tp->q for clsact fastpath
Date: Wed, 1 Nov 2017 09:11:14 -0700	[thread overview]
Message-ID: <20171101161112.hpzl2a5oi5tdvauo@ast-mbp> (raw)
In-Reply-To: <20171101081803.GB1977@nanopsycho.orion>

On Wed, Nov 01, 2017 at 09:18:03AM +0100, Jiri Pirko wrote:
> Wed, Nov 01, 2017 at 03:12:50AM CET, alexei.starovoitov@gmail.com wrote:
> >On Tue, Oct 31, 2017 at 04:12:22PM +0100, Jiri Pirko wrote:
> >> From: Jiri Pirko <jiri@mellanox.com>
> >> 
> >> In sch_handle_egress and sch_handle_ingress tp->q is used only in order
> >> to update stats. So stats and filter list are the only things that are
> >> needed in clsact qdisc fastpath processing. Introduce new mini_Qdisc
> >> struct to hold those items. Also, introduce a helper to swap the
> >> mini_Qdisc structures in case filter list head changes.
> >> 
> >> This removes need for tp->q usage without added overhead.
> >> 
> >> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
> >> ---
> >> v2->v3:
> >> - Using head change callback to replace miniq pointer every time tp head
> >>   changes. This eliminates one rcu dereference and makes the claim "without
> >>   added overhead" valid.
> >
> >you kidding, right?
> >It's still two loads.
> 
> I'm not.
> I replace:
> 
> one rcu_dereference_bh(dev->egress_cl_list)
> 	by one rcu_dereference_bh(dev->miniq_egress)
> 
> one dereference cl->q
> 	by one dereference miniq->filter_list
> 
> What do I miss?

that in assembler code they are the same when debug is off ?

  reply	other threads:[~2017-11-01 16:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 15:12 [patch net-next v3 0/2] net: core: introduce mini_Qdisc and eliminate usage of tp->q for clsact fastpath Jiri Pirko
2017-10-31 15:12 ` [patch net-next v3 1/2] net: sched: introduce chain_head_change callback Jiri Pirko
2017-10-31 15:12 ` [patch net-next v3 2/2] net: core: introduce mini_Qdisc and eliminate usage of tp->q for clsact fastpath Jiri Pirko
2017-11-01  2:12   ` Alexei Starovoitov
2017-11-01  8:18     ` Jiri Pirko
2017-11-01 16:11       ` Alexei Starovoitov [this message]
2017-11-02 11:27         ` Jiri Pirko
2017-11-01 10:25     ` Daniel Borkmann
2017-11-01 10:30       ` Jiri Pirko
2017-11-03  1:24 ` [patch net-next v3 0/2] " David Miller
2017-11-03  6:57   ` Jiri Pirko

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=20171101161112.hpzl2a5oi5tdvauo@ast-mbp \
    --to=alexei.starovoitov@gmail.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=john.fastabend@gmail.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=willemb@google.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