Skip to content

mm, slab: consolidate KMALLOC_MAX_SIZE

Michal Hocko linux-mm lkml netdev 2 versions – Applied

Status from this message: [merged] bpf-do-not-use-kmalloc_shift_max.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesApplied 2/2
  2. v12 patches 9 repliesSuperseded

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2mm, slab: make sure that KMALLOC_MAX_SIZE will fit into MAX_ORDERinclude/linux/slab.h+2 -20 repliesApplied
2/2bpf: do not use KMALLOC_SHIFT_MAXkernel/bpf/arraymap.c kernel/bpf/hashtab.c+2 -20 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchChristoph Lameter
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH 0/2 v2] mm, slab: consolidate KMALLOC_MAX_SIZE

Hi,
this is the second version of the patchset previously posted here [1]. Alexei has insisted on the patches reordering which I've done in this series. I've also updated the changelog of the second patch to mention why KMALLOC_SHIFT_MAX has been used.

Andrey has revealed a discrepancy between KMALLOC_MAX_SIZE and the maximum supported page allocator size [2]. The underlying problem should be fixed in the ep_write_iter code of course, but I do not feel qualified to do that. The discrepancy which it reveals (see patch 2) is worth fixing anyway, though.

While I was looking into the code, I've noticed that the only code which uses KMALLOC_SHIFT_MAX outside of the slab code is bpf so I've updated it to use KMALLOC_MAX_SIZE instead. There shouldn't be any real reason to use KMALLOC_SHIFT_MAX which is a slab internal constant same as KMALLOC_SHIFT_{LOW,HIGH}

[1] http://lkml.kernel.org/r/[email protected]
[2] http://lkml.kernel.org/r/[email protected]

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>