linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/2] guarantee natural alignment for kmalloc()
@ 2019-03-19 21:11 Vlastimil Babka
  2019-03-19 21:11 ` [RFC 1/2] mm, sl[aou]b: guarantee natural alignment for kmalloc(power-of-two) Vlastimil Babka
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Vlastimil Babka @ 2019-03-19 21:11 UTC (permalink / raw)
  To: linux-mm
  Cc: Christoph Lameter, Pekka Enberg, David Rientjes, Joonsoo Kim,
	Ming Lei, Dave Chinner, Matthew Wilcox, Darrick J . Wong,
	Christoph Hellwig, Michal Hocko, linux-kernel, linux-xfs,
	linux-fsdevel, linux-block, Vlastimil Babka

The recent thread [1] inspired me to look into guaranteeing alignment for
kmalloc() for power-of-two sizes. Turns out it's not difficult and in most
configuration nothing really changes as it happens implicitly. More details in
the first patch. If we agree we want to do this, I will see where to update
documentation and perhaps if there are any workarounds in the tree that can be
converted to plain kmalloc() afterwards.

The second patch is quick and dirty selftest for the alignment. Suggestions
welcome whether and how to include this kind of selftest that has to be
in-kernel.

[1] https://lore.kernel.org/linux-fsdevel/20190225040904.5557-1-ming.lei@redhat.com/T/#u

Vlastimil Babka (2):
  mm, sl[aou]b: guarantee natural alignment for kmalloc(power-of-two)
  mm, sl[aou]b: test whether kmalloc() alignment works as expected

 mm/slab_common.c | 30 +++++++++++++++++++++++++++++-
 mm/slob.c        | 42 +++++++++++++++++++++++++++++++-----------
 2 files changed, 60 insertions(+), 12 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-04-09  9:20 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-19 21:11 [RFC 0/2] guarantee natural alignment for kmalloc() Vlastimil Babka
2019-03-19 21:11 ` [RFC 1/2] mm, sl[aou]b: guarantee natural alignment for kmalloc(power-of-two) Vlastimil Babka
2019-03-19 21:11 ` [RFC 2/2] mm, sl[aou]b: test whether kmalloc() alignment works as expected Vlastimil Babka
2019-03-20  0:44   ` Christopher Lameter
2019-03-20  0:43 ` [RFC 0/2] guarantee natural alignment for kmalloc() Christopher Lameter
2019-03-20  0:53   ` David Rientjes
2019-03-20  8:48   ` Vlastimil Babka
2019-03-20 18:20     ` Christopher Lameter
2019-03-21  7:42       ` Vlastimil Babka
2019-03-22 17:52         ` Christopher Lameter
2019-04-05 17:11           ` Vlastimil Babka
2019-04-07  8:00             ` Christoph Hellwig
2019-04-09  8:07               ` Vlastimil Babka
2019-04-09  9:20                 ` Michal Hocko
2019-03-20 18:53     ` Matthew Wilcox
2019-03-20 21:48       ` Vlastimil Babka
2019-03-21  2:23         ` Matthew Wilcox
2019-03-21  7:02           ` Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).