Received: by 10.213.65.68 with SMTP id h4csp1379425imn; Thu, 29 Mar 2018 03:47:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/SCdo9lYgT6YXv9CF/gFYqCZvlZGzdwOsxvENy6cHSusA6ERwrB99Y9/kiI51Pldj5jVq6 X-Received: by 2002:a17:902:aa98:: with SMTP id d24-v6mr1218669plr.220.1522320421576; Thu, 29 Mar 2018 03:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522320421; cv=none; d=google.com; s=arc-20160816; b=LgfmhXZFaZvy3me+PPM64gDC0W4iSGkzhhe5HplQ02NUKmHdVm2COsDS1NSPFb4hj+ UMNIU4WyF/bknzqGOZuRLaS9LC1VvgU6DhLO7Vqyif/QqIDmwGIZsa7CN2wrDhiPOb03 iPrLAtIVvJV46MxHF7/uQDwf6A0luJnVsK11sN/Le7vO8oRP/1dmH1RbB1BYngjD0mJi wMSxasX7CmCFI6kMrJKXv2byb1YkUmZSx7KVMk/0APGCA9Nd1TbLJpwdGSnjmAwJrmb/ 9YzXh9uZb4RAIIBRKEE8+kM62C8C0g1I2EtwMmYc87HxUFExIuaRDTKgPQG0E7uOCUoY 1CJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=pPWR1aSHF8/4ByA+o1v3BZfVlyAuFZsxIGOq9lGTVPU=; b=RkkUuhg96lXP0wdO7rcetEpZsMHq7moAOhwhJEg/6UWHPkmopftGJZGbkwfG9fl6tV 03XFlQ3s5sjpgf7oMN96HagLfvMZouNv+mRNbUmXUYiispthaudn2ShPUSf2wcZR0s7w MFGwGL32yrao08pOCb1fs8cgRY6Z6C4nEl2aPMIzXb8LR5E2gkFDZTKlXxc08/tZUMLJ OH+O1ITleNzqGXV32hakeklwSflWhWOLYX/fYmB3UYmVteS9PcZtm+Kyo8ujE29Is/9q QSheskr5sQ6gYgkXK1CCoZkWQtVQXi6RmRNQ6HDwSe3aZ8nRqv0rcsV1V4pM0eH9b/5b 5O2Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1-v6si5409507plk.405.2018.03.29.03.46.47; Thu, 29 Mar 2018 03:47:01 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751927AbeC2Kp4 (ORCPT + 99 others); Thu, 29 Mar 2018 06:45:56 -0400 Received: from mail.bootlin.com ([62.4.15.54]:36137 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbeC2Kpz (ORCPT ); Thu, 29 Mar 2018 06:45:55 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id E51CF20829; Thu, 29 Mar 2018 12:45:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (242.171.71.37.rev.sfr.net [37.71.171.242]) by mail.bootlin.com (Postfix) with ESMTPSA id 85CDF2055E; Thu, 29 Mar 2018 12:45:43 +0200 (CEST) Date: Thu, 29 Mar 2018 12:45:42 +0200 From: Alexandre Belloni To: Alexander Dahl Cc: Daniel Lezcano , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Boris Brezillon , Thomas Gleixner Subject: Re: [PATCH v3 0/6] clocksource: rework Atmel TCB timer driver Message-ID: <20180329104542.GK13942@piout.net> References: <20180223171558.7037-1-alexandre.belloni@bootlin.com> <20180328153135.GG13942@piout.net> <20180328155033.GH13942@piout.net> <3478710.yJBBt3uoRT@ada> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3478710.yJBBt3uoRT@ada> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/03/2018 at 10:01:26 +0200, Alexander Dahl wrote: > Hei hei, > > Am Mittwoch, 28. M?rz 2018, 17:50:33 CEST schrieb Alexandre Belloni: > > On 28/03/2018 at 17:31:35 +0200, Alexandre Belloni wrote: > > > > Do you have an explanation of why the rate is much higher ? > > > > > > The core is giving deltas of 31 clocks instead of much more than that, I > > > guess I messed up the initialization somewhere. > > > > I did mess up. > > > > Alexander, can you test that: > > Well, I just did. > > > > > diff --git a/drivers/clocksource/timer-atmel-tcb.c > > b/drivers/clocksource/timer-atmel-tcb.c index 7fde9cfbf203..bbbacf8c46b0 > > 100644 > > --- a/drivers/clocksource/timer-atmel-tcb.c > > +++ b/drivers/clocksource/timer-atmel-tcb.c > > @@ -222,7 +222,7 @@ static int __init tc_clkevt_register(struct device_node > > *node, goto err_slow; > > clk_disable(tce.clk); > > > > - clockevents_config_and_register(&tce.clkevt, 32768, 1, bits - 1); > > + clockevents_config_and_register(&tce.clkevt, 32768, 1, BIT(bits) - 1); > > > > ret = request_irq(tce.irq, tc_clkevt2_irq, IRQF_TIMER | IRQF_SHARED, > > tce.clkevt.name, &tce); > > > > This will behave exactly the same as before on 16bits TCB and will have > > much less interrupts on 32 bits platforms. > > This is the result: > > INT NAME RATE MAX > 17 [vel timer@fffa] 1837 Ints/s (max: 1912) > 26 [ vel eth0] 3 Ints/s (max: 11) > > This is not much lower than the ~2150 I reported yesterday? > > I'm sorry I can just test this on at91sam9g20 currently, I have no > understanding of the subsystem, I can't do a decent review. Hum, are you sure, I went from: INT NAME RATE MAX 16 [evel timer@fc0] 1027 Ints/s (max: 1028) 21 [ evel at_xdmac] 3 Ints/s (max: 3) 30 [ evel ttyS0] 2 Ints/s (max: 2) to: INT NAME RATE MAX 16 [evel timer@fc0] 6 Ints/s (max: 9) 21 [ evel at_xdmac] 2 Ints/s (max: 2) 30 [ evel ttyS0] 2 Ints/s (max: 2) -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com