netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Wei Wang <weiwan@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, Martin Zaharinov <micron10@gmail.com>,
	Alexander Duyck <alexanderduyck@fb.com>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>
Subject: Re: [PATCH net v2] net: fix race between napi kthread mode and busy poll
Date: Fri, 26 Feb 2021 16:48:03 -0800	[thread overview]
Message-ID: <20210226164803.4413571f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20210227003047.1051347-1-weiwan@google.com>

On Fri, 26 Feb 2021 16:30:47 -0800 Wei Wang wrote:
>  		thread = READ_ONCE(napi->thread);
>  		if (thread) {
> +			set_bit(NAPI_STATE_SCHED_THREADED, &napi->state);
>  			wake_up_process(thread);

What about the version which checks RUNNING? As long as
wake_up_process() implies a barrier I _think_ it should 
work as well. Am I missing some case, or did you decide
to go with the simpler/safer approach?

  reply	other threads:[~2021-02-27  0:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-27  0:30 [PATCH net v2] net: fix race between napi kthread mode and busy poll Wei Wang
2021-02-27  0:48 ` Jakub Kicinski [this message]
2021-02-27  1:02   ` Wei Wang
2021-02-27  1:22     ` Jakub Kicinski
2021-02-27  1:35       ` Wei Wang
2021-02-27  2:08         ` Jakub Kicinski
2021-02-27 19:00           ` Wei Wang
2021-02-27 23:23             ` Wei Wang
2021-02-28 19:17               ` Jakub Kicinski
2021-03-01 18:16                 ` Wei Wang

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=20210226164803.4413571f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=alexanderduyck@fb.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hannes@stressinduktion.org \
    --cc=micron10@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=weiwan@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 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).