Re: Suggestions on Avoiding syscall Overhead

From: Tim Kientzle <kientzle_at_freebsd.org>
Date: Mon, 23 Apr 2007 21:05:51 -0700
>>>>We can have 3 type of pages mapped into one process's address map.
>>>>1. System wide global readonly page which will help on these syscalls:
>>>> gethostname,getdomainname,uname
>>>>2. Per process Readonly page. (change will still through standard syscall)
>>>> help on the syscalls:
>>>> getuid, geteuid, getpid,getgid, getegid, getpgrp,
>>
>>I don't really understand this suggestion.
>>Do any real programs call these syscalls very often?
> 
> There is indeed more and more programs calling some syscalls a
> *lot* ....  MySQL calls gettimeofday() so much that changing
> the timer used on a system can lead to a very observable performance
> improvement.  Similarly, PostgreSQL calls setproctitle() a lot  ...

Accelerating gettimeofday() makes a lot of sense; I've seen a
lot of programs that call it very often.

I'm not convinced about calls such as getuid() and gethostname(),
though.  Putting this kind of information in userspace
introduces forward-compatibility concerns. People do
statically link against libc, so you have to make sure that libc can
find this information even when running on future kernels.
That makes each such call a tricky maintenance issue.

Tim
Received on Tue Apr 24 2007 - 02:05:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:09 UTC