From: lizetao <[email protected]>
To: Jens Axboe <[email protected]>
Cc: "[email protected]" <[email protected]>,
"[email protected]" <[email protected]>
Subject: re: [PATCH -next] io_uring: add support for fchmod
Date: Tue, 26 Nov 2024 15:07:51 +0000 [thread overview]
Message-ID: <[email protected]> (raw)
Hi,
>On 11/23/24 5:23 AM, lizetao wrote:
>> Hi
>>
>>>> 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:
>>
>> fchmod:
>> real 0m1.413s
>> user 0m0.253s
>> sys 0m1.079s
>>
>> io_uring + fchmod:
>> real 0m1.268s
>> user 0m0.015s
>> sys 0m5.739s
>>
>> There is about a 10% improvement.
> And that makes sense if you're keeping some fchmod inflight, as you'd generally just have one io-wq processing them and running things in parallel with submission. But what you you keep an indepth count of 1, eg do sync fchmod? Then it'd be considerably slower than the syscall.
Indeed, When performing REQ_F_FORCE_ASYNC operations at depth 1, performance is degraded. The results are as follows:
fchmod:
real 0m2.285s
user 0m0.050s
sys 0m1.996s
io_uring + fchmod:
real 0m2.541s
user 0m0.013s
sys 0m2.379s
>This isn't necessarily something to worry about, but fact is that if you can do a nonblock issue and have it succeed most of the time, that'll be more efficient (and faster for low/sync fchmod) than something that just offloads to io-wq. You can see that from your results too, comparing the sys number netween the two.
However, when I remove REQ_F_FORCE_ASYNC and use IO_URING_F_NONBLOCK, the performance is not improved. The measured results are as follows:
fchmod:
real 0m2.132s
user 0m0.048s
sys 0m1.845s
io_uring + fchmod:
real 0m2.196s
user 0m0.005s
sys 0m2.097s
>Hence why I'm asking if you looked into doing a nonblocking issue at all. This won't necessarily gate the inclusion of the patch, and it is something that can be changed down the line, I'm mostly just curious.
Does this result meet expectations? Or maybe I missed something, please let me know
>--
>Jens Axboe
---
Li Zetao
next reply other threads:[~2024-11-26 15:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 15:07 lizetao [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-19 8:12 [PATCH -next] io_uring: add support for fchmod 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