From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755162AbbJ1UPn (ORCPT ); Wed, 28 Oct 2015 16:15:43 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:13318 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752496AbbJ1UPl (ORCPT ); Wed, 28 Oct 2015 16:15:41 -0400 Message-ID: <56312CE9.3090301@imgtec.com> Date: Wed, 28 Oct 2015 13:15:37 -0700 From: Leonid Yegoshin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Alex Smith CC: David Daney , Ralf Baechle , Markos Chandras , linux-mips , Alex Smith , Subject: Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime() References: <1445417864-31453-1-git-send-email-markos.chandras@imgtec.com> <5629904A.2070400@imgtec.com> <20151027144748.GA23785@linux-mips.org> <562FE29C.8040106@imgtec.com> <562FE678.2030307@gmail.com> <562FE96C.3070002@imgtec.com> <562FF05A.508@gmail.com> <562FF15A.1050507@imgtec.com> <56311231.10503@imgtec.com> <56311AA9.6040101@imgtec.com> <563121D5.4030601@imgtec.com> In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.20.3.92] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/28/2015 12:55 PM, Alex Smith wrote: > On 28 October 2015 at 19:28, Leonid Yegoshin wrote: >> . > Clocksources are not per-CPU. If the CP0 counter is the current > clocksource, then both the kernel and VDSO implementations of > gettimeofday will read out the CP0 counter from whatever CPU they run > on. OK, it was an invalid example. Let's be specific - in case of different clock frequency in different CPUs it easy to adjust it in kernel via clocksource->read()/etc but it is impossible to adjust that in VDSO implementation. And that can't be fixed easily without some-kind of "per-thread" data page for correct multipliers. There are many problems with assumption that in all kind of MIPS cores R4K CP0_COUNT registers are in sync in different CPUs. Even current kernel has problems here but I think it is not excuse to mount more on it. - Leonid.