[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1173593917.2958.150.camel@entropy>
Date: Sat, 10 Mar 2007 22:18:37 -0800
From: Nicholas Miell <nmiell@...cast.net>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Davide Libenzi <davidel@...ilserver.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [patch 6/9] signalfd/timerfd v1 - timerfd core ...
On Sat, 2007-03-10 at 21:31 -0800, Linus Torvalds wrote:
>
> On Sat, 10 Mar 2007, Nicholas Miell wrote:
> >
> > Ah, I see. You're just interested in fds as a generic handle concept,
> > and not a more Plan 9 type thing.
>
> Indeed. It's a "handle".
>
> UNIX has pid's for "process" handles, and "file descriptors" for just
> about everything else.
And I imagine that somebody will come up with way of getting a fd for a
process sooner or later.
> > If that's the goal, somebody should start thinking about reducing the
> > contents of struct file to the bare minimum (i.e. not much more than a
> > file_operations pointer).
>
> Well, there's more there, but it really is fairly close. If you look at
> it, a "struct file" ends up not having a lot more than the minimal stuff
> required to use it as a a handle: it really isn't a very big structure.
>
> The biggest part is actually the read-ahead state, which is arguably a
> generic thing for a file handle, even though not all kinds will be able to
> use it. We *could* make that be behind a pointer (along with the "f_pos"
> thing, that really logically goes along with the read-ahead thing), of
> course, but since most files probably do end up being "traditional file"
> structures, it's probably not wrong to just have it in the file.
>
Actually, I was thinking reducing struct file to the bare minimum, and
then using that as the common header shared by object-specific
structures. I don't know how unpleasant that would be from a memory
allocation perspective, though.
--
Nicholas Miell <nmiell@...cast.net>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists