From: Pavel Begunkov <[email protected]>
To: Xiaoguang Wang <[email protected]>,
[email protected]
Cc: Jens Axboe <[email protected]>
Subject: Re: [PATCH v2] io_uring: fix CQ waiting timeout handling
Date: Wed, 11 Jan 2023 14:44:44 +0000 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 1/11/23 06:39, Xiaoguang Wang wrote:
> hello,
>
>> /*
>> @@ -2564,7 +2564,7 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events,
>> }
>> prepare_to_wait_exclusive(&ctx->cq_wait, &iowq.wq,
>> TASK_INTERRUPTIBLE);
>> - ret = io_cqring_wait_schedule(ctx, &iowq, timeout);
>> + ret = io_cqring_wait_schedule(ctx, &iowq, &timeout);
>> if (__io_cqring_events_user(ctx) >= min_events)
>> break;
>> cond_resched();
> Does this bug result in any real issues?
> io_cqring_wait_schedule() calls schedule_hrtimeout(), but seems that
> schedule_hrtimeout() and its child functions don't modify timeout or expires
> at all, so I wonder how this patch works. Thanks.
Looked it up, you're right, I guess passing a pointer and one example
using it this way convinced me that it should be the case. Even more
interesting that as there is only HRTIMER_MODE_ABS and no relative
modes as before (IIRC) it wasn't a bug in the first place. Thanks
for taking a look
--
Pavel Begunkov
next prev parent reply other threads:[~2023-01-11 14:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 10:49 [PATCH v2] io_uring: fix CQ waiting timeout handling Pavel Begunkov
2023-01-11 6:39 ` Xiaoguang Wang
2023-01-11 14:44 ` Pavel Begunkov [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-01-05 15:05 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