summaryrefslogtreecommitdiff
path: root/mm/page_owner.c
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2021-04-29 22:55:02 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-04-30 11:20:36 -0700
commitfab765c210130113ede5f8754c6a158fa0e4f960 (patch)
treeb1eda472024d90ad2f9a8c198a528bf437deb5dd /mm/page_owner.c
parent64ea78d2fdee1f68983ae3bec23f5d2bce71dc5a (diff)
mm: page_owner: fetch backtrace only for tracked pages
Very minor optimization. Link: https://lkml.kernel.org/r/20210401212445.3534721-1-slyfox@gentoo.org Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_owner.c')
-rw-r--r--mm/page_owner.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/page_owner.c b/mm/page_owner.c
index b29a049b734a..590c2c89af74 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -147,15 +147,15 @@ void __reset_page_owner(struct page *page, unsigned int order)
{
int i;
struct page_ext *page_ext;
- depot_stack_handle_t handle = 0;
+ depot_stack_handle_t handle;
struct page_owner *page_owner;
u64 free_ts_nsec = local_clock();
- handle = save_stack(GFP_NOWAIT | __GFP_NOWARN);
-
page_ext = lookup_page_ext(page);
if (unlikely(!page_ext))
return;
+
+ handle = save_stack(GFP_NOWAIT | __GFP_NOWARN);
for (i = 0; i < (1 << order); i++) {
__clear_bit(PAGE_EXT_OWNER_ALLOCATED, &page_ext->flags);
page_owner = get_page_owner(page_ext);