[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7caa3703-af14-2ff6-e409-77284da11e1f@kernel.dk>
Date: Mon, 3 May 2021 11:57:08 -0600
From: Jens Axboe <axboe@...nel.dk>
To: David Laight <David.Laight@...LAB.COM>,
"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] eventfd: convert to using ->write_iter()
On 5/3/21 10:12 AM, David Laight wrote:
> From: Jens Axboe
>> Sent: 03 May 2021 15:58
>>
>> Had a report on writing to eventfd with io_uring is slower than it
>> should be, and it's the usual case of if a file type doesn't support
>> ->write_iter(), then io_uring cannot rely on IOCB_NOWAIT being honored
>> alongside O_NONBLOCK for whether or not this is a non-blocking write
>> attempt. That means io_uring will punt the operation to an io thread,
>> which will slow us down unnecessarily.
>>
>> Convert eventfd to using fops->write_iter() instead of fops->write().
>
> Won't this have a measurable performance degradation on normal
> code that does write(event_fd, &one, 4);
If ->write_iter() or ->read_iter() is much slower than the non-iov
versions, then I think we have generic issues that should be solved.
That should not be a consideration, since the non-iov ones are
legacy and should not be adopted in new code.
--
Jens Axboe
Powered by blists - more mailing lists