[gamin] Re: [RFC][PATCH] inotify 0.10.0
- From: Ray Lee <ray-lk madrabbit org>
- To: John McCutchan <ttb tentacle dhs org>
- Cc: Andrew Morton <akpm osdl org>, gamin-list gnome org, viro parcelfarce linux theplanet co uk, rml novell com, linux-kernel vger kernel org, iggy gentoo org
- Subject: [gamin] Re: [RFC][PATCH] inotify 0.10.0
- Date: Tue, 28 Sep 2004 14:32:12 -0700
On Tue, 2004-09-28 at 16:40 -0400, John McCutchan wrote:
> On Tue, 2004-09-28 at 15:08, Andrew Morton wrote:
> > Ray Lee <ray-lk madrabbit org> wrote:
> > >
> > > The current way pads out the structure unnecessarily, and still doesn't
> > > handle the really long filenames, by your admission. It incurs extra
> > > syscalls, as few filenames are really 256 characters in length.
> >
> > Why don't you pass a file descriptor into the syscall instead of a pathname?
> > You can then take a ref on the inode and userspace can close the file.
> > That gets you permission checking for free.
> >
>
> I don't think moving inotify to a syscall based interface is worth it.
>
> First off, on startup, this would require about 2k open() calls,
> followed by 2k syscalls to inotify.
And then 2k close() calls.
> Not as nice as just 2k ioctl() calls.
<shrug> Syscalls aren't free, but they aren't the end of the world.
> The character device interface right now suits it perfectly. If we used
> syscalls we would need to provide a syscall that gives user space a FD
> that it can read events on,
Again, apologies, I should know better than to write email on short
sleep. All I was suggesting was that we pass in an fd that comes from
open(), and that we should look at replacing the ioctl with write(). I
like it as a character device, honest.
Ray
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]