Re: Improving the kernel/i386 timecounter performance (GSoC proposal)

From: Maxim Sobolev <sobomax_at_FreeBSD.org>
Date: Mon, 30 Mar 2009 18:45:30 -0700
Robert Watson wrote:
> Part of the point of mapping in the page at execve()-time, or 
> fork()-time for per-process pages (which I'm not entirely convinced we 
> need yet) is to avoid the cost of an extra device open, mmap, etc, for 
> every execve(), which can be quite expensive.  I stuck a prototype page 

You don't really need to do it on every execve() unconditionally. It 
could be done on demand in libc, so that only when thread pass certain 
threshold, the "common page optimization code" kicks in and does its 
open/mmap/etc magic. Otherwise, "normal" syscall is performed. The 
implementation could be as simple as counter in the appropriate libc 
routine, so that optimization engages after certain number of calls. For 
syscalls that return time it's also easy to do frequency thresholds, so 
that for example gettimeofday() only gets optimized if threads calls it 
more frequently that 1 call/sec.

-Maxim
Received on Mon Mar 30 2009 - 23:45:38 UTC

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