Re: [PATCH v2 1/1] io_uring: allocate memory for overflowed CQEs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux