mm: slub: call account_slab_page() after slab page initialization
authorRoman Gushchin <guro@fb.com>
Tue, 29 Dec 2020 23:15:07 +0000 (15:15 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Dec 2020 23:36:49 +0000 (15:36 -0800)
commit1f3147b49d75b47b6be54a1e6dfa87a4921e1e51
tree56cedce3b399e22eb0fee8f592ad77c823129a8b
parent605cc30dea249edf1b659e7d0146a2cf13cbbf71
mm: slub: call account_slab_page() after slab page initialization

It's convenient to have page->objects initialized before calling into
account_slab_page().  In particular, this information can be used to
pre-alloc the obj_cgroup vector.

Let's call account_slab_page() a bit later, after the initialization of
page->objects.

This commit doesn't bring any functional change, but is required for
further optimizations.

[akpm@linux-foundation.org: undo changes needed by forthcoming mm-memcg-slab-pre-allocate-obj_cgroups-for-slab-caches-with-slab_account.patch]

Link: https://lkml.kernel.org/r/20201110195753.530157-1-guro@fb.com
Signed-off-by: Roman Gushchin <guro@fb.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slub.c