public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jiri Slaby <[email protected]>, [email protected]
Cc: Jens Axboe <[email protected]>
Subject: Re: [PATCH 2/7] io_uring/net: don't overflow multishot recv
Date: Thu, 14 Sep 2023 14:02:26 +0100	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 9/14/23 09:34, Jiri Slaby wrote:
> On 11. 08. 23, 14:53, Pavel Begunkov wrote:
>> Don't allow overflowing multishot recv CQEs, it might get out of
>> hand, hurt performanece, and in the worst case scenario OOM the task.
>>
>> Cc: [email protected]
>> Fixes: b3fdea6ecb55c ("io_uring: multishot recv")
>> Signed-off-by: Pavel Begunkov <[email protected]>
>> ---
>>   io_uring/net.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/io_uring/net.c b/io_uring/net.c
>> index 1599493544a5..8c419c01a5db 100644
>> --- a/io_uring/net.c
>> +++ b/io_uring/net.c
>> @@ -642,7 +642,7 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret,
>>       if (!mshot_finished) {
>>           if (io_aux_cqe(req, issue_flags & IO_URING_F_COMPLETE_DEFER,
>> -                   *ret, cflags | IORING_CQE_F_MORE, true)) {
>> +                   *ret, cflags | IORING_CQE_F_MORE, false)) {
> 
> This one breaks iouring's recv-multishot.t test:
> Running test recv-multishot.t                                       MORE flag not set
> test stream=0 wait_each=0 recvmsg=0 early_error=4  defer=0 failed
> Test recv-multishot.t failed with ret 1
> 
> Is the commit or the test broken ;)?

The test is not right. I fixed it up while sending the kernel patch,
but a new liburing version hasn't been cut yet and I assume you're
not using upstream version?

> 
>>               io_recv_prep_retry(req);
>>               /* Known not-empty or unknown state, retry */
>>               if (cflags & IORING_CQE_F_SOCK_NONEMPTY ||
> 
> thanks,

-- 
Pavel Begunkov

  reply	other threads:[~2023-09-14 13:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11 12:53 [PATCH 0/7] random fixes and cleanups Pavel Begunkov
2023-08-11 12:53 ` [PATCH 1/7] io_uring/net: don't overflow multishot accept Pavel Begunkov
2023-08-11 12:53 ` [PATCH 2/7] io_uring/net: don't overflow multishot recv Pavel Begunkov
2023-09-14  8:34   ` Jiri Slaby
2023-09-14 13:02     ` Pavel Begunkov [this message]
2023-09-14 14:15       ` Jens Axboe
2023-08-11 12:53 ` [PATCH 3/7] io_uring: open code io_fill_cqe_req() Pavel Begunkov
2023-08-11 12:53 ` [PATCH 4/7] io_uring: remove return from io_req_cqe_overflow() Pavel Begunkov
2023-08-11 12:53 ` [PATCH 5/7] io_uring: never overflow io_aux_cqe Pavel Begunkov
2023-08-11 12:53 ` [PATCH 6/7] io_uring/rsrc: keep one global dummy_ubuf Pavel Begunkov
2023-08-11 12:53 ` [PATCH 7/7] io_uring: simplify io_run_task_work_sig return Pavel Begunkov
2023-08-11 16:43 ` [PATCH 0/7] random fixes and cleanups 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