From: Jens Axboe <[email protected]>
To: Pavel Begunkov <[email protected]>, [email protected]
Subject: Re: [PATCH 3/3] io_uring: move struct io_kiocb from task_struct to io_uring_task
Date: Mon, 4 Nov 2024 09:16:46 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 11/4/24 8:41 AM, Pavel Begunkov wrote:
> On 11/3/24 17:49, Jens Axboe wrote:
>> Rather than store the task_struct itself in struct io_kiocb, store
>> the io_uring specific task_struct. The life times are the same in terms
>> of io_uring, and this avoids doing some dereferences through the
>> task_struct. For the hot path of putting local task references, we can
>
> Makes me wonder, is __io_submit_flush_completions() the only hot
> place it tries to improve? It doesn't have to look into the task
> there but on the other hand we need to do it that init.
> If that's costly, for DEFER_TASKRUN we can get rid of per task
> counting, the task is pinned together with the ctx, and the task
> exit path can count the number of requests allocated.
>
> if (!(ctx->flags & DEFER_TASKRUN))
> io_task_get_ref();
>
> if (!(ctx->flags & DEFER_TASKRUN))
> io_task_put_ref();
>
> But can be further improved
Avoid task refs would surely be useful. For SINGLE_ISSUER, no?
--
Jens Axboe
next prev parent reply other threads:[~2024-11-04 16:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-03 17:49 [PATCHSET 0/3] Move io_kiocb from task_struct to io_uring_task Jens Axboe
2024-11-03 17:49 ` [PATCH 1/3] io_uring: move cancelations to be io_uring_task based Jens Axboe
2024-11-03 17:49 ` [PATCH 2/3] io_uring: remove task ref helpers Jens Axboe
2024-11-03 17:49 ` [PATCH 3/3] io_uring: move struct io_kiocb from task_struct to io_uring_task Jens Axboe
2024-11-03 21:47 ` Pavel Begunkov
2024-11-03 21:54 ` Jens Axboe
2024-11-03 22:05 ` Pavel Begunkov
2024-11-03 22:18 ` Jens Axboe
2024-11-03 22:36 ` Pavel Begunkov
2024-11-03 22:40 ` Jens Axboe
2024-11-03 22:47 ` Pavel Begunkov
2024-11-03 22:51 ` Jens Axboe
2024-11-03 23:17 ` Pavel Begunkov
2024-11-03 23:25 ` Jens Axboe
2024-11-04 15:41 ` Pavel Begunkov
2024-11-04 16:16 ` Jens Axboe [this message]
2024-11-04 16:43 ` 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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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