slub: add missed accounting
Subsystems (2)
PATCH 1/1 slub: add missed accounting
With per-cpu partial list, slab is added to partial list first and then moved to node list. The __slab_free() code path for add/remove_partial is almost deprecated(except for slub debug). But we forget to account add/remove_partial when move per-cpu partial pages to node list, so the statistics for such events are always 0. Add corresponding accounting.
This is against the patch "slub: use correct parameter to add a page to partial list tail"
--- mm/slub.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
mm/slub.c +5 -2
@@ -1901,11 +1901,14 @@ static void unfreeze_partials(struct kme }if (l != m) { -if (l ==M_PARTIAL ) +if (l ==M_PARTIAL ) {remove_partial (n, page); -else +stat (s,FREE_REMOVE_PARTIAL ); + }else {add_partial (n, page,DEACTIVATE_TO_TAIL ); +stat (s,FREE_ADD_PARTIAL ); + } l = m; }
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
looks I got Christoph's email address wrong, fixed it.
Quoted 26 lines · Shaohua Li
With per-cpu partial list, slab is added to partial list first and then moved to node list. The
__slab_free()code path for add/remove_partial is almost deprecated(except for slub debug). But we forget to account add/remove_partial when move per-cpu partial pages to node list, so the statistics for such events are always 0. Add corresponding accounting.This is against the patch "slub: use correct parameter to add a page to partial list tail"
Signed-off-by Shaohua Li <[email protected]>--- mm/slub.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)Index:
linux/mm/slub.c
===================================================================mm/slub.c +1
-1@@ -1901,11 +1901,14 @@ static void unfreeze_partials(struct kme }if (l != m) { -if (l ==M_PARTIAL ) +if (l ==M_PARTIAL ) {remove_partial (n, page);
mm/slub.c static void unfreeze_partials(struct kme · line 1914
Quoted 10 lines
mm/slub.c +4
-1-else +stat (s,FREE_REMOVE_PARTIAL ); + }else {add_partial (n, page,DEACTIVATE_TO_TAIL ); +stat (s,FREE_ADD_PARTIAL ); + } l = m; }
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>