Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1280367
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg |
| Date | 2015-11-30 23:30 +0100 |
| Message-ID | <qAF7k-15b-11@gated-at.bofh.it> (permalink) |
| References | <qyNLH-1Zv-7@gated-at.bofh.it> <qyNLI-1Zv-19@gated-at.bofh.it> <qAtSx-2jv-9@gated-at.bofh.it> <qAC9s-7Fj-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Nov 30, 2015 at 02:13:32PM -0500, Waiman Long wrote: > >This would only work if the structure itself is allocated with cacheline > >alignment, and looking at sched_create_group(), we use a plain kzalloc() > >for this, which doesn't guarantee any sort of alignment beyond machine > >word size IIRC. > > With a RHEL 6 derived .config file, the size of the task_group structure was > 460 bytes on a 32-bit x86 kernel. Adding a ____cacheline_aligned tag > increase the size to 512 bytes. So it did make the structure a multiple of > the cacheline size. With both slub and slab, the allocated task group > pointers from kzalloc() in sched_create_group() were all multiples of 0x200. > So they were properly aligned for the ____cacheline_aligned tag to work. Not sure we should rely on sl*b doing the right thing here. KMALLOC_MIN_ALIGN is explicitly set to sizeof(long long). If you want explicit alignment, one should use KMEM_CACHE(). -- 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
[RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg Waiman Long <Waiman.Long@hpe.com> - 2015-11-25 20:20 +0100
Re: [RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg Peter Zijlstra <peterz@infradead.org> - 2015-11-30 11:30 +0100
Re: [RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg Waiman Long <waiman.long@hpe.com> - 2015-11-30 20:20 +0100
Re: [RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg Peter Zijlstra <peterz@infradead.org> - 2015-11-30 23:20 +0100
Re: [RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg Waiman Long <waiman.long@hpe.com> - 2015-12-01 05:00 +0100
Re: [RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg Peter Zijlstra <peterz@infradead.org> - 2015-12-01 09:50 +0100
Re: [RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-12-01 11:50 +0100
Re: [RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg Waiman Long <waiman.long@hpe.com> - 2015-12-02 19:50 +0100
Re: [RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg Peter Zijlstra <peterz@infradead.org> - 2015-11-30 23:30 +0100
Re: [RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg Waiman Long <waiman.long@hpe.com> - 2015-12-01 05:10 +0100
Re: [RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg Peter Zijlstra <peterz@infradead.org> - 2015-12-01 09:50 +0100
Re: [RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg Waiman Long <waiman.long@hpe.com> - 2015-12-02 19:50 +0100
Re: [RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg Peter Zijlstra <peterz@infradead.org> - 2015-11-30 23:40 +0100
csiph-web