All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Subject: Re: [PATCH 3/8] io_uring: don't keep submit_state on stack
Date: Mon, 25 Jan 2021 16:25:53 +0000	[thread overview]
Message-ID: <86406a3b-7d8e-5521-f6b5-f3a940a0565d@gmail.com> (raw)
In-Reply-To: <d802eb6f-f491-d35c-f556-c7d0285c6974@kernel.dk>

On 25/01/2021 16:00, Jens Axboe wrote:
> On 1/25/21 4:42 AM, Pavel Begunkov wrote:
>> struct io_submit_state is quite big (168 bytes) and going to grow. It's
>> better to not keep it on stack as it is now. Move it to context, it's
>> always protected by uring_lock, so it's fine to have only one instance
>> of it.
> 
> I don't like this one. Unless you have plans to make it much bigger,
> I think it should stay on the stack. On the stack, the ownership is
> clear.

Thinking of it, it's not needed for this series, just traversing a list
twice is not nice but bearable.

For experiments I was using its persistency across syscalls + grew it
to 32 to match up completion flush (allocating still by 8) to add req
memory reuse, but that's out of scope of these patches.
I haven't got a strong opinion on that one yet, even though
alloc/dealloc are pretty heavy, this approach may loose allocation
locality. 

-- 
Pavel Begunkov

  reply	other threads:[~2021-01-25 16:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 11:42 [PATCH 0/8] second part of 5.12 patches Pavel Begunkov
2021-01-25 11:42 ` [PATCH 1/8] io_uring: ensure only sqo_task has file notes Pavel Begunkov
2021-01-25 11:42 ` [PATCH 2/8] io_uring: consolidate putting reqs task Pavel Begunkov
2021-01-25 11:42 ` [PATCH 3/8] io_uring: don't keep submit_state on stack Pavel Begunkov
2021-01-25 16:00   ` Jens Axboe
2021-01-25 16:25     ` Pavel Begunkov [this message]
2021-01-25 16:31       ` Jens Axboe
2021-01-25 16:52         ` Pavel Begunkov
2021-01-25 11:42 ` [PATCH 4/8] io_uring: remove ctx from comp_state Pavel Begunkov
2021-01-25 11:42 ` [PATCH 5/8] io_uring: don't reinit submit state every time Pavel Begunkov
2021-01-25 11:42 ` [PATCH 6/8] io_uring: replace list with array for compl batch Pavel Begunkov
2021-01-25 11:42 ` [PATCH 7/8] io_uring: submit-completion free batching Pavel Begunkov
2021-01-25 11:42 ` [PATCH 8/8] io_uring: keep interrupts on on submit completion Pavel Begunkov
2021-01-25 16:02   ` Jens Axboe
2021-01-25 16:08 ` [PATCH 0/8] second part of 5.12 patches Jens Axboe
2021-01-25 16:56   ` Pavel Begunkov
2021-01-25 17:04     ` Jens Axboe
2021-01-25 17:05       ` Pavel Begunkov

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=86406a3b-7d8e-5521-f6b5-f3a940a0565d@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.