linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Matthew Wilcox <willy@infradead.org>
Cc: David Laight <David.Laight@aculab.com>,
	"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] eventfd: convert to using ->write_iter()
Date: Mon, 3 May 2021 12:05:13 -0600	[thread overview]
Message-ID: <7263c088-22f5-d125-cf80-5ebbd9d110e5@kernel.dk> (raw)
In-Reply-To: <20210503180207.GD1847222@casper.infradead.org>

On 5/3/21 12:02 PM, Matthew Wilcox wrote:
> On Mon, May 03, 2021 at 11:57:08AM -0600, Jens Axboe wrote:
>> 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.
> 
> We do!
> 
> https://lore.kernel.org/linux-fsdevel/20210107151125.GB5270@casper.infradead.org/
> is one thread on it.  There have been others.

But then we really must get that fixed, imho ->read() and ->write()
should go away, and if the iter variants are 10% slower, then that should
get fixed up.

I'll go over that thread.

-- 
Jens Axboe


  reply	other threads:[~2021-05-03 18:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-03 14:57 [PATCH] eventfd: convert to using ->write_iter() Jens Axboe
2021-05-03 16:12 ` David Laight
2021-05-03 17:57   ` Jens Axboe
2021-05-03 18:02     ` Matthew Wilcox
2021-05-03 18:05       ` Jens Axboe [this message]
2021-05-04  8:07         ` David Laight
2021-05-09 13:22 ` [eventfd] cd8a8dd187: WARNING:at_include/linux/thread_info.h:#eventfd_write kernel test robot

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=7263c088-22f5-d125-cf80-5ebbd9d110e5@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=David.Laight@aculab.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).