All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Subject: Re: [PATCH v2 1/1] io_uring: allocate memory for overflowed CQEs
Date: Tue, 23 Feb 2021 15:36:11 +0000	[thread overview]
Message-ID: <6811dd8d-dc62-d701-1b83-82b289aaee05@gmail.com> (raw)
In-Reply-To: <02fb8f5f-3f97-5945-06cd-c155574847e5@kernel.dk>

On 23/02/2021 14:22, Jens Axboe wrote:
> On 2/23/21 5:40 AM, Pavel Begunkov wrote:
>> +	if (!ctx->cq_overflow_flushed &&
>> +	    !atomic_read(&req->task->io_uring->in_idle)) {
>> +		struct io_overflow_cqe *ocqe = kmalloc(sizeof(*ocqe), GFP_KERNEL);
> 
> This needs to be GFP_ATOMIC. And we should probably make it GFP_ATOMIC |
> __GFP_ACCOUNT to ensure it gets accounted, since the list could grow
> pretty big potentially.

Agree. I was thinking about it being naturally limited by inflight reqs,
but well we're speaking about multiple CQEs...

-- 
Pavel Begunkov

  reply	other threads:[~2021-02-23 15:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 12:40 [PATCH v2 1/1] io_uring: allocate memory for overflowed CQEs Pavel Begunkov
2021-02-23 14:22 ` Jens Axboe
2021-02-23 15:36   ` Pavel Begunkov [this message]
2021-02-24  3:06 ` Hao Xu
2021-02-24  3:18   ` Jens Axboe
2021-02-24  3:47     ` Hao Xu
2021-02-24  9:39     ` 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 \
    --in-reply-to=6811dd8d-dc62-d701-1b83-82b289aaee05@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.