Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752120AbdHDJiP (ORCPT ); Fri, 4 Aug 2017 05:38:15 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:55606 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751306AbdHDJiM (ORCPT ); Fri, 4 Aug 2017 05:38:12 -0400 Date: Fri, 4 Aug 2017 11:38:05 +0200 From: Peter Zijlstra To: Vineet Gupta Cc: Thomas Gleixner , Viresh Kumar , "linux-kernel@vger.kernel.org" , "daniel.lezcano@linaro.org" , "john.stultz@linaro.org" , "linux-pm@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" , Alexey Brodkin Subject: Re: update timer frequencies Message-ID: <20170804093805.z5y2o6t6wp34ywln@hirez.programming.kicks-ass.net> References: <1489137441.2333.46.camel@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 881 Lines: 20 On Fri, Aug 04, 2017 at 12:28:43PM +0530, Vineet Gupta wrote: > The hardware is being changed and I had a couple of questions to help do it right: Awesome ;-) > 2. I'm not sure if the timer generating interrupts (periodic or oneshot) > needs to be fed invariant fixed clk or dynamic core clk. Naively it should > follow the core - but what happens to scheduled timers (say TCP timeouts): > if this clk changes - they need to be canceled/updated. If it doesn't then > the notion of timing is broken ? I'm likely not thinking this through > correctly. Please keep the timers on the very same clock as your clocksource. clockevent and clocksource having different (and possibly) drifting timelines is painful. Having them on the same clock makes everything so much easier, since you _know_ what time it is when they fire and won't have to recompute and possibly rearm the timer.