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 From patchwork Fri Aug 6 09:51:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12423105 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=-20.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 81BA6C4338F for ; Fri, 6 Aug 2021 09:52:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0B7D1611C3 for ; Fri, 6 Aug 2021 09:52:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0B7D1611C3 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 9A9666B006C; Fri, 6 Aug 2021 05:52:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 930768D0002; Fri, 6 Aug 2021 05:52:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 785126B0074; Fri, 6 Aug 2021 05:52:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0145.hostedemail.com [216.40.44.145]) by kanga.kvack.org (Postfix) with ESMTP id 59FF56B006C for ; Fri, 6 Aug 2021 05:52:18 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 078A2180ACC34 for ; Fri, 6 Aug 2021 09:52:18 +0000 (UTC) X-FDA: 78444190356.15.3D29380 Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by imf21.hostedemail.com (Postfix) with ESMTP id B5A41D021C48 for ; Fri, 6 Aug 2021 09:52:17 +0000 (UTC) Received: by mail-qk1-f172.google.com with SMTP id w197so7940937qkb.1 for ; Fri, 06 Aug 2021 02:52:17 -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; bh=fkNeqpNF5jRo/BI/tlSB7kvGxORHyjBjoaBmdA8dbl8=; b=mSgqOk5xrXiP+7KgsXvpGH/KV/+ch8Yl1hT2lHmA/1bl6zuSQjjTh6U9gKu9qHuqPR 0TIeX0w1kc4lYP6hI6OCZuIFlZns8xXKcPPOTIRBY3c6JcXXb1KycI3odIN11Fk33AHr Kumx+KuN74BS6U74VDe23dPIyBhpyKchDKNJGQyeiGibfBod4zKYz/g5YQqOz+CcaIep LzDaCj7rwVS6Q5ljIgrLspcdh+Bo3iPu8yHZ4rqJN+b+bXR6DryvHgn4+GKUCQat3XeE VB9EmbjIVWSFZffAOveJf1ZTJA1QlCWsj+xkNioxjr/6O603THzaxKUfdm7WX3vZm1tk +oDg== 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; bh=fkNeqpNF5jRo/BI/tlSB7kvGxORHyjBjoaBmdA8dbl8=; b=CxfHl+iAb5O4Lvf1RO5/mDNcIlEpFAekD7wPp17+iVS2GyWohzRLJbM7D3poVUEWKI uiqGdIhXuaPS4vLok10rsETPyChLsqgKJkBAnbeNB2TBzeghsZgVEG6k2hgUfQrgP0Y3 c69THxmkOfkH1mk1kdMzua+xjNzPRONVI+weqFlrE4erlxiWeeC5vrC5M/preWthX95q dSRdGySVVt3MeeLn4cJJvYbhms64vn6961Rn5VgznKOYb4klftu3qTIixhWBAsoBfB9l NQ4RjUfECbtprr4tqugcTYCkl8RNUvzoFqPA5hVJ7goxZkOo+tUO/olw3XjamI7psNfp B/sA== X-Gm-Message-State: AOAM532KOR6CAv/1aRWT/PcjCFDa7EE/w5uYxG+3WFGmCAhX5pMiL3Ck aTQ8nwQjaPaV5aNHoMtXIiQ= X-Google-Smtp-Source: ABdhPJxXhnPB2PZjfQlVlu8XQeA93JPqeH4IZUQ8g2nUjUzpDWq9chilNp7gyB3Xtqo4865m7hXUDw== X-Received: by 2002:a05:620a:158c:: with SMTP id d12mr9271433qkk.391.1628243537041; Fri, 06 Aug 2021 02:52:17 -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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Aug 2021 02:52:16 -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 2/2] mm/damon/Kconfig: Remove unnecessary PAGE_EXTENSION setup Date: Fri, 6 Aug 2021 09:51:53 +0000 Message-Id: <20210806095153.6444-2-sj38.park@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210806095153.6444-1-sj38.park@gmail.com> References: <20210806092246.30301-1-sjpark@amazon.de> <20210806095153.6444-1-sj38.park@gmail.com> X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: B5A41D021C48 Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=mSgqOk5x; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf21.hostedemail.com: domain of sj38park@gmail.com designates 209.85.222.172 as permitted sender) smtp.mailfrom=sj38park@gmail.com X-Stat-Signature: 4eu1x9g56187r45dhhmdzxgp6b9tui17 X-HE-Tag: 1628243537-343514 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 13d49dbd0123 ("mm/damon: implement primitives for the virtual memory address spaces") of linux-mm[1] makes DAMON_VADDR to set PAGE_IDLE_FLAG. PAGE_IDLE_FLAG sets PAGE_EXTENSION if !64BIT. However, DAMON_VADDR do the same work again. This commit removes the unnecessary duplicate. [1] https://github.com/hnaz/linux-mm/commit/13d49dbd0123 Fixes: 13d49dbd0123 ("mm/damon: implement primitives for the virtual memory address spaces") Reported-by: Randy Dunlap Signed-off-by: SeongJae Park Acked-by: Randy Dunlap # build-tested --- mm/damon/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/damon/Kconfig b/mm/damon/Kconfig index 455995152697..37024798a97c 100644 --- a/mm/damon/Kconfig +++ b/mm/damon/Kconfig @@ -27,7 +27,6 @@ config DAMON_KUNIT_TEST config DAMON_VADDR bool "Data access monitoring primitives for virtual address spaces" depends on DAMON && MMU - select PAGE_EXTENSION if !64BIT select PAGE_IDLE_FLAG help This builds the default data access monitoring primitives for DAMON