[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <562FE678.2030307@gmail.com>
Date: Tue, 27 Oct 2015 14:02:48 -0700
From: David Daney <ddaney.cavm@...il.com>
To: Leonid Yegoshin <Leonid.Yegoshin@...tec.com>
CC: Ralf Baechle <ralf@...ux-mips.org>,
Markos Chandras <markos.chandras@...tec.com>,
linux-mips@...ux-mips.org, Alex Smith <alex.smith@...tec.com>,
linux-kernel@...r.kernel.org
Subject: Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and
clock_gettime()
On 10/27/2015 01:46 PM, Leonid Yegoshin wrote:
[...]
>
> And finally. clock scaling - what we would do if there are two CPUs with
> different clock ratios in system? It seems like common kernel timing
> subsystem can handle that.
>
The code that executes in userspace must have access to a consistent
clock source. If you are running on a SMP system that doesn't have
synchronized CP0.Count registers, then your gettimeofday() cannot use
CP0.Count (RDHWR $2).
As far as I know, CP0.Count is the only available counter visible to
userspace, so you would have to disable the accelerated versions of
gettimeofday() where you cannot assert that the counters are always
synchronized.
David Daney
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists