Linux-Block Archive on lore.kernel.org
 help / color / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Hristo Venev <hristo@venev.name>
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH] io_uring: allocate the two rings together
Date: Tue, 27 Aug 2019 09:50:48 -0600
Message-ID: <80e0e408-f602-4446-d244-60f9d4ce9c71@kernel.dk> (raw)
In-Reply-To: <20190826172346.8341-1-hristo@venev.name>

On 8/26/19 11:23 AM, Hristo Venev wrote:
> Both the sq and the cq rings have sizes just over a power of two, and
> the sq ring is significantly smaller. By bundling them in a single
> alllocation, we get the sq ring for free.
> 
> This also means that IORING_OFF_SQ_RING and IORING_OFF_CQ_RING now mean
> the same thing. If we indicate this to userspace, we can save a mmap
> call.

This looks pretty good to me. My only worry was ending up with sq and
cq cacheline sharing, but the alignment of the io_uring struct itself
should prevent that nicely.

Outside of going for a cleanup, have you observed any wins from this
change?

-- 
Jens Axboe


  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26 17:23 Hristo Venev
2019-08-27 15:50 ` Jens Axboe [this message]
2019-08-27 19:35   ` Hristo Venev
2019-08-29 15:04     ` Jens Axboe
2019-09-06 16:26       ` Jens Axboe
2019-09-06 19:12         ` [PATCH 1/2] liburing/test: There are now 4 reserved fields Hristo Venev
2019-09-06 19:12           ` [PATCH 2/2] liburing: Use the single mmap feature Hristo Venev
2019-09-06 19:30             ` Jens Axboe
2019-09-06 19:24           ` [PATCH 1/2] liburing/test: There are now 4 reserved fields Jens Axboe

Reply instructions:

You may reply publically 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=80e0e408-f602-4446-d244-60f9d4ce9c71@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=hristo@venev.name \
    --cc=linux-block@vger.kernel.org \
    /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

Linux-Block Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-block/0 linux-block/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 linux-block linux-block/ https://lore.kernel.org/linux-block \
		linux-block@vger.kernel.org linux-block@archiver.kernel.org
	public-inbox-index linux-block

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-block


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