Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755620AbbKRRVd (ORCPT ); Wed, 18 Nov 2015 12:21:33 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:37920 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754495AbbKRRVc (ORCPT ); Wed, 18 Nov 2015 12:21:32 -0500 Date: Wed, 18 Nov 2015 17:21:15 +0000 From: Russell King - ARM Linux To: Marc Gonzalez Cc: Thomas Gleixner , Daniel Lezcano , LKML , Mans Rullgard , Viresh Kumar , Nicolas Pitre , Tony Lindgren , Sebastian Frias Subject: Re: [PATCH] clocksource: Store reg field within struct clocksource Message-ID: <20151118172114.GS8644@n2100.arm.linux.org.uk> References: <564C8086.80804@sigmadesigns.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <564C8086.80804@sigmadesigns.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 998 Lines: 23 On Wed, Nov 18, 2015 at 02:43:34PM +0100, Marc Gonzalez wrote: > 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. A nice side-effect > of this patch is making container_of() unnecessary, which makes the > code a bit simpler. > > On 32-bit platforms, reg fits in the padding between read and mask, > meaning no downside from storing it there. Just swap the order of 'reg' and 'clksrc'. -- FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. -- 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/