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

From: Robert Watson <rwatson_at_FreeBSD.org>
Date: Fri, 27 Mar 2009 23:05:34 +0000 (GMT)
On Fri, 27 Mar 2009, Poul-Henning Kamp wrote:

> In message <alpine.BSF.2.00.0903272254460.12518_at_fledge.watson.org>, Robert Wats
> on writes:
>
>> I guess interesting questions are whether (a) it would be desirable to have 
>> per-page, per-cpu, or per-thread mappings.  If there are non-synchronized 
>> TSCs, then there might be some interesting advantages to a per-CPU page.
>
> Rule #3:
> 	The only thing worse than generalizing from one example is
> 	generalizing from no examples at all.
>
> We can add those mappings when we know why we would want them.

If we believe TSCs won't be synchronized, and don't want to synchronize them 
ourselves, then we'll need different mapping state to get from a TSC stamp to 
a time on different CPUs.  In which case user application threads will need to 
know their CPU in order to use the right conversion data (ideally without a 
system call, since that's part of what we're avoiding here), or use a per-CPU 
mapping and not know (in which case they'll need to detect and handle the very 
rare "preempted and migrated between read TSC and read conversion data" race). 
I'm not pushing a per-CPU page, but there would be some interesting advantages 
to supporting that.

Robert N M Watson
Computer Laboratory
University of Cambridge
Received on Fri Mar 27 2009 - 22:05:35 UTC

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