public inbox for [email protected]
 help / color / mirror / Atom feed
From: Stefan Roesch <[email protected]>
To: Jens Axboe <[email protected]>
Cc: [email protected], [email protected],
	[email protected],
	Olivier Langlois <[email protected]>,
	Jakub Kicinski <[email protected]>
Subject: Re: [PATCH v12 2/5] io-uring: add napi busy poll support
Date: Thu, 04 May 2023 09:06:10 -0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>


Jens Axboe <[email protected]> writes:

>
> I mentioned this in our out-of-band discussions on this patch set, and
> we cannot call napi_busy_loop() under rcu_read_lock() if loop_end and
> loop_end_arg is set AND loop_end() doesn't always return true. Because
> otherwise we can end up with napi_busy_loop() doing:
>
> 	if (unlikely(need_resched())) {
> 		if (napi_poll)
> 			busy_poll_stop(napi, have_poll_lock, prefer_busy_poll, budget);
> 		preempt_enable();
> 		rcu_read_unlock();
> 		cond_resched();
> 		if (loop_end(loop_end_arg, start_time))
> 			return;
> 		goto restart;
> 	}
>
> and hence we're now scheduling with rcu read locking disabled. So we
> need to handle that case appropriately as well.

I'll have a look.

  reply	other threads:[~2023-05-04 16:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02 16:53 [PATCH v12 0/5] io_uring: add napi busy polling support Stefan Roesch
2023-05-02 16:53 ` [PATCH v12 1/5] io-uring: move io_wait_queue definition to header file Stefan Roesch
2023-05-02 16:53 ` [PATCH v12 2/5] io-uring: add napi busy poll support Stefan Roesch
2023-05-03 17:40   ` Jens Axboe
2023-05-04 16:06     ` Stefan Roesch [this message]
2023-05-02 16:53 ` [PATCH v12 3/5] io-uring: add sqpoll support for napi busy poll Stefan Roesch
2023-05-02 16:53 ` [PATCH v12 4/5] io_uring: add register/unregister napi function Stefan Roesch
2023-05-02 16:53 ` [PATCH v12 5/5] io_uring: add prefer busy poll to register and unregister napi api Stefan Roesch

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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