Skip to contentSkip to conversation

mm: add vfree_atomic()

PATCH New [email protected] 1 participant 1 message Dec 13, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

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

---

 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
diff -puN include/linux/vmalloc.h~mm-add-vfree_atomic include/linux/vmalloc.h
@@ -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

_