Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1283236
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline |
| Date | 2015-12-03 19:20 +0100 |
| Message-ID | <qBGE2-cG-19@gated-at.bofh.it> (permalink) |
| References | <qBkDv-2x9-3@gated-at.bofh.it> <qBkDw-2x9-23@gated-at.bofh.it> <qBA5A-4dT-11@gated-at.bofh.it> <qBGum-98-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Dec 03, 2015 at 09:56:02AM -0800, bsegall@google.com wrote:
> Peter Zijlstra <peterz@infradead.org> writes:
> > @@ -7402,11 +7405,12 @@ void __init sched_init(void)
> > #endif /* CONFIG_RT_GROUP_SCHED */
> >
> > #ifdef CONFIG_CGROUP_SCHED
> > + task_group_cache = KMEM_CACHE(task_group, 0);
> > +
> > list_add(&root_task_group.list, &task_groups);
> > INIT_LIST_HEAD(&root_task_group.children);
> > INIT_LIST_HEAD(&root_task_group.siblings);
> > autogroup_init(&init_task);
> > -
> > #endif /* CONFIG_CGROUP_SCHED */
> >
> > for_each_possible_cpu(i) {
> > --- a/kernel/sched/sched.h
> > +++ 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;
> > #endif
> > #endif
> >
>
> This loses the cacheline-alignment for task_group, is that ok?
I'm a bit dense (its late) can you spell that out? Did you mean me
killing SLAB_HWCACHE_ALIGN? That should not matter because:
#define KMEM_CACHE(__struct, __flags) kmem_cache_create(#__struct,\
sizeof(struct __struct), __alignof__(struct __struct),\
(__flags), NULL)
picks up the alignment explicitly.
And struct task_group having one cacheline aligned member, means that
the alignment of the composite object (the struct proper) must be an
integer multiple of this (typically 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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/3] sched/fair: Reduce contention on tg's load_avg Waiman Long <Waiman.Long@hpe.com> - 2015-12-02 19:50 +0100
[PATCH v2 1/3] sched/fair: Avoid redundant idle_cpu() call in update_sg_lb_stats() Waiman Long <Waiman.Long@hpe.com> - 2015-12-02 19:50 +0100
[PATCH v2 3/3] sched/fair: Disable tg load_avg update for root_task_group Waiman Long <Waiman.Long@hpe.com> - 2015-12-02 19:50 +0100
Re: [PATCH v2 3/3] sched/fair: Disable tg load_avg update for root_task_group bsegall@google.com - 2015-12-02 21:00 +0100
[tip:sched/core] sched/fair: Disable the task group load_avg update for the root_task_group tip-bot for Waiman Long <tipbot@zytor.com> - 2015-12-04 13:00 +0100
[PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline Waiman Long <Waiman.Long@hpe.com> - 2015-12-02 19:50 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline bsegall@google.com - 2015-12-02 21:10 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline Waiman Long <waiman.long@hpe.com> - 2015-12-03 20:30 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline bsegall@google.com - 2015-12-03 20:50 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-12-03 05:40 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline Waiman Long <waiman.long@hpe.com> - 2015-12-03 20:40 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-12-04 03:10 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline Waiman Long <waiman.long@hpe.com> - 2015-12-04 21:20 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline Peter Zijlstra <peterz@infradead.org> - 2015-12-03 12:00 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline Waiman Long <waiman.long@hpe.com> - 2015-12-03 20:40 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline Peter Zijlstra <peterz@infradead.org> - 2015-12-03 12:20 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline bsegall@google.com - 2015-12-03 19:10 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline Peter Zijlstra <peterz@infradead.org> - 2015-12-03 19:20 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline bsegall@google.com - 2015-12-03 19:30 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline Waiman Long <waiman.long@hpe.com> - 2015-12-03 21:00 +0100
Re: [PATCH v2 2/3] sched/fair: Move hot load_avg into its own cacheline Peter Zijlstra <peterz@infradead.org> - 2015-12-03 21:10 +0100
[tip:sched/core] sched/fair: Move the cache-hot 'load_avg' variable into its own cacheline tip-bot for Waiman Long <tipbot@zytor.com> - 2015-12-04 13:00 +0100
csiph-web