public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: lizetao <[email protected]>, Pavel Begunkov <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [PATCH -next] io_uring: add support for fchmod
Date: Sat, 14 Dec 2024 09:26:14 -0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 12/3/24 6:54 PM, lizetao wrote:
> Hi,
> 
>> -----Original Message-----
>> From: Pavel Begunkov <[email protected]>
>> Sent: Tuesday, December 3, 2024 10:44 PM
>> To: lizetao <[email protected]>; Jens Axboe <[email protected]>
>> Cc: [email protected]
>> Subject: Re: [PATCH -next] io_uring: add support for fchmod
>>
>> On 11/26/24 15:07, lizetao wrote:
>>>>>>> On 11/19/24 1:12 AM, lizetao wrote:
>>>>>>> Adds support for doing chmod through io_uring.
>> IORING_OP_FCHMOD
>>>>>>> behaves like fchmod(2) and takes the same arguments.
>>>>>
>>>>>> Looks pretty straight forward. The only downside is the forced use of
>> REQ_F_FORCE_ASYNC - did you look into how feasible it would be to allow
>> non-blocking issue of this? Would imagine the majority of fchmod calls end
>> up not blocking in the first place.
>>>>>
>>>>> Yes, I considered fchmod to allow asynchronous execution and wrote a
>> test case to test it, the results are as follows:
>>>>>
>>
>> FYI, this email got into spam.
> Sorry to bother everyone, but I would like to know if there are any
> plans to implement asynchronous system calls through io_uring, and
> which system calls are in the planning.

No specific plans, existing syscalls are mostly sync by nature of the
API for them. Supporting syscalls through io_uring in an efficient
manner generally necessitates changing something ala:

syscall_foo(..)
{
	return do_foo_syscall(...);
}

into

syscall_foo(...)
{
	start_foo_syscall(...);
	return wait_on_foo_syscall(...);
}

where the act of issuing and waiting for the completion of it are two
separate entities, generally where the waiting is a waitqueue and the
wait_on_foo_syscall() simply waits on it to be completed, and io_uring
can use this waitqueue to get a callback when it has finished.

That allows efficient processing of syscalls through io_uring. If you
don't do that, then you're stuck with do_foo_syscall(), and then
io_uring can only support it by punting to the io-wq worker threads
which will do the sync do_foo_sycall() part.

-- 
Jens Axboe

  reply	other threads:[~2024-12-14 16:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-26 15:07 [PATCH -next] io_uring: add support for fchmod lizetao
2024-11-27  2:10 ` Jens Axboe
2024-12-03 14:44 ` Pavel Begunkov
2024-12-04  1:54   ` lizetao
2024-12-14 16:26     ` Jens Axboe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-19  8:12 lizetao
2024-11-20 15:14 ` Jens Axboe

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] \
    [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