Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754090AbcKQJxt (ORCPT ); Thu, 17 Nov 2016 04:53:49 -0500 Received: from merlin.infradead.org ([205.233.59.134]:42636 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750813AbcKQJxo (ORCPT ); Thu, 17 Nov 2016 04:53:44 -0500 Date: Thu, 17 Nov 2016 10:53:43 +0100 From: Peter Zijlstra To: Chris Metcalf Cc: John Stultz , Thomas Gleixner , Salman Qazi , Paul Turner , Tony Lindgren , Steven Miao , lkml Subject: Re: [PATCH v2] tile: avoid using clocksource_cyc2ns with absolute cycle count Message-ID: <20161117095343.GF3142@twins.programming.kicks-ass.net> References: <1479324933-8161-1-git-send-email-cmetcalf@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 556 Lines: 11 On Wed, Nov 16, 2016 at 03:16:59PM -0500, Chris Metcalf wrote: > PeterZ (cc'ed) then improved it to use __int128 math via > mul_u64_u32_shr(), but that doesn't help tile; we only do one multiply > instead of two, but the multiply is handled by an out-of-line call to > __multi3, and the sched_clock() function ends up about 2.5x slower as > a result. Well, only if you set CONFIG_ARCH_SUPPORTS_INT128, otherwise it reduces to 2 32x23->64 multiplications, of which one if conditional on there actually being bits set in the high word of the u64 argument.