Date: Mon, 30 Mar 2009 18:45:30 -0700 From: Maxim Sobolev <sobomax@FreeBSD.org> To: Robert Watson <rwatson@FreeBSD.org> Cc: Sergey Babkin <babkin@verizon.net>, freebsd-hackers@FreeBSD.org, attilio@FreeBSD.org, phk@phk.freebsd.dk, freebsd-current@FreeBSD.org, prashant.vaibhav@gmail.com Subject: Re: Improving the kernel/i386 timecounter performance (GSoC proposal) Message-ID: <49D175BA.6050307@FreeBSD.org> In-Reply-To: <alpine.BSF.2.00.0903272254460.12518@fledge.watson.org> References: <33531707.21385.1238188446396.JavaMail.root@vms074.mailsrvcs.net> <alpine.BSF.2.00.0903272254460.12518@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49D175BA.6050307>