From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753068AbbC3QZg (ORCPT ); Mon, 30 Mar 2015 12:25:36 -0400 Received: from casper.infradead.org ([85.118.1.10]:35247 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752973AbbC3QZb (ORCPT ); Mon, 30 Mar 2015 12:25:31 -0400 Date: Mon, 30 Mar 2015 18:25:19 +0200 From: Peter Zijlstra To: Viresh Kumar Cc: Andrew Morton , Johannes Weiner , Christoph Lameter , Linaro Kernel Mailman List , Linux Kernel Mailing List , vinmenon@codeaurora.org, shashim@codeaurora.org, Michal Hocko , Mel Gorman , dave@stgolabs.net, Konstantin Khlebnikov , Linux Memory Management List , Suresh Siddha , Thomas Gleixner Subject: Re: [RFC] vmstat: Avoid waking up idle-cpu to service shepherd work Message-ID: <20150330162519.GB23123@twins.programming.kicks-ass.net> References: <20150328095322.GH27490@worktop.programming.kicks-ass.net> <55169723.3070006@linaro.org> <20150328134457.GK27490@worktop.programming.kicks-ass.net> <20150329102440.GC32047@worktop.ger.corp.intel.com> <20150330124746.GI21418@twins.programming.kicks-ass.net> <20150330135948.GY23123@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Mon, Mar 30, 2015 at 09:47:01PM +0530, Viresh Kumar wrote: > And all I get it is 8256 bytes, with or without the change. Duh, rounded up to cacheline boundary ;-) Trades two 4 byte holes at the start for a bigger 'hole' at the end. struct tvec_base { spinlock_t lock; /* 0 2 */ /* XXX 6 bytes hole, try to pack */ struct timer_list * running_timer; /* 8 8 */ long unsigned int timer_jiffies; /* 16 8 */ long unsigned int next_timer; /* 24 8 */ long unsigned int active_timers; /* 32 8 */ long unsigned int all_timers; /* 40 8 */ int cpu; /* 48 4 */ /* XXX 4 bytes hole, try to pack */ struct tvec_root tv1; /* 56 4096 */ /* --- cacheline 64 boundary (4096 bytes) was 56 bytes ago --- */ struct tvec tv2; /* 4152 1024 */ /* --- cacheline 80 boundary (5120 bytes) was 56 bytes ago --- */ struct tvec tv3; /* 5176 1024 */ /* --- cacheline 96 boundary (6144 bytes) was 56 bytes ago --- */ struct tvec tv4; /* 6200 1024 */ /* --- cacheline 112 boundary (7168 bytes) was 56 bytes ago --- */ struct tvec tv5; /* 7224 1024 */ /* --- cacheline 128 boundary (8192 bytes) was 56 bytes ago --- */ /* size: 8256, cachelines: 129, members: 12 */ /* sum members: 8238, holes: 2, sum holes: 10 */ /* padding: 8 */ }; vs struct tvec_base { spinlock_t lock; /* 0 2 */ /* XXX 2 bytes hole, try to pack */ int cpu; /* 4 4 */ struct timer_list * running_timer; /* 8 8 */ long unsigned int timer_jiffies; /* 16 8 */ long unsigned int next_timer; /* 24 8 */ long unsigned int active_timers; /* 32 8 */ long unsigned int all_timers; /* 40 8 */ struct tvec_root tv1; /* 48 4096 */ /* --- cacheline 64 boundary (4096 bytes) was 48 bytes ago --- */ struct tvec tv2; /* 4144 1024 */ /* --- cacheline 80 boundary (5120 bytes) was 48 bytes ago --- */ struct tvec tv3; /* 5168 1024 */ /* --- cacheline 96 boundary (6144 bytes) was 48 bytes ago --- */ struct tvec tv4; /* 6192 1024 */ /* --- cacheline 112 boundary (7168 bytes) was 48 bytes ago --- */ struct tvec tv5; /* 7216 1024 */ /* --- cacheline 128 boundary (8192 bytes) was 48 bytes ago --- */ /* size: 8256, cachelines: 129, members: 12 */ /* sum members: 8238, holes: 1, sum holes: 2 */ /* padding: 16 */ };