Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753415AbbK3KX3 (ORCPT ); Mon, 30 Nov 2015 05:23:29 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:33375 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751156AbbK3KX2 (ORCPT ); Mon, 30 Nov 2015 05:23:28 -0500 Date: Mon, 30 Nov 2015 11:23:22 +0100 From: Peter Zijlstra To: Waiman Long Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Scott J Norton , Douglas Hatch Subject: Re: [PATCH 2/3] sched/fair: Move hot load_avg into its own cacheline Message-ID: <20151130102322.GI17308@twins.programming.kicks-ass.net> References: <1448478580-26467-1-git-send-email-Waiman.Long@hpe.com> <1448478580-26467-3-git-send-email-Waiman.Long@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1448478580-26467-3-git-send-email-Waiman.Long@hpe.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 864 Lines: 28 On Wed, Nov 25, 2015 at 02:09:39PM -0500, Waiman Long wrote: > +++ b/kernel/sched/sched.h > @@ -248,7 +248,12 @@ struct task_group { > unsigned long shares; > > #ifdef CONFIG_SMP > - atomic_long_t load_avg; > + /* > + * load_avg can be heavily contended at clock tick time, so put > + * it in its own cacheline separated from the fields above which > + * will also be accessed at each tick. > + */ > + atomic_long_t load_avg ____cacheline_aligned; Same as with the other patch; this only works if the structure itself is cacheline aligned, which I don't think it is. > #endif > #endif > > -- > 1.7.1 > -- 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/