public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Davide Libenzi <davidel@xmailserver.org>
To: "Christopher K. St. John" <cks@distributopia.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: /dev/yapoll : Re: [PATCH] /dev/epoll update ...
Date: Fri, 21 Sep 2001 13:10:17 -0700 (PDT)	[thread overview]
Message-ID: <XFMail.20010921131017.davidel@xmailserver.org> (raw)
In-Reply-To: <3BAB9790.8DB400C@distributopia.com>


On 21-Sep-2001 Christopher K. St. John wrote:
>  To save further pointless argument, I'm calling the
> experiment "/dev/yapoll". 
> 
>  Specifically, I've added code to return the initial
> state of the fd's as they are added to the interest
> list. It seems to work ok so far, but I'll be doing
> some benchmarking this weekend. I will post a patch
> if no problems turn up.

By reporting the initial state of the connection will make
/dev/epoll to be a hybrid interface and looks pretty crappy to me.
You'll be able, eventually, to skip only the first system call anyway.
You still won't be able to use an interface like :

        if (ioctl(DATA_READY))
                read();

Coz if 2000 bytes arrives on the terminal and you read only 1000 bytes
you won't receive another POLLIN event and you'll get stuck in the ioctl().
You can avoid this in two ways :

1) test ( w/ or w/o hints ) the readyness of the terminal, that means /dev/poll

2) add inside the network code functions that are going to maintain the state
        of the connections directly by writing your own fd-state token.
        Tha means
        1) when the data is exhausted it clears the data-ready bit
        2 ) when the tx buffer is full it clears the terminal-ready bit

But, again, you're going to have a state reporting interface vs an event reporting
one like /dev/epoll




- Davide


  reply	other threads:[~2001-09-21 20:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-21  6:22 [PATCH] /dev/epoll update Dan Kegel
2001-09-21 18:45 ` Davide Libenzi
2001-09-21 19:40   ` /dev/yapoll : " Christopher K. St. John
2001-09-21 20:10     ` Davide Libenzi [this message]
2001-09-21 20:21       ` Christopher K. St. John
2001-09-21 21:36         ` Davide Libenzi
2001-09-21 21:33           ` Christopher K. St. John
2001-09-21 21:52             ` 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=XFMail.20010921131017.davidel@xmailserver.org \
    --to=davidel@xmailserver.org \
    --cc=cks@distributopia.com \
    --cc=linux-kernel@vger.kernel.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