Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7428062imu; Wed, 14 Nov 2018 17:35:47 -0800 (PST) X-Google-Smtp-Source: AJdET5dJAkgta4QADm6tXedTs6wL4gCsTeNhfwyG8I1T3vwj8YdSfEDB8RwIh/G3GNFo+7VJlL6L X-Received: by 2002:a63:bd51:: with SMTP id d17mr4003816pgp.443.1542245746987; Wed, 14 Nov 2018 17:35:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542245746; cv=none; d=google.com; s=arc-20160816; b=i9eERNU+FcQMds79YLMJVSSko/qXhb3FE61PczH++2viJJr4OrW++4mRfjaARvrt4f Zl44Am6z+UB33F+NEd7KXZik4YcpJDa2LREack/6uT9RXe8pqMbw+xGqG5kpD5oiZQL/ J2SSVznhaHD9+L3M5/AqZD07NyjGMHnXqfbR9CZpQ7mx7kCsNK2YDVvpY8OJ97Vw+Vh2 7w5Kb8Q3RPnArhx2+ZhQZGyRYCO4RamjsPDzWTy7mEnzs3jGwqs3ftzlVyREGlfaHpEg vX0w53THPFfHQ5BDrhtnGY1/IVVyEOHH3XlFVYcKVny3fOFdh/iHfgAjWLrwXTubqGvo tNIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=IAn59E27ZMiFVTab4CKws9a00rFyIpke56WwNiCIdtg=; b=C/clVrNF+oRWCyz1V+Y60E41oiLC/JkmKaLfT8UNNHYZ5EZKyPidVOLaO0zJ0KUpj3 IJ9f7JB2CGdW5pXnDnqpvET0UlL2UkCWwQPsy6OdNNXqD+DZGGWLKHFTPmSBXuzzpjW+ 2WJ0IclXANvN0EcXvwk9IFMYK5nuh0LCpko228eqTi+iFoUY+oN2zFD34/SqqOb7JWKt GB004kv8rlvSzJOtwWriE3txKS5FIv3HJlNIZEZyPhf5mC5vFVb70bxr5IbyeGN/TfxV HfM9nrvrVkoChdTF8NJR+SnRbwwuqVmI4HifWNShnncuQFJ2L8awP/jgpRJ5QaF99kWi NwfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mnXI8oCd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u69si7114750pfj.219.2018.11.14.17.35.32; Wed, 14 Nov 2018 17:35:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mnXI8oCd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728188AbeKOLkP (ORCPT + 99 others); Thu, 15 Nov 2018 06:40:15 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:37010 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728140AbeKOLkP (ORCPT ); Thu, 15 Nov 2018 06:40:15 -0500 Received: by mail-pg1-f194.google.com with SMTP id 80so8216702pge.4 for ; Wed, 14 Nov 2018 17:34:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=IAn59E27ZMiFVTab4CKws9a00rFyIpke56WwNiCIdtg=; b=mnXI8oCdDJhaA5Oti1GhaqBvq0vxoZr1n8cUYdmFDFUXFjD34NPBU/jPBZTvzjIblc BAcQ/F7Ih3soNUK1IV6EJ+yRnv6z2Ri6STffri1WCPlo17rsmS0IccjVS6g6nwWObFaj b7+a7UcC9nCgSW4ePtsl+ltQjX+/dZY5Ex/Nhtq90OWeiCqm1Dn2EK13/K+QtROl+bPW e/iRkCg3xzWOlvKGJfdVCUUzYdh7jBFnxsxZRiTY3itkXmxU8BjA7MxGGyd/DhGl+0m/ tdDzhrXWu6vEysZ3O6EYigSojsr2mssRm4doZqjGm9yRZXJ768CTlak1HWFRtsBXXDtz c0oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=IAn59E27ZMiFVTab4CKws9a00rFyIpke56WwNiCIdtg=; b=ILFFXiBERrXc2iWDmNoR0/x7ly+K6Pis4QwWjolcRHJVQZaTeO7BTc2i4mBfmUbbDE n8tVNI36WAZA9QGvppwrYBTAdbYeQs9rvOvFWDyvHfNPqWpTHvA733JQr/OyZltVLBpP CXy4Mtap41in6MorK9uDpUED397Zc4xoCkOWevxDvFPLEd88rc8WQ6sa0Nl7I0iO4lns to3cM6DO7LWAbQIpgjys5hbm1nwIADs70Vv2XcbMRECn6vxoCYsLjEs9rwI+zmQ7nKaq VoTHvOX67wC0FZYhR2CQE57P1AwVL0D6zH4S4WnY6MPXkpanbSfO1QrSMZfsLx7UHTEb 7qcA== X-Gm-Message-State: AGRZ1gJnqdiKmNA6Kw8rBq6HY3cM+bKmUfqrBHHQ2B3p0M4MZsxM+oqE etTI/ya8FXNHM4DsOsJjapg= X-Received: by 2002:a63:f615:: with SMTP id m21mr1986650pgh.428.1542245671979; Wed, 14 Nov 2018 17:34:31 -0800 (PST) Received: from ?IPv6:2001:df0:0:200c:946e:e563:c52b:3556? ([2001:df0:0:200c:946e:e563:c52b:3556]) by smtp.gmail.com with ESMTPSA id 85sm21749193pfw.17.2018.11.14.17.34.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 17:34:31 -0800 (PST) Subject: Re: [RFC PATCH 01/13] arm: Fix mutual exclusion in arch_gettimeoffset To: Russell King - ARM Linux Cc: Finn Thain , Christoph Hellwig , Geert Uytterhoeven , Arnd Bergmann , Stephen N Chivers , Thomas Gleixner , Daniel Lezcano , John Stultz , linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20181112083422.GA19695@infradead.org> <20181113092012.GI30658@n2100.armlinux.org.uk> <20181113234336.GP30658@n2100.armlinux.org.uk> <20181114075817.GQ30658@n2100.armlinux.org.uk> From: Michael Schmitz Message-ID: Date: Thu, 15 Nov 2018 14:34:22 +1300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181114075817.GQ30658@n2100.armlinux.org.uk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/11/18 8:58 PM, Russell King - ARM Linux wrote: > >> Are you saying that's not possible on arm, because the current timer rundown >> counter can't be read while the timer is running? >> >> If I were to run a second timer at higher rate for clocksource, but keeping >> the 10 ms timer as clock event (could easily do that by using timer D on >> Atari Falcon) - how would that improve my timekeeping? Clock events still >> only happen 10 ms apart ... > Ah, I think you're talking about something else. > > You seem to be talking about what happens when time keeping interrupts > happen. That's what I understood your comment was about. > I'm talking about the resolution of gettimeofday() and the other > interfaces that are used (eg) for packet capture timestamping and > the like - the _user_ visible effects of the timekeeping system. > > With the existing implementation, all these have better-than-jiffy > resolution - in the case of RPC, that's 500ns, rather than 10ms > which would be the case without gettimeoffset(). Removing > gettimeoffset() as Finn has proposed without preserving that > resolution is simply completely unacceptable. I agree - but Finn had also offered to supply patches to arm that would have added a clocksource_read() function very much like for those m68k platforms that had used gettimeoffset(). I wondered what reason there was for these not to work on arm I now realize you'd never seen that offer. The proposal to drop architectures still relying on arch_gettimeoffset() had been raising enough of a response on linux-m68k to make me conclude that same proposal had been kicked on to other arch MLs affected as well. I'm a bit naive that way. Now your criticism of arch_gettimeoffset() (missing timer rollover because the timer interrupt has been cleared by the interrupt handler) still stands. I just can't find the offset() functions shown in the 5cfc8ee0bb51 patch. Any hints? Cheers,     Michael