lkml.org 
[lkml]   [2001]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Is sendfile all that sexy?
Felix von Leitner wrote:
> I cheated. I was only talking about open().
> close() is of course more expensive then.
>
> Other than that: where does the requirement come from?
> Can't we just use a free list where we prepend closed fds and always use
> the first one on open()? That would even increase spatial locality and
> be good for the CPU caches.

You would need to use a new open() flag: O_ANYFD.
The requirement comes from this like this:

close (0);
close (1);
close (2);
open ("/dev/console", O_RDWR);
dup ();
dup ();

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:14    [W:0.100 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site