mm: add vfree_atomic()
Subsystems (2)
[email protected]
maintainerPATCH 72/123 mm: add vfree_atomic()
From: Andrey Ryabinin <[email protected]>
Subject: mm: add vfree_atomic()
We are going to use sleeping lock for freeing vmap. However some vfree() users want to free memory from atomic (but not from interrupt) context. For this we add vfree_atomic() - deferred variation of vfree() which can be used in any atomic context (except NMIs).
[[email protected]: tweak comment grammar]
[[email protected]: use raw_cpu_ptr() instead of this_cpu_ptr()]
Signed-off-by Andrey Ryabinin <[email protected]>
Signed-off-by Christoph Hellwig <[email protected]>
Cc Joel Fernandes <[email protected]>
Cc Jisheng Zhang <[email protected]>
Cc Chris Wilson <[email protected]>
Cc John Dias <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
include/linux/vmalloc.h | 1 mm/vmalloc.c | 42 ++++++++++++++++++++++++++++++++------ 2 files changed, 37 insertions(+), 6 deletions(-)
include/linux/vmalloc.h renamed from include/linux/vmalloc.h~mm-add-vfree_atomic +1 -0
@@ -82,6 +82,7 @@ extern void *__vmalloc_node_range(unsign const void *caller);extern void vfree (const void *addr); +extern void vfree_atomic (const void *addr);extern void *vmap (struct page **pages,unsigned int count,unsigned long flags,pgprot_t prot);
mm/vmalloc.c renamed from mm/vmalloc.c~mm-add-vfree_atomic +36 -6
54 lines not on this page · raw message
_