Date: Fri, 19 Nov 2010 19:45:41 +0200 From: Alexander Motin <mav@FreeBSD.org> To: Andriy Gapon <avg@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: statclock(n) Message-ID: <4CE6B7C5.6040501@FreeBSD.org> In-Reply-To: <4CE6AC85.9040802@freebsd.org> References: <4CE6AC85.9040802@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi. Andriy Gapon wrote: > I wonder if instead of calling statclock() multiple times (after an idle period) > we couldn't call it just with an appropriate N parameter. > So some stats like e.g. cp_time[] could do +=N instead of ++. > Other stats ru_ixrss need to be updated only once. > Similarly, N could be passed further down to sched_clock() and handled there too. I think yes. It is reasonable. Initially hardclock() was also called in a loop. It was just rewritten first because it is called more often (more times), goes to hardware to sync time, and any way required changes to work properly. -- Alexander Motin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CE6B7C5.6040501>