Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932654AbbKSM0x (ORCPT ); Thu, 19 Nov 2015 07:26:53 -0500 Received: from mail1.bemta8.messagelabs.com ([216.82.243.193]:54743 "EHLO mail1.bemta8.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751800AbbKSM0w (ORCPT ); Thu, 19 Nov 2015 07:26:52 -0500 X-Env-Sender: Marc_Gonzalez@sigmadesigns.com X-Msg-Ref: server-10.tower-220.messagelabs.com!1447936008!8032633!1 X-Originating-IP: [195.215.56.170] X-StarScan-Received: X-StarScan-Version: 7.19.2; banners=-,-,- X-VirusChecked: Checked Subject: Re: [PATCH] clocksource: Store reg field within struct clocksource To: Thomas Gleixner , Russell King - ARM Linux CC: Daniel Lezcano , LKML , Mans Rullgard , Viresh Kumar , Nicolas Pitre , Tony Lindgren , Sebastian Frias References: <564C8086.80804@sigmadesigns.com> <20151118172114.GS8644@n2100.arm.linux.org.uk> <20151119103645.GV8644@n2100.arm.linux.org.uk> <20151119110842.GX8644@n2100.arm.linux.org.uk> From: Marc Gonzalez Message-ID: <564DC006.8000406@sigmadesigns.com> Date: Thu, 19 Nov 2015 13:26:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0 SeaMonkey/2.38 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.27.0.114] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1456 Lines: 46 On 19/11/2015 12:14, Thomas Gleixner wrote: > So yes, the alignment of the clocksource struct is not longer > relevant. The case where we access clocksource->max_cycles is when > CONFIG_DEBUG_TIMEKEEPING is enabled, which imposes worse performance > problems to timekeeping than the extra cacheline. > > So the simple solution for this issue is indeed the one liner below. It would make sense to also remove the comment emphasizing the alignment requirement. Regards. 8<------------------- diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 278dd279a7a8..6a0f86a9a92d 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -64,10 +64,6 @@ struct module; * @owner: module reference, must be set by clocksource in modules */ struct clocksource { - /* - * Hotpath data, fits in a single cache line when the - * clocksource itself is cacheline aligned. - */ cycle_t (*read)(struct clocksource *cs); cycle_t mask; u32 mult; @@ -95,7 +91,7 @@ struct clocksource { cycle_t wd_last; #endif struct module *owner; -} ____cacheline_aligned; +}; /* * Clock source flags bits:: -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/