Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Dec 2010 21:38:09 +0200
From:      Andriy Gapon <avg@freebsd.org>
To:        Jung-uk Kim <jkim@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: non-invariant tsc and cputicker
Message-ID:  <4CFD3BA1.8080901@freebsd.org>
In-Reply-To: <201012061429.08085.jkim@FreeBSD.org>
References:  <4CF92852.20705@freebsd.org> <201012061401.17904.jkim@FreeBSD.org> <4CFD34E1.40008@freebsd.org> <201012061429.08085.jkim@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 06/12/2010 21:27 Jung-uk Kim said the following:
> On Monday 06 December 2010 02:09 pm, Andriy Gapon wrote:
>> on 06/12/2010 21:01 Jung-uk Kim said the following:
>>> :-) Don't get me wrong, I generally agree with you *iff* it does
>>> : not
>>>
>>> hurt too much.  Anyway, this issue should be resolved from the
>>> root, i.e., kern_resouce.c, if possible.
>>
>> But what to resolve there?
> 
> Better algorithm for stat.
> 
>> I just want to always have a stable source "cpu ticks", and then
>> everything else should just work?
> 
> If we had one, yes.  But we don't, at least for old x86 hardware. :-(

This sounds contradictory... I don't follow.
So, TSC as a direct source of cpu ticks is good enough, but TSC as a source for
timecounter acting as a source for cpu ticks is not stable?

>> BTW, if someone comes up with a patch for more or less correct
>> accounting when "cpu ticks" frequency is allowed to change, then I
>> am all for it. But, IMO, it's just easier to use stable "cpu
>> ticks".
> 
> If it doesn't hurt too much, yes.  Remember the P-state invariant CPUs 
> are pretty new.

Well, not that new in this fast changing world.

> SMP-correct TSC is quite rare if there is any.

This contradicts my experience. All systems that I could test have "SMP-correct
TSC".  Yes, they all are 1-2 years old and they all are single-package multi-core
 systems.  I tested only one two-socket machine from perf-cluster and it had more
or less "SMP-correct TSC" too.
BTW:
http://people.freebsd.org/~avg/tsc/

But, this SMP-correctness is not a requirement for the cpu ticks accounting that
we are discussing, right?

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CFD3BA1.8080901>