public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt•net>
To: Martin Sustrik <sustrik@250bpm•com>
Cc: Andrew Morton <akpm@linux-foundation•org>,
	Alexander Viro <viro@zeniv•linux.org.uk>,
	Sha Zhengju <handai.szj@taobao•com>,
	linux-fsdevel@vger•kernel.org, linux-kernel@vger•kernel.org,
	netdev@vger•kernel.org
Subject: Re: [PATCH 1/1] eventfd: implementation of EFD_MASK flag
Date: Sat, 9 Feb 2013 11:51:49 +0000	[thread overview]
Message-ID: <20130209115149.GA15636@dcvr.yhbt.net> (raw)
In-Reply-To: <5115FC6A.8000603@250bpm.com>

Martin Sustrik <sustrik@250bpm•com> wrote:
> On 09/02/13 04:54, Eric Wong wrote:
> >>>Using one eventfd per userspace socket still seems a bit wasteful.
> >>
> >>Wasteful in what sense? Occupying a slot in file descriptor table?
> >>That's the price for having the socket uniquely identified by the
> >>fd.
> >
> >Yes.  I realize eventfd is small, but I don't think eventfd is needed
> >at all, here.  Just one pipe.
> 
> Ah. Got you! You mean not to change the kernel, just use pipe for
> the purpose.
> 
> However, the convoluted pipe-style design is the problem I am trying
> to solve rather than the solution. It leads to convoluted APIs with
> convoluted semantics as described in the article. I've been using
> that kind of design for past 8 years and every time I have to deal
> with it I swear that one day I will implement a proper in-kernel
> solution to get rid of the hack.
> 
> And now I have finally done so.

Yes, your eventfd change is probably the best way if you want/need
to only watch a subset of your sockets, especially if you want
poll/select to be an option.


  reply	other threads:[~2013-02-09 11:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1360219292-19754-1-git-send-email-sustrik@250bpm.com>
     [not found] ` <20130207144433.527ef024.akpm@linux-foundation.org>
2013-02-08 12:43   ` [PATCH 1/1] eventfd: implementation of EFD_MASK flag Martin Sustrik
2013-02-08 22:21     ` Eric Wong
2013-02-09  2:40       ` Martin Sustrik
2013-02-09  3:54         ` Eric Wong
2013-02-09  7:36           ` Martin Sustrik
2013-02-09 11:51             ` Eric Wong [this message]
2013-02-09 12:04               ` Martin Sustrik
2013-02-07 23:29 Martin Sustrik
2013-02-15  2:45 ` Michał Mirosław

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=20130209115149.GA15636@dcvr.yhbt.net \
    --to=normalperson@yhbt$(echo .)net \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=handai.szj@taobao$(echo .)com \
    --cc=linux-fsdevel@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sustrik@250bpm$(echo .)com \
    --cc=viro@zeniv$(echo .)linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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