All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] EPOLL_CTL_SET operatin for epoll_ctl when using EPOLLONESHOT
Date: Fri, 25 Sep 2009 00:22:54 +0000	[thread overview]
Message-ID: <20090925002254.GA16356@sajinet.com.pe> (raw)
In-Reply-To: <alpine.DEB.2.00.0909241641100.1164@makko.or.mcafeemobile.com>

On Thu, Sep 24, 2009 at 04:46:20PM -0700, Davide Libenzi wrote:
> On Thu, 24 Sep 2009, Carlo Marcelo Arenas Belon wrote:
> 
> > Simplify userspace by eliminating the need to track whether a specific
> > filehandle was added to epoll already and only needs to be re-arm
> > after being internally disabled by EPOLLONESHOT.
> > 
> > EPOLL_CLT_SET can be used to add or modify a filehandle in epoll
> > using the kernel's internal tracking to apply the right equivalent
> > operation to EPOLL_CTL_ADD or EPOLL_CTL_MOD.
> 
> Applications (except poorly written ones) usually know what's in the 
> epoll set and what's not, in their bookkeeping.

agree, but since the kernel is also doing that bookkeeping using
ep_find it is possible by using this new operation to avoid doing
that in userspace, saving some cycles (and probably some contention in
multithreaded applications if the epoll set is global) in the hot path.

> I'm sorry, but I see no use of this code.

a very simple, probe of concept echoserver using this (once #defined)
is available from :

  http://sajino.sajinet.com.pe/echoserver.c

Carlo

  reply	other threads:[~2009-09-25  0:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 22:32 [PATCH] EPOLL_CTL_SET operatin for epoll_ctl when using EPOLLONESHOT Carlo Marcelo Arenas Belon
2009-09-24 23:46 ` Davide Libenzi
2009-09-25  0:22   ` Carlo Marcelo Arenas Belon [this message]
2009-09-25  0:34     ` Davide Libenzi

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=20090925002254.GA16356@sajinet.com.pe \
    --to=carenas@sajinet.com.pe \
    --cc=davidel@xmailserver.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.