IO-Uring Archive on lore.kernel.org
 help / color / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	io-uring@vger.kernel.org
Subject: Re: [PATCH] io_uring: flush overflowed CQ events in the io_uring_poll()
Date: Fri, 7 Feb 2020 09:12:39 -0700
Message-ID: <0acf040c-4b00-1647-e0c9-fc8b1c94685d@kernel.dk> (raw)
In-Reply-To: <20200207121828.105456-1-sgarzare@redhat.com>

On 2/7/20 5:18 AM, Stefano Garzarella wrote:
> In io_uring_poll() we must flush overflowed CQ events before to
> check if there are CQ events available, to avoid missing events.
> 
> We call the io_cqring_events() that checks and flushes any overflow
> and returns the number of CQ events available.
> 
> We can avoid taking the 'uring_lock' since the flush is already
> protected by 'completion_lock'.

Thanks, applied. I dropped that last sentence, as a) it doesn't
really matter, and b) we may very well already have it held here
if someone is doing a poll on the io_uring fd itself.

-- 
Jens Axboe


  reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 12:18 Stefano Garzarella
2020-02-07 16:12 ` Jens Axboe [this message]
2020-02-07 16:38   ` Stefano Garzarella

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=0acf040c-4b00-1647-e0c9-fc8b1c94685d@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sgarzare@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /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

IO-Uring Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/io-uring/0 io-uring/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 io-uring io-uring/ https://lore.kernel.org/io-uring \
		io-uring@vger.kernel.org
	public-inbox-index io-uring

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.io-uring


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git