From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roman Penyaev Subject: Re: [PATCHSET v2] io_uring IO interface Date: Fri, 11 Jan 2019 17:39:33 +0100 Message-ID: <43189f1be5f03697f750631d31ffaed5@suse.de> References: <20190110024404.25372-1-axboe@kernel.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: owner-linux-aio@kvack.org To: Ilya Dryomov Cc: Jens Axboe , linux-fsdevel , linux-aio@kvack.org, linux-block , linux-arch@vger.kernel.org, Christoph Hellwig , jmoyer@redhat.com, avi@scylladb.com, linux-block-owner@vger.kernel.org List-Id: linux-arch.vger.kernel.org On 2019-01-11 17:11, Ilya Dryomov wrote: > On Fri, Jan 11, 2019 at 10:51 AM Roman Penyaev > wrote: >> >> Hi Jens, >> >> That is interesting. Recently I sent an rfc related to epoll uring: >> >> https://lore.kernel.org/lkml/20190109164025.24554-1-rpenyaev@suse.de >> >> which can be mapped to userspace and all ready events can be consumed >> from it directly. I am wondering, is it possible to make some common >> API for all kind of ready events / urings, or it doesn't make any >> sense? > > I think you can use the new IOCB_CMD_POLL from Christoph and avoid > epoll_wait() in favor of aio/io_uring interface, at least in new high > performance applications. Yeah, I saw this extension for aio from Christoph. I was motivated to extend epoll with uring to avoid constant recharging of file descriptors, i.e. once you inserted descriptor to epoll you just consume events from uring (of course in that particular case only edge triggered events are supported). Also recently for epoll I fixed contention on event callback making hot path completely lockless, i.e. with uring epoll can become a nice thingy in terms of performance. But can any descriptor (on vfs layer) be extended to have a uring? To have some common API? Then if event source (say socket) has a uring (do not know how, just thoughts) and event destination (aio, epoll) has a uring, then reading on userside can be a matter of traversing urings. > Reaping events entirely in userspace (i.e. > performing io_getevents() without entering the kernel) has been > possible for a long time even with the existing aio interface. True. -- Roman -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to majordomo@kvack.org. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: aart@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:43374 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731998AbfAKQjg (ORCPT ); Fri, 11 Jan 2019 11:39:36 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 11 Jan 2019 17:39:33 +0100 From: Roman Penyaev Subject: Re: [PATCHSET v2] io_uring IO interface In-Reply-To: References: <20190110024404.25372-1-axboe@kernel.dk> Message-ID: <43189f1be5f03697f750631d31ffaed5@suse.de> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Ilya Dryomov Cc: Jens Axboe , linux-fsdevel , linux-aio@kvack.org, linux-block , linux-arch@vger.kernel.org, Christoph Hellwig , jmoyer@redhat.com, avi@scylladb.com, linux-block-owner@vger.kernel.org Message-ID: <20190111163933._LfL77A2ALIYhIJr8lrc7nnlOgw_Flfq0YD7cw4MJdA@z> On 2019-01-11 17:11, Ilya Dryomov wrote: > On Fri, Jan 11, 2019 at 10:51 AM Roman Penyaev > wrote: >> >> Hi Jens, >> >> That is interesting. Recently I sent an rfc related to epoll uring: >> >> https://lore.kernel.org/lkml/20190109164025.24554-1-rpenyaev@suse.de >> >> which can be mapped to userspace and all ready events can be consumed >> from it directly. I am wondering, is it possible to make some common >> API for all kind of ready events / urings, or it doesn't make any >> sense? > > I think you can use the new IOCB_CMD_POLL from Christoph and avoid > epoll_wait() in favor of aio/io_uring interface, at least in new high > performance applications. Yeah, I saw this extension for aio from Christoph. I was motivated to extend epoll with uring to avoid constant recharging of file descriptors, i.e. once you inserted descriptor to epoll you just consume events from uring (of course in that particular case only edge triggered events are supported). Also recently for epoll I fixed contention on event callback making hot path completely lockless, i.e. with uring epoll can become a nice thingy in terms of performance. But can any descriptor (on vfs layer) be extended to have a uring? To have some common API? Then if event source (say socket) has a uring (do not know how, just thoughts) and event destination (aio, epoll) has a uring, then reading on userside can be a matter of traversing urings. > Reaping events entirely in userspace (i.e. > performing io_getevents() without entering the kernel) has been > possible for a long time even with the existing aio interface. True. -- Roman