io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Garzarella <sgarzare@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
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 17:38:53 +0100	[thread overview]
Message-ID: <20200207163853.bzfgn2mzpactehk3@steredhat> (raw)
In-Reply-To: <0acf040c-4b00-1647-e0c9-fc8b1c94685d@kernel.dk>

On Fri, Feb 07, 2020 at 09:12:39AM -0700, Jens Axboe wrote:
> 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.

Sure, indeed I was undecided whether to put it after the three dashes
as a response to your yesterday's request.

Thanks,
Stefano


      reply	other threads:[~2020-02-07 16:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 12:18 [PATCH] io_uring: flush overflowed CQ events in the io_uring_poll() Stefano Garzarella
2020-02-07 16:12 ` Jens Axboe
2020-02-07 16:38   ` Stefano Garzarella [this message]

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=20200207163853.bzfgn2mzpactehk3@steredhat \
    --to=sgarzare@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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
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).