diff mbox series

[3/3] mm, slub: make the comment of put_cpu_partial() complete

Message ID 20181025094437.18951-3-richard.weiyang@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/3] mm, slub: not retrieve cpu_slub again in new_slab_objects() | expand

Commit Message

Wei Yang Oct. 25, 2018, 9:44 a.m. UTC
There are two cases when put_cpu_partial() is invoked.

    * __slab_free
    * get_partial_node

This patch just makes it cover these two cases and fix one typo in
slub_def.h.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
---
 include/linux/slub_def.h | 2 +-
 mm/slub.c                | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Christoph Lameter (Ampere) Oct. 25, 2018, 1:41 p.m. UTC | #1
Acked-by: Christoph Lameter <cl@linux.com>
Wei Yang Dec. 30, 2018, 8:25 a.m. UTC | #2
On Thu, Oct 25, 2018 at 01:41:58PM +0000, Christopher Lameter wrote:
>
>Acked-by: Christoph Lameter <cl@linux.com>

Andrew,

Do you like this one?
diff mbox series

Patch

diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 3a1a1dbc6f49..201a635be846 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -81,7 +81,7 @@  struct kmem_cache_order_objects {
  */
 struct kmem_cache {
 	struct kmem_cache_cpu __percpu *cpu_slab;
-	/* Used for retriving partial slabs etc */
+	/* Used for retrieving partial slabs etc */
 	slab_flags_t flags;
 	unsigned long min_partial;
 	unsigned int size;	/* The size of an object including meta data */
diff --git a/mm/slub.c b/mm/slub.c
index 715372a786e3..3db6ce58e92e 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2201,8 +2201,8 @@  static void unfreeze_partials(struct kmem_cache *s,
 }
 
 /*
- * Put a page that was just frozen (in __slab_free) into a partial page
- * slot if available.
+ * Put a page that was just frozen (in __slab_free|get_partial_node) into a
+ * partial page slot if available.
  *
  * If we did not find a slot then simply move all the partials to the
  * per node partial list.