User space gettimeofday()
User space gettimeofday()
Posted Dec 19, 2002 3:54 UTC (Thu) by kbob (guest, #1770)Parent article: How to speed up system calls
Gettimeofday() may not be practical in user space, but
getpid() certainly is. Other syscalls without side effects
that return infrequently changing information could also be
put into user space.
Posted Dec 19, 2002 5:53 UTC (Thu)
by ncm (guest, #165)
[Link]
gettimeofday() is called so frequently in real programs
Posted Dec 20, 2002 0:19 UTC (Fri)
by acristianb (guest, #1702)
[Link] (1 responses)
Posted Dec 20, 2002 20:54 UTC (Fri)
by jmshh (guest, #8257)
[Link]
While getpid() could certainly be put in user space, the User space getpid()
number of programs that it would speed up noticeably
could probably be counted on a pig's hoof. It would be
pretty surprising if any syscall used frequently enough
to make a difference could be handled in user space.
that any speedup matters, at least for some programs.
Few other syscalls have that property.
What are the side effects of gettimeofday?User space gettimeofday()
None. But there were two conditions, the other being "infrequently User space gettimeofday()
changing information". Updates require cache invalidation, and this is
better done when the data is really needed only.
