Re: [RFC] vmstat: Avoid waking up idle-cpu to service shepherd work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]