Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755778AbbKRNvO (ORCPT ); Wed, 18 Nov 2015 08:51:14 -0500 Received: from unicorn.mansr.com ([81.2.72.234]:47561 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752608AbbKRNvN convert rfc822-to-8bit (ORCPT ); Wed, 18 Nov 2015 08:51:13 -0500 From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Marc Gonzalez Cc: Thomas Gleixner , Daniel Lezcano , Russell King , LKML , Viresh Kumar , Nicolas Pitre , Tony Lindgren , Sebastian Frias Subject: Re: [PATCH] clocksource: Store reg field within struct clocksource References: <564C8086.80804@sigmadesigns.com> Date: Wed, 18 Nov 2015 13:51:04 +0000 In-Reply-To: <564C8086.80804@sigmadesigns.com> (Marc Gonzalez's message of "Wed, 18 Nov 2015 14:43:34 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 920 Lines: 25 Marc Gonzalez writes: > Since 'struct clocksource' is ____cacheline_aligned, gcc must insert > a lot of padding between reg and clksrc in 'struct clocksource_mmio' > (for example, L1_CACHE_BYTES = 64 on ARMv7). > > Storing reg within 'struct clocksource' removes unnecessary padding, > and reg can then be grouped with other hot data. Can you demonstrate a difference with this change? Not saying it's bad, but it's always good to have numbers. > A nice side-effect of this patch is making container_of() unnecessary, > which makes the code a bit simpler. You really need to get used to that construct. -- M?ns Rullg?rd mans@mansr.com -- 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/