bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: "Björn Töpel" <bjorn.topel@gmail.com>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org,
	"Björn Töpel" <bjorn.topel@intel.com>,
	magnus.karlsson@intel.com, ast@kernel.org, daniel@iogearbox.net,
	maciej.fijalkowski@intel.com, sridhar.samudrala@intel.com,
	jesse.brandeburg@intel.com, qi.z.zhang@intel.com,
	edumazet@google.com, jonathan.lemon@gmail.com,
	maximmi@nvidia.com
Subject: Re: [PATCH bpf-next v2 01/10] net: introduce preferred busy-polling
Date: Mon, 16 Nov 2020 08:04:57 -0800	[thread overview]
Message-ID: <20201116080457.163bf83b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20201116110416.10719-2-bjorn.topel@gmail.com>

On Mon, 16 Nov 2020 12:04:07 +0100 Björn Töpel wrote:
> @@ -6771,6 +6806,19 @@ static int napi_poll(struct napi_struct *n, struct list_head *repoll)
>  	if (likely(work < weight))
>  		goto out_unlock;
>  
> +	/* The NAPI context has more processing work, but busy-polling
> +	 * is preferred. Exit early.
> +	 */
> +	if (napi_prefer_busy_poll(n)) {
> +		if (napi_complete_done(n, work)) {
> +			/* If timeout is not set, we need to make sure
> +			 * that the NAPI is re-scheduled.
> +			 */
> +			napi_schedule(n);
> +		}
> +		goto out_unlock;
> +	}

Why is this before the disabled check?

>  	/* Drivers must not modify the NAPI state if they
>  	 * consume the entire weight.  In such cases this code
>  	 * still "owns" the NAPI instance and therefore can

  reply	other threads:[~2020-11-16 16:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 11:04 [PATCH bpf-next v2 00/10] Introduce preferred busy-polling Björn Töpel
2020-11-16 11:04 ` [PATCH bpf-next v2 01/10] net: introduce " Björn Töpel
2020-11-16 16:04   ` Jakub Kicinski [this message]
2020-11-16 16:19     ` Björn Töpel
2020-11-16 17:28       ` Björn Töpel
2020-11-16 11:04 ` [PATCH bpf-next v2 02/10] net: add SO_BUSY_POLL_BUDGET socket option Björn Töpel
2020-11-16 11:04 ` [PATCH bpf-next v2 03/10] xsk: add support for recvmsg() Björn Töpel
2020-11-16 11:04 ` [PATCH bpf-next v2 04/10] xsk: check need wakeup flag in sendmsg() Björn Töpel
2020-11-16 11:04 ` [PATCH bpf-next v2 05/10] xsk: add busy-poll support for {recv,send}msg() Björn Töpel
2020-11-16 11:04 ` [PATCH bpf-next v2 06/10] xsk: propagate napi_id to XDP socket Rx path Björn Töpel
2020-11-16 11:19   ` Tariq Toukan
2020-11-16 11:55   ` Michael S. Tsirkin
2020-11-16 12:01     ` Björn Töpel
2020-11-16 12:42       ` Michael S. Tsirkin
2020-11-16 13:24         ` Björn Töpel
2020-11-16 13:55           ` Michael S. Tsirkin
2020-11-16 17:40             ` Björn Töpel
2020-11-16 11:04 ` [PATCH bpf-next v2 07/10] samples/bpf: use recvfrom() in xdpsock/rxdrop Björn Töpel
2020-11-16 11:04 ` [PATCH bpf-next v2 08/10] samples/bpf: use recvfrom() in xdpsock/l2fwd Björn Töpel
2020-11-16 11:04 ` [PATCH bpf-next v2 09/10] samples/bpf: add busy-poll support to xdpsock Björn Töpel
2020-11-16 11:04 ` [PATCH bpf-next v2 10/10] samples/bpf: add option to set the busy-poll budget Björn Töpel

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=20201116080457.163bf83b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@gmail.com \
    --cc=bjorn.topel@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=maximmi@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=qi.z.zhang@intel.com \
    --cc=sridhar.samudrala@intel.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).