Skip to content

Commit fdf3bf8

Browse files
tehcastertorvalds
authored andcommitted
mm, page_owner: rename flag indicating that page is allocated
Commit 3738916 ("mm, page_owner: keep owner info when freeing the page") has introduced a flag PAGE_EXT_OWNER_ACTIVE to indicate that page is tracked as being allocated. Kirril suggested naming it PAGE_EXT_OWNER_ALLOCATED to make it more clear, as "active is somewhat loaded term for a page". Link: http://lkml.kernel.org/r/20190930122916.14969-4-vbabka@suse.cz Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Suggested-by: Kirill A. Shutemov <kirill@shutemov.name> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Walter Wu <walter-zh.wu@mediatek.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 0fe9a44 commit fdf3bf8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

include/linux/page_ext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct page_ext_operations {
1818

1919
enum page_ext_flags {
2020
PAGE_EXT_OWNER,
21-
PAGE_EXT_OWNER_ACTIVE,
21+
PAGE_EXT_OWNER_ALLOCATED,
2222
#if defined(CONFIG_IDLE_PAGE_TRACKING) && !defined(CONFIG_64BIT)
2323
PAGE_EXT_YOUNG,
2424
PAGE_EXT_IDLE,

mm/page_owner.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void __reset_page_owner(struct page *page, unsigned int order)
152152
if (unlikely(!page_ext))
153153
return;
154154
for (i = 0; i < (1 << order); i++) {
155-
__clear_bit(PAGE_EXT_OWNER_ACTIVE, &page_ext->flags);
155+
__clear_bit(PAGE_EXT_OWNER_ALLOCATED, &page_ext->flags);
156156
page_owner = get_page_owner(page_ext);
157157
page_owner->free_handle = handle;
158158
page_ext = page_ext_next(page_ext);
@@ -173,7 +173,7 @@ static inline void __set_page_owner_handle(struct page *page,
173173
page_owner->gfp_mask = gfp_mask;
174174
page_owner->last_migrate_reason = -1;
175175
__set_bit(PAGE_EXT_OWNER, &page_ext->flags);
176-
__set_bit(PAGE_EXT_OWNER_ACTIVE, &page_ext->flags);
176+
__set_bit(PAGE_EXT_OWNER_ALLOCATED, &page_ext->flags);
177177

178178
page_ext = page_ext_next(page_ext);
179179
}
@@ -247,7 +247,7 @@ void __copy_page_owner(struct page *oldpage, struct page *newpage)
247247
* the new page, which will be freed.
248248
*/
249249
__set_bit(PAGE_EXT_OWNER, &new_ext->flags);
250-
__set_bit(PAGE_EXT_OWNER_ACTIVE, &new_ext->flags);
250+
__set_bit(PAGE_EXT_OWNER_ALLOCATED, &new_ext->flags);
251251
}
252252

253253
void pagetypeinfo_showmixedcount_print(struct seq_file *m,
@@ -307,7 +307,7 @@ void pagetypeinfo_showmixedcount_print(struct seq_file *m,
307307
if (unlikely(!page_ext))
308308
continue;
309309

310-
if (!test_bit(PAGE_EXT_OWNER_ACTIVE, &page_ext->flags))
310+
if (!test_bit(PAGE_EXT_OWNER_ALLOCATED, &page_ext->flags))
311311
continue;
312312

313313
page_owner = get_page_owner(page_ext);
@@ -422,7 +422,7 @@ void __dump_page_owner(struct page *page)
422422
return;
423423
}
424424

425-
if (test_bit(PAGE_EXT_OWNER_ACTIVE, &page_ext->flags))
425+
if (test_bit(PAGE_EXT_OWNER_ALLOCATED, &page_ext->flags))
426426
pr_alert("page_owner tracks the page as allocated\n");
427427
else
428428
pr_alert("page_owner tracks the page as freed\n");
@@ -512,7 +512,7 @@ read_page_owner(struct file *file, char __user *buf, size_t count, loff_t *ppos)
512512
* Although we do have the info about past allocation of free
513513
* pages, it's not relevant for current memory usage.
514514
*/
515-
if (!test_bit(PAGE_EXT_OWNER_ACTIVE, &page_ext->flags))
515+
if (!test_bit(PAGE_EXT_OWNER_ALLOCATED, &page_ext->flags))
516516
continue;
517517

518518
page_owner = get_page_owner(page_ext);

0 commit comments

Comments
 (0)