[PATCH 04/62] mm: Add account_slab() and unaccount_slab()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These functions simply call their page equivalents for now.

Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
---
 mm/slab.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/mm/slab.h b/mm/slab.h
index 54b05f4d9eb5..305cc8c7fed8 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -510,6 +510,18 @@ static __always_inline void unaccount_slab_page(struct page *page, int order,
 			    -(PAGE_SIZE << order));
 }
 
+static __always_inline void account_slab(struct slab *slab, int order,
+					 struct kmem_cache *s, gfp_t gfp)
+{
+	account_slab_page(slab_page(slab), order, s, gfp);
+}
+
+static __always_inline void unaccount_slab(struct slab *slab, int order,
+					   struct kmem_cache *s)
+{
+	unaccount_slab_page(slab_page(slab), order, s);
+}
+
 static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)
 {
 	struct kmem_cache *cachep;
-- 
2.32.0





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux