All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, pabeni@redhat.com,
	Roman Gushchin <roman.gushchin@linux.dev>,
	leitao@debian.org, shemminger@linux.foundation.org
Subject: Re: [PATCH net] net: don't let netpoll invoke NAPI if in xmit context
Date: Thu, 30 Mar 2023 20:23:33 -0700	[thread overview]
Message-ID: <20230330202333.108dadd9@kernel.org> (raw)
In-Reply-To: <CANn89iL99-uzrktK=hKLrmoWhhqCnH5rNUC9K4W9cOs+CQrbdA@mail.gmail.com>

On Fri, 31 Mar 2023 04:41:23 +0200 Eric Dumazet wrote:
> Note that we update WRITE_ONCE(txq->xmit_lock_owner, cpu) _after_
> spin_lock(&txq->_xmit_lock);
> 
> So there is a tiny window I think, for missing that we got the
> spinlock, but I do not see how to avoid it without excessive cost.

Ugh, true. Hopefully the chances of taking an IRQ which tries to print
something between those two instructions are fairly low. 

I was considering using dev_recursion_level() but AFAICT we don't
currently bump it when dequeuing from the qdisc..

  reply	other threads:[~2023-03-31  3:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31  2:21 [PATCH net] net: don't let netpoll invoke NAPI if in xmit context Jakub Kicinski
2023-03-31  2:41 ` Eric Dumazet
2023-03-31  3:23   ` Jakub Kicinski [this message]
2023-03-31  3:34     ` Eric Dumazet
2023-04-02 12:30 ` patchwork-bot+netdevbpf

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=20230330202333.108dadd9@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=leitao@debian.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=roman.gushchin@linux.dev \
    --cc=shemminger@linux.foundation.org \
    /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.