From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69B5CC4360C for ; Wed, 25 Sep 2019 14:31:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3432A21D7E for ; Wed, 25 Sep 2019 14:31:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3432A21D7E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 932166B0010; Wed, 25 Sep 2019 10:31:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5CE486B000D; Wed, 25 Sep 2019 10:31:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3A8E46B000C; Wed, 25 Sep 2019 10:31:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0232.hostedemail.com [216.40.44.232]) by kanga.kvack.org (Postfix) with ESMTP id 0840F6B000E for ; Wed, 25 Sep 2019 10:31:21 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 8F795181AC9C6 for ; Wed, 25 Sep 2019 14:31:21 +0000 (UTC) X-FDA: 75973680762.02.lace83_8033cabb8a912 X-HE-Tag: lace83_8033cabb8a912 X-Filterd-Recvd-Size: 4531 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Wed, 25 Sep 2019 14:31:20 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id ECAC4AFC3; Wed, 25 Sep 2019 14:31:18 +0000 (UTC) From: Vlastimil Babka To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, Qian Cai , "Kirill A. Shutemov" , Matthew Wilcox , Mel Gorman , Michal Hocko , Vlastimil Babka , "Kirill A . Shutemov" Subject: [PATCH 3/3] mm, page_owner: rename flag indicating that page is allocated Date: Wed, 25 Sep 2019 16:30:52 +0200 Message-Id: <20190925143056.25853-4-vbabka@suse.cz> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190925143056.25853-1-vbabka@suse.cz> References: <20190925143056.25853-1-vbabka@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Commit 37389167a281 ("mm, page_owner: keep owner info when freeing the pa= ge") has introduced a flag PAGE_EXT_OWNER_ACTIVE to indicate that page is trac= ked as being allocated. Kirril suggested naming it PAGE_EXT_OWNER_ALLOCED to ma= ke it more clear, as "active is somewhat loaded term for a page". Suggested-by: Kirill A. Shutemov Signed-off-by: Vlastimil Babka --- include/linux/page_ext.h | 2 +- mm/page_owner.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h index 5e856512bafb..4ca0e176433c 100644 --- a/include/linux/page_ext.h +++ b/include/linux/page_ext.h @@ -18,7 +18,7 @@ struct page_ext_operations { =20 enum page_ext_flags { PAGE_EXT_OWNER, - PAGE_EXT_OWNER_ACTIVE, + PAGE_EXT_OWNER_ALLOCED, #if defined(CONFIG_IDLE_PAGE_TRACKING) && !defined(CONFIG_64BIT) PAGE_EXT_YOUNG, PAGE_EXT_IDLE, diff --git a/mm/page_owner.c b/mm/page_owner.c index f3aeec78822f..f16317e98fda 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -163,7 +163,7 @@ void __reset_page_owner(struct page *page, unsigned i= nt order) if (unlikely(!page_ext)) return; for (i =3D 0; i < (1 << order); i++) { - __clear_bit(PAGE_EXT_OWNER_ACTIVE, &page_ext->flags); + __clear_bit(PAGE_EXT_OWNER_ALLOCED, &page_ext->flags); #ifdef CONFIG_PAGE_OWNER_FREE_STACK if (static_branch_unlikely(&page_owner_free_stack)) { page_owner =3D get_page_owner(page_ext); @@ -188,7 +188,7 @@ static inline void __set_page_owner_handle(struct pag= e *page, page_owner->gfp_mask =3D gfp_mask; page_owner->last_migrate_reason =3D -1; __set_bit(PAGE_EXT_OWNER, &page_ext->flags); - __set_bit(PAGE_EXT_OWNER_ACTIVE, &page_ext->flags); + __set_bit(PAGE_EXT_OWNER_ALLOCED, &page_ext->flags); =20 page_ext =3D page_ext_next(page_ext); } @@ -262,7 +262,7 @@ void __copy_page_owner(struct page *oldpage, struct p= age *newpage) * the new page, which will be freed. */ __set_bit(PAGE_EXT_OWNER, &new_ext->flags); - __set_bit(PAGE_EXT_OWNER_ACTIVE, &new_ext->flags); + __set_bit(PAGE_EXT_OWNER_ALLOCED, &new_ext->flags); } =20 void pagetypeinfo_showmixedcount_print(struct seq_file *m, @@ -322,7 +322,7 @@ void pagetypeinfo_showmixedcount_print(struct seq_fil= e *m, if (unlikely(!page_ext)) continue; =20 - if (!test_bit(PAGE_EXT_OWNER_ACTIVE, &page_ext->flags)) + if (!test_bit(PAGE_EXT_OWNER_ALLOCED, &page_ext->flags)) continue; =20 page_owner =3D get_page_owner(page_ext); @@ -437,7 +437,7 @@ void __dump_page_owner(struct page *page) return; } =20 - if (test_bit(PAGE_EXT_OWNER_ACTIVE, &page_ext->flags)) + if (test_bit(PAGE_EXT_OWNER_ALLOCED, &page_ext->flags)) pr_alert("page_owner tracks the page as allocated\n"); else pr_alert("page_owner tracks the page as freed\n"); @@ -531,7 +531,7 @@ read_page_owner(struct file *file, char __user *buf, = size_t count, loff_t *ppos) * Although we do have the info about past allocation of free * pages, it's not relevant for current memory usage. */ - if (!test_bit(PAGE_EXT_OWNER_ACTIVE, &page_ext->flags)) + if (!test_bit(PAGE_EXT_OWNER_ALLOCED, &page_ext->flags)) continue; =20 page_owner =3D get_page_owner(page_ext); --=20 2.23.0