Skip to content

RFC extend vmalloc support for constrained allocations

Michal Hocko linux-fsdevel linux-mm lkml llvm oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 30 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mm/vmalloc: alloc GFP_NO{FS,IO} for vmallocmm/vmalloc.c+20 -22 replies
2/3mm/vmalloc: add support for __GFP_NOFAILmm/vmalloc.c+5 -129 replies
3/3mm: allow !GFP_KERNEL allocations for kvmallocinclude/linux/ceph/libceph.h mm/util.c net/ceph/buffer.c +5 more+15 -500 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/3] extend vmalloc support for constrained allocations

Hi,
based on a recent discussion with Dave and Neil [1] I have tried to implement NOFS, NOIO, NOFAIL support for the vmalloc to make life of kvmalloc users easier.

A requirement for NOFAIL support for kvmalloc was new to me but this seems to be really needed by the xfs code.

NOFS/NOIO was a known and a long term problem which was hoped to be handled by the scope API. Those scope should have been used at the reclaim recursion boundaries both to document them and also to remove the necessity of NOFS/NOIO constrains for all allocations within that scope. Instead workarounds were developed to wrap a single allocation instead (like ceph_kvmalloc).

First patch implements NOFS/NOIO support for vmalloc. The second one adds NOFAIL support and the third one bundles all together into kvmalloc and drops ceph_kvmalloc which can use kvmalloc directly now.

Please note that this is RFC and I haven't done any testing on this yet. I hope I haven't missed anything in the vmalloc allocator. It would be really great if Christoph and Uladzislau could have a look.

Thanks!

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