linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Love <rml@novell.com>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: John McCutchan <ttb@tentacle.dhs.org>,
	Andrew Morton <akpm@osdl.org>, Christoph Hellwig <hch@lst.de>,
	arnd@arndb.de, zab@zabbo.net, linux-kernel@vger.kernel.org,
	viro@parcelfarce.linux.theplanet.co.uk
Subject: Re: [patch] inotify.
Date: Tue, 21 Jun 2005 11:55:27 -0400	[thread overview]
Message-ID: <1119369327.3949.251.camel@betsy> (raw)
In-Reply-To: <17079.31644.985407.988980@cse.unsw.edu.au>

On Tue, 2005-06-21 at 12:29 +1000, Neil Brown wrote:

> There may well be other good arguments against 'fd's, but I'm trying
> to point out that this isn't one of them, and so shouldn't appear in
> this part of the FAQ.

You raise a good point, although one could argue that raising the fd
limit is not necessarily feasible.

There are other good arguments.  With a single fd, there is a single
item to block on, which is mapped to a single queue of events.  The
single fd returns all watch events and also any potential out-of-band
data.  If every fd was a separate watch,

	- There would be no way to get event ordering.  Events on file
	  foo and file bar would pop poll() on both fd's, but there
	  would be no way to tell which happened first.  A single queue
	  trivially gives you ordering.
	- We'd have to maintain n fd's and n internal queues with state,
	  versus just one.  It is a lot messier in the kernel.
	- User-space developers prefer the current API.  The Beagle
	  guys, for example, love it.  Trust me, I asked.  It is not
	  a surprise: Who'd want to manage and block on 1000 fd's?
	- You'd have to manage the fd's, as an example: call close()
	  when you received a delete event.
	- No way to get out of band data.
	- 1024 is still too low.  ;-)

When you talk about designing a file change notification system that
scales to 1000s of directories, juggling 1000s of fd's just does not
seem the right interface.  It is too heavy.

I should add this to the FAQ, yes.  ;-)

	Robert Love



  parent reply	other threads:[~2005-06-21 16:02 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-15 17:18 [patch] inotify Robert Love
2005-06-16 17:52 ` Zach Brown
2005-06-16 18:25   ` Robert Love
2005-06-17  1:30     ` Nick Piggin
2005-06-17  1:35       ` Robert Love
2005-06-17 15:15         ` [patch] inotify, improved Robert Love
2005-06-17 15:37           ` Chris Friesen
2005-06-17 15:44             ` Robert Love
2005-06-17 16:11               ` Valdis.Kletnieks
2005-06-17 16:29                 ` Robert Love
2005-06-17 16:36                 ` Chris Friesen
2005-06-17 16:43                   ` Chris Wright
2005-06-17 16:46                   ` Muli Ben-Yehuda
2005-06-17 16:40               ` Chris Friesen
2005-06-17 17:57                 ` John McCutchan
2005-06-17 17:20           ` Zach Brown
2005-06-17 17:54             ` John McCutchan
2005-06-17 17:56               ` Zach Brown
2005-06-17 18:15                 ` John McCutchan
2005-06-17 18:17                   ` Zach Brown
2005-06-17 17:07     ` [patch] inotify Arnd Bergmann
2005-06-17 17:54       ` Christoph Hellwig
2005-06-17 18:12         ` John McCutchan
2005-06-17 18:16         ` Robert Love
2005-06-17 18:28           ` Christoph Hellwig
2005-06-17 18:38             ` Robert Love
2005-06-17 18:45               ` Christoph Hellwig
2005-06-17 18:54                 ` Robert Love
2005-06-17 17:56       ` John McCutchan
2005-06-17 21:33         ` Andrew Morton
2005-06-17 21:40           ` Robert Love
2005-06-17 23:52             ` Robert Love
2005-06-21  0:51               ` Neil Brown
2005-06-21  2:15                 ` John McCutchan
2005-06-21  2:29                   ` Neil Brown
2005-06-21  2:43                     ` John McCutchan
2005-06-21 15:55                     ` Robert Love [this message]
2005-07-14  0:25                       ` Neil Brown
2005-07-14  4:11                         ` John McCutchan
2005-06-18  0:05             ` Arnd Bergmann
2005-06-18  0:57               ` Robert Love
2005-06-18  1:51       ` Chris Wedgwood
  -- strict thread matches above, loose matches on Subject: below --
2005-05-09 16:05 Robert Love
2005-05-09 17:43 ` Coywolf Qi Hunt
2005-01-06 20:00 Robert Love

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=1119369327.3949.251.camel@betsy \
    --to=rml@novell.com \
    --cc=akpm@osdl.org \
    --cc=arnd@arndb.de \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    --cc=ttb@tentacle.dhs.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    --cc=zab@zabbo.net \
    /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;
as well as URLs for NNTP newsgroup(s).