linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Christoph Lameter <cl@linux.com>,
	Linaro Kernel Mailman List <linaro-kernel@lists.linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	vinmenon@codeaurora.org, shashim@codeaurora.org,
	Michal Hocko <mhocko@suse.cz>, Mel Gorman <mgorman@suse.de>,
	dave@stgolabs.net, Konstantin Khlebnikov <koct9i@gmail.com>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC] vmstat: Avoid waking up idle-cpu to service shepherd work
Date: Mon, 30 Mar 2015 18:25:19 +0200	[thread overview]
Message-ID: <20150330162519.GB23123@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <CAKohponEAivnev-fcWdjD0OcwQaXHN58tESCfqbZ_-W+_N+DvA@mail.gmail.com>

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 */
};

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-03-30 16:25 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26  5:39 Viresh Kumar
2015-03-26 20:18 ` Andrew Morton
2015-03-27  4:49   ` Viresh Kumar
2015-03-27  9:16     ` Peter Zijlstra
2015-03-27  9:30       ` Peter Zijlstra
2015-03-27 11:11         ` Christoph Lameter
2015-03-27 12:02           ` Peter Zijlstra
2015-03-27 19:45             ` Christoph Lameter
2015-03-28  4:28             ` Viresh Kumar
2015-03-28 11:41               ` Peter Zijlstra
2015-03-28  4:18         ` Viresh Kumar
2015-03-28  9:53           ` Peter Zijlstra
2015-03-28 11:57             ` viresh kumar
2015-03-28 12:04               ` Viresh Kumar
2015-03-28 13:44               ` Peter Zijlstra
2015-03-29 10:24                 ` Peter Zijlstra
2015-03-30 12:02                   ` Viresh Kumar
2015-03-30 12:47                     ` Peter Zijlstra
2015-03-30 13:14                       ` Viresh Kumar
2015-03-30 13:59                         ` Peter Zijlstra
2015-03-30 16:17                           ` Viresh Kumar
2015-03-30 16:25                             ` Peter Zijlstra [this message]
2015-03-29 12:01                 ` Viresh Kumar
2015-03-29 17:24                   ` Peter Zijlstra
2015-03-30 15:08             ` Michal Hocko
2015-03-30 15:14               ` Peter Zijlstra
2015-03-30 15:42               ` Christoph Lameter
2015-03-27 14:19 ` Michal Hocko
2015-03-28  4:34   ` Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150330162519.GB23123@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=dave@stgolabs.net \
    --cc=hannes@cmpxchg.org \
    --cc=koct9i@gmail.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=shashim@codeaurora.org \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=vinmenon@codeaurora.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox