Re: [PATCH 3/3] io_uring: follow **iovec idiom in io_import_iovec

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

 



On 14/07/2020 00:09, Jens Axboe wrote:
> On 7/13/20 1:59 PM, Pavel Begunkov wrote:
>> @@ -3040,8 +3040,7 @@ static int io_read(struct io_kiocb *req, bool force_nonblock,
>>  		}
>>  	}
>>  out_free:
>> -	if (!(req->flags & REQ_F_NEED_CLEANUP))
>> -		kfree(iovec);
>> +	kfree(iovec);
>>  	return ret;
>>  }
> 
> Faster to do:
> 
> if (iovec)
> 	kfree(iovec)
> 
> to avoid a stupid call. Kind of crazy, but I just verified with this one
> as well that it's worth about 1.3% CPU in my stress test.

That looks crazy indeed

> Apart from that, looks good, I just folded in that change.

Great, thanks

-- 
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