linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "jianchao.wang" <jianchao.w.wang@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: axboe@kernel.dk, viro@zeniv.linux.org.uk,
	linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] io_uring: introduce inline reqs for IORING_SETUP_IOPOLL
Date: Tue, 9 Apr 2019 17:46:45 +0800	[thread overview]
Message-ID: <c76b558c-bc12-3247-2bb5-986e5ffcba1f@oracle.com> (raw)
In-Reply-To: <20190409093717.GA15391@infradead.org>

Hi Christoph

On 4/9/19 5:37 PM, Christoph Hellwig wrote:
> On Tue, Apr 09, 2019 at 01:21:54PM +0800, Jianchao Wang wrote:
>> For the IORING_SETUP_IOPOLL case, all of the submission and
>> completion are handled under ctx->uring_lock or in SQ poll thread
>> context, so io_get_req and io_put_req has been serialized well.
>> The only exception is the asynchronous workqueue context where could
>> free the io_kiocb for error. To overcome this, we allocate a new
>> io_kiocb and free the previous inlined one.
>>
>> Based on this, we introduce the preallocated reqs list per ctx and
>> needn't to provide any lock to serialize the updating of list. The
>> performacne benefits from this. The test result of following fio
>> command
> 
> I really don't like the idea of exposing this to userspace.  Is
> there any good reason to not simply always allocate inline request
> up to a certain ring size?
> 
Sorry, I cannot get your point.
There is nothing exposed to userspace. We will try to allocated fixed 128
per-ctx preallocated reqs if IORING_SETUP_IOPOLL. When this inlined reqs
are used up, it will allocated reqs in old fashion.

Thanks
Jianchao

      parent reply	other threads:[~2019-04-09  9:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09  5:21 [PATCH V2] io_uring: introduce inline reqs for IORING_SETUP_IOPOLL Jianchao Wang
2019-04-09  9:37 ` Christoph Hellwig
2019-04-09  9:43   ` Christoph Hellwig
2019-04-09  9:46   ` jianchao.wang [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=c76b558c-bc12-3247-2bb5-986e5ffcba1f@oracle.com \
    --to=jianchao.w.wang@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=linux-block@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).