public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jesse Hughes <[email protected]>,
	"[email protected]" <[email protected]>
Cc: John <[email protected]>
Subject: Re: Emulating epoll
Date: Tue, 20 Apr 2021 17:59:29 +0100	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <YTBPR01MB2798B37324ED46A33DCD21B0BF489@YTBPR01MB2798.CANPRD01.PROD.OUTLOOK.COM>

On 4/20/21 5:37 PM, Jesse Hughes wrote:
> Hello,
> 
> I want to start by saying thank-you for working on io_uring.  My experience using it thus far has been great.
> 
> I'm working on an open-source database product (KeyDB, a multi-threaded redis fork) and we're considering rewriting our IO to use io_uring.  Our current implementation uses epoll, and processes IO on (mainly) sockets as they become ready.

Wonderful, always interesting to learn about emerging use cases
and new apps using it.

> 
> If I'm understanding the literature correctly, to emulate epoll, we should be able to set up a uring, put in a read sqe for each incoming socket connection, then (using liburing) call io_uring_wait_sqe​.  Correct?  Is there a better way of doing that?

In general, the best way to do I/O is to issue a read/write/etc. sqe
directly as you've mentioned. io_uring will take care of doing polling
internally or finding a better way to execute it.

However, to simply emulate epoll IORING_OP_POLL_ADD requests can be
used There is support for multi-shot poll requests, which Jens added
for coming linux 5.13

> 
> Our end-goal is not to emulate epoll, but that seems like the quickest way of getting something working that we can do further experiments with.
> 
> For reference, if anyone's interested, our source repo is at : https://github.com/EQ-Alpha/KeyDB

-- 
Pavel Begunkov

  reply	other threads:[~2021-04-20 16:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 16:37 Emulating epoll Jesse Hughes
2021-04-20 16:59 ` Pavel Begunkov [this message]
2021-04-20 17:48   ` Jesse Hughes
2021-04-23 14:07     ` Pavel Begunkov

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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