IO-Uring Archive on
 help / color / Atom feed
From: Jens Axboe <>
To: Pavel Begunkov <>,
	Andres Freund <>
Subject: Re: Buffered IO async context overhead
Date: Mon, 9 Mar 2020 15:29:31 -0600
Message-ID: <> (raw)
In-Reply-To: <>

On 3/9/20 3:02 PM, Pavel Begunkov wrote:
> On 09/03/2020 23:41, Jens Axboe wrote:
>> On 3/9/20 2:03 PM, Pavel Begunkov wrote:
>>> On 24/02/2020 18:22, Jens Axboe wrote:
>>> A problem here is that we actually have a 2D array of works because of linked
>>> requests.
>> You could either skip anything with a link, or even just ignore it and
>> simply re-queue a dependent link if it isn't hashed when it's done if
>> grabbed in a batch.
>>> We can io_wqe_enqueue() dependant works, if have hashed requests, so delegating
>>> it to other threads. But if the work->list is not per-core, it will hurt
>>> locality. Either re-enqueue hashed ones if there is a dependant work. Need to
>>> think how to do better.
>> If we ignore links for a second, I think we can all agree that it'd be a
>> big win to do the batch.
> Definitely
>> With links, worst case would then be something where every other link is
>> hashed.
>> For a first patch, I'd be quite happy to just stop the batch if there's
>> a link on a request. The normal case here is buffered writes, and
>> that'll handle that case perfectly. Links will be no worse than before.
>> Seems like a no-brainer to me.
> That isn't really a problem, just pointing that there could be
> optimisations for different cases.

Definitely, in case it wasn't clear, my suggestion was merely to go for
the main win and ignore the link side for now. It's best done separately
anyway, with the link stuff tweaking the batch behavior.

Jens Axboe

      reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14 19:50 Andres Freund
2020-02-14 20:13 ` Jens Axboe
2020-02-14 20:31   ` Andres Freund
2020-02-14 20:49     ` Jens Axboe
2020-02-24  9:35       ` Andres Freund
2020-02-24 15:22         ` Jens Axboe
2020-03-09 20:03           ` Pavel Begunkov
2020-03-09 20:41             ` Jens Axboe
2020-03-09 21:02               ` Pavel Begunkov
2020-03-09 21:29                 ` Jens Axboe [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

IO-Uring Archive on

Archives are clonable:
	git clone --mirror 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/ \
	public-inbox-index io-uring

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone