[lkml]   [2019]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[RFC 0/2] guarantee natural alignment for kmalloc()
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


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(-)


 \ /
  Last update: 2019-03-19 22:12    [W:0.095 / U:2.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site