Re: Is sendfile all that sexy?

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Tue Jan 16 2001 - 08:48:49 EST


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/



This archive was generated by hypermail 2b29 : Tue Jan 23 2001 - 21:00:12 EST