All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, alexander.duyck@gmail.com,
	hkallweit1@gmail.com, andrew@lunn.ch, willemb@google.com,
	michael.chan@broadcom.com, jesse.brandeburg@intel.com,
	anthony.l.nguyen@intel.com
Subject: Re: [PATCH net-next v3 7/7] net: piggy back on the memory barrier in bql when waking queues
Date: Wed, 12 Apr 2023 06:54:08 -0700	[thread overview]
Message-ID: <20230412065408.59e02bb7@kernel.org> (raw)
In-Reply-To: <ZDZKaoPaiy6Itj7P@gondor.apana.org.au>

On Wed, 12 Apr 2023 14:06:34 +0800 Herbert Xu wrote:
> On Thu, Apr 06, 2023 at 05:41:40PM -0700, Jakub Kicinski wrote:
> > I wanted to keep the same semantics as netdev_tx_completed_queue()
> > which only barriers if (bytes). Not in the least to make it obvious
> > to someone looking at the code of netdev_txq_completed_mb() (and not
> > the comment above it) that it doesn't _always_ put a barrier in.  
> 
> OK, but I think we should instead change netdev_tx_compelted_queue
> to do the smp_mb unconditionally.  We should never optimise for the
> unlikely case, and it is extremely unlikely for a TX cleanup routine
> to wind up with nothing to do.

I don't understand what you're trying to argue. The whole point of 
the patch is to use the BQL barrier and BQL returns early, before 
the barrier.

I don't think many people actually build kernels with BQL=n so the other
branch is more *documentation* than it is relevant, executed code.

  reply	other threads:[~2023-04-12 13:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-05 22:31 [PATCH net-next v3 0/7] net: lockless stop/wake combo macros Jakub Kicinski
2023-04-05 22:31 ` [PATCH net-next v3 1/7] docs: net: reformat driver.rst from a list to sections Jakub Kicinski
2023-04-05 22:31 ` [PATCH net-next v3 2/7] docs: net: move the probe and open/close sections of driver.rst up Jakub Kicinski
2023-04-05 22:31 ` [PATCH net-next v3 3/7] docs: net: use C syntax highlight in driver.rst Jakub Kicinski
2023-04-05 22:31 ` [PATCH net-next v3 4/7] net: provide macros for commonly copied lockless queue stop/wake code Jakub Kicinski
2023-04-06  7:22   ` Herbert Xu
2023-04-05 22:31 ` [PATCH net-next v3 5/7] ixgbe: use new queue try_stop/try_wake macros Jakub Kicinski
2023-04-05 22:31 ` [PATCH net-next v3 6/7] bnxt: " Jakub Kicinski
2023-04-05 22:31 ` [PATCH net-next v3 7/7] net: piggy back on the memory barrier in bql when waking queues Jakub Kicinski
2023-04-06  7:35   ` Herbert Xu
2023-04-07  0:41     ` Jakub Kicinski
2023-04-12  6:06       ` Herbert Xu
2023-04-12 13:54         ` Jakub Kicinski [this message]
2023-04-13  2:31           ` Herbert Xu

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=20230412065408.59e02bb7@kernel.org \
    --to=kuba@kernel.org \
    --cc=alexander.duyck@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=hkallweit1@gmail.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.