From patchwork Fri Aug 6 09:51:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12423103 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=-18.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,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 DC352C4320E for ; Fri, 6 Aug 2021 09:52:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 53E42611C9 for ; Fri, 6 Aug 2021 09:52:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 53E42611C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 9D08B8D0001; Fri, 6 Aug 2021 05:52:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9581C6B0073; Fri, 6 Aug 2021 05:52:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D0D18D0001; Fri, 6 Aug 2021 05:52:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0192.hostedemail.com [216.40.44.192]) by kanga.kvack.org (Postfix) with ESMTP id 5FBFD6B006C for ; Fri, 6 Aug 2021 05:52:14 -0400 (EDT) Received: from smtpin33.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 051771C987 for ; Fri, 6 Aug 2021 09:52:14 +0000 (UTC) X-FDA: 78444190188.33.F8679BF Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) by imf15.hostedemail.com (Postfix) with ESMTP id B0F6ED00499D for ; Fri, 6 Aug 2021 09:52:13 +0000 (UTC) Received: by mail-qt1-f174.google.com with SMTP id d2so6036193qto.6 for ; Fri, 06 Aug 2021 02:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ATk9Anx8RibhuRL+d9V0PBWYVmLm0E28C/cJ0kw8glI=; b=pSv9CS0W82JWMyDOQgRLLe6M4ldB/7hZuEfts9NVe6hPNJ6kXF3ZP7Cxvw15wsJBr5 01sfTFtzO/hBHYpcNWUXUieatfJUQrmt7gLrCuU7yo7qu5Qztyf/Ru3y7ltRKHCgByDn U28u+yIUoZlkH7x/R+uRiAuyyHIhuodbp1w7PxbzVM+dag50B25rydsgaElt6h5xt+Wg /c7tp1OKsCbsRoDgHKqbTi1xQY4s4BfyCoawI2bhFGC3JdPNp/Z3doK53qALFE2pMQzB ITuwuslAMeBMm0w0rh7ZarPQMJCafwFbf54EAz+XMHvGqCMikWvWHY57y2qJaSAhZzgk 8bVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ATk9Anx8RibhuRL+d9V0PBWYVmLm0E28C/cJ0kw8glI=; b=O5ZgE4GFN1eAoQ9avxGVSEUNttyycDqJCEOchPbPNuDCZQnCs5XC7neVhQS8GPAdqZ wr2venB/zqK4g6WnJPTR7n/P9MYQap6brxaLJHEVEjHFe0Chh4UTQoh1oNUpnGpiliwP 4ZBdu4v/8ROCW3X9LqCo2SmbWQO0LMhKI05BUxUBH8Hs6c8XBes9F77eQzRsoVzTzxep 2qokN3q5UIwu47T0BosXpXHp0m2/fdAA+mxHEScVgwdBbqLicw1Q7udPUbQmW0PhM7dC VQPDxJM1UD9kywVTQa2ju4tuBBZnBtKQmVpVVpKcDPxOLeEBKOIa/T6AuZVxfJ2O3aCC 4quw== X-Gm-Message-State: AOAM5322J+NZb7nH4o6QUiCT6YHH4hCiZvkJCkzKhhEkacVysLxDb7oi WMNjpCL0UmpGBgfTsv5MCCc= X-Google-Smtp-Source: ABdhPJwirvIQEW30b40xytudpr0bhXVDPRSML1mNd6bQkFBKyhH9WgJgnlBtrUkG5iD3Rl1BjIakCA== X-Received: by 2002:ac8:5ac7:: with SMTP id d7mr8149530qtd.240.1628243533052; Fri, 06 Aug 2021 02:52:13 -0700 (PDT) Received: from localhost.localdomain (ec2-35-169-212-159.compute-1.amazonaws.com. [35.169.212.159]) by smtp.gmail.com with ESMTPSA id s3sm3296915qtn.4.2021.08.06.02.52.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Aug 2021 02:52:12 -0700 (PDT) From: SeongJae Park To: akpm@linux-foundation.org Cc: SeongJae Park , rdunlap@infradead.org, broonie@kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-next@vger.kernel.org, mhocko@suse.cz, mm-commits@vger.kernel.org, sfr@canb.auug.org.au, willy@infradead.org, linux-damon@amazon.com Subject: [PATCH 1/2] mm/PAGE_IDLE_FLAG: Set PAGE_EXTENSION for none-64BIT Date: Fri, 6 Aug 2021 09:51:52 +0000 Message-Id: <20210806095153.6444-1-sj38.park@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210806092246.30301-1-sjpark@amazon.de> References: <20210806092246.30301-1-sjpark@amazon.de> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: B0F6ED00499D Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=pSv9CS0W; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf15.hostedemail.com: domain of sj38park@gmail.com designates 209.85.160.174 as permitted sender) smtp.mailfrom=sj38park@gmail.com X-Stat-Signature: 117sfy5nw1ztsdee17y1pw47t1begm15 X-HE-Tag: 1628243533-456747 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: From: SeongJae Park Commit 128fd80c4c07 ("mm/idle_page_tracking: Make PG_idle reusable") of linux-mm[1] allows PAGE_IDLE_FLAG to be set without PAGE_EXTENSION while 64BIT is not set. This makes 'enum page_ext_flags' undefined, so build fails as below for the config (!64BIT, !PAGE_EXTENSION, and IDLE_PAGE_FLAG). $ make ARCH=i386 allnoconfig $ echo 'CONFIG_PAGE_IDLE_FLAG=y' >> .config $ make olddefconfig $ make ARCH=i386 [...] ../include/linux/page_idle.h: In function ‘folio_test_young’: ../include/linux/page_idle.h:25:18: error: ‘PAGE_EXT_YOUNG’ undeclared (first use in this function); did you mean ‘PAGEOUTRUN’? return test_bit(PAGE_EXT_YOUNG, &page_ext->flags); [...] This commit fixes this issue by making PAGE_EXTENSION to be set when 64BIT is not set and PAGE_IDLE_FLAG is set. [1] https://github.com/hnaz/linux-mm/commit/128fd80c4c07 Fixes: 128fd80c4c07 ("mm/idle_page_tracking: Make PG_idle reusable") Reported-by: Randy Dunlap Signed-off-by: SeongJae Park Acked-by: Randy Dunlap # build-tested --- mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/Kconfig b/mm/Kconfig index d0b85dc12429..50ca602edeb6 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -741,6 +741,7 @@ config DEFERRED_STRUCT_PAGE_INIT config PAGE_IDLE_FLAG bool "Add PG_idle and PG_young flags" + select PAGE_EXTENSION if !64BIT help This feature adds PG_idle and PG_young flags in 'struct page'. PTE Accessed bit writers can set the state of the bit in the flags to let @@ -749,7 +750,6 @@ config PAGE_IDLE_FLAG config IDLE_PAGE_TRACKING bool "Enable idle page tracking" depends on SYSFS && MMU && BROKEN - select PAGE_EXTENSION if !64BIT select PAGE_IDLE_FLAG help This feature allows to estimate the amount of user pages that have