All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-slab-add-is_kmalloc_cache-helper-function.patch removed from -mm tree
@ 2023-01-19  1:16 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-01-19  1:16 UTC (permalink / raw)
  To: mm-commits, vincenzo.frascino, vbabka, ryabinin.a.a,
	roman.gushchin, rientjes, penberg, iamjoonsoo.kim, glider,
	dvyukov, cl, andreyknvl, 42.hyeyoo, feng.tang, akpm


The quilt patch titled
     Subject: mm/slab: add is_kmalloc_cache() helper function
has been removed from the -mm tree.  Its filename was
     mm-slab-add-is_kmalloc_cache-helper-function.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Feng Tang <feng.tang@intel.com>
Subject: mm/slab: add is_kmalloc_cache() helper function
Date: Wed, 4 Jan 2023 14:06:04 +0800

commit 6edf2576a6cc ("mm/slub: enable debugging memory wasting of
kmalloc") introduces 'SLAB_KMALLOC' bit specifying whether a kmem_cache is
a kmalloc cache for slab/slub (slob doesn't have dedicated kmalloc
caches).

Add a helper inline function for other components like kasan to simplify
code.

Link: https://lkml.kernel.org/r/20230104060605.930910-1-feng.tang@intel.com
Signed-off-by: Feng Tang <feng.tang@intel.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/slab.h |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/mm/slab.h~mm-slab-add-is_kmalloc_cache-helper-function
+++ a/mm/slab.h
@@ -323,6 +323,14 @@ static inline slab_flags_t kmem_cache_fl
 }
 #endif
 
+static inline bool is_kmalloc_cache(struct kmem_cache *s)
+{
+#ifndef CONFIG_SLOB
+	return (s->flags & SLAB_KMALLOC);
+#else
+	return false;
+#endif
+}
 
 /* Legal flag mask for kmem_cache_create(), for various configurations */
 #define SLAB_CORE_FLAGS (SLAB_HWCACHE_ALIGN | SLAB_CACHE_DMA | \
_

Patches currently in -mm which might be from feng.tang@intel.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-19  1:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-19  1:16 [merged mm-stable] mm-slab-add-is_kmalloc_cache-helper-function.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.