Xref: utzoo comp.unix.wizards:10708 comp.os.misc:490 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!think!ames!lll-tis!helios.ee.lbl.gov!nosc!ucsd!ucsdhub!esosun!seismo!uunet!mcvax!jack From: jack@cwi.nl (Jack Jansen) Newsgroups: comp.unix.wizards,comp.os.misc Subject: Re: Reducing system calls overhead Message-ID: <7622@boring.cwi.nl> Date: 26 Aug 88 12:45:31 GMT References: <21606@ccicpg.UUCP> Sender: news@cwi.nl Organization: AMOEBA project, CWI, Amsterdam Lines: 21 I don't think that the solution you pose for simple calls would help anything. First, calls like getuid, getpid, etc. are very rare, and, second, there's a much simpler solution for these calls: just do the call the first time and cache the result. For getpid() you would need some help from fork/vfork, but nothing undoable. This would get the same results, and even cheaper. Now, two calls that *would* benefit from optimization are stat() and ioctl(). From some system call traces I've seen it showed that these calls are done incredibly often: stat() by programs that first check modes before they create a file; and ioctl() by all sorts of shells, etc. that have command line editing. Unfortunately the quick-entry system doesn't work here because both these calls can block.... Jack Jansen, jack@cwi.nl (or jack@mcvax.uucp) The shell is my oyster.