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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no 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 A5E24C48BE0 for ; Fri, 11 Jun 2021 13:49:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2ECEF613BC for ; Fri, 11 Jun 2021 13:49:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2ECEF613BC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9CC2C6B0036; Fri, 11 Jun 2021 09:49:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9A4246B006C; Fri, 11 Jun 2021 09:49:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7F5B66B006E; Fri, 11 Jun 2021 09:49:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 4B6436B0036 for ; Fri, 11 Jun 2021 09:49:38 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 400C5A2D9 for ; Fri, 11 Jun 2021 13:49:36 +0000 (UTC) X-FDA: 78241575552.11.43C5DEB Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by imf18.hostedemail.com (Postfix) with ESMTP id BDA75200106B for ; Fri, 11 Jun 2021 13:49:30 +0000 (UTC) Received: by mail-qk1-f169.google.com with SMTP id i68so27388671qke.3 for ; Fri, 11 Jun 2021 06:49:35 -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; bh=Vcij7NrPMkCvyJHAqP+PNXJ1m2LDMYuEJqY2GEWx4uk=; b=cLtaTlvzJsrycgBKgPT3J3MiVtcry9Wv/dGtaM0ra8zTVzd2cQZ0UFce+0OfJ6LgDt aPUzXCakTEYyW4fMcNGHx3Rr/KoUvtcL9aurZjLcFz/PvTStSwEiR7R9KQnS2mRa6+1H 6tDWOGiz8QdRgiNSOdIqEUxKFXkJWCKcjeTTc8KicWtBcv+zuos+CLBrQFpY7WTTkjAS +N7n3J/+Xz54oY+Z+/EQgiEYnfLzvumdxmfg61scQ2BeXYU8PXZ8ReBrDLxq2FHnkGLx 3wtlR9lSlZJ89HFmkTP+6+YTigEkfbpSDKRsHCg1kILNnKlxzvUO/Dv8p53MWosC5+/o ad4A== 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; bh=Vcij7NrPMkCvyJHAqP+PNXJ1m2LDMYuEJqY2GEWx4uk=; b=lODtCQ1whrk3dL+XTV8LsJ4asPpkmV9or+g/rzfjh4+AXisZWUb+VxXp64oEbNNPyT heHXC1BtAfqAwRcav9DF4azV0cJtZBmkv6aEO2klLKZXdPLfNkHcc77gdKtYvHEknNPC GMDSoDZwfzWSi/onOcXtLAJ+MqIbciZKyw5++BwWuwqdrFr9kIwsf8Yo3N31lMKzMyrt Sv6sV2DkpFLH+hvA4wudxZ04IXhxpAndn/Pk3n0GrJOHprhNjbyEDxcIKXCbGLGWEoMe 8g5EjnGKT0GpPhtlRJMQyajdyrK/4CJmZjl2kWZAUyFXVS0arH+oqgc4WItquG0r/Znz gwFw== X-Gm-Message-State: AOAM530Yls1Z8r670sbq5ZLCCSiq9vQRxr/SVjszDRO5qGgo/GGkVVXv dPXk6a08q7mB1qFklfhpHjI= X-Google-Smtp-Source: ABdhPJzJxqYScmXh7B/Tr9VtL9iUKreQUbM9jktN5QXk1XOK3vd9AbM80/s95/fBHAaln8ELHD/qAA== X-Received: by 2002:a37:6114:: with SMTP id v20mr3956884qkb.157.1623419375239; Fri, 11 Jun 2021 06:49:35 -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 3sm4301926qka.4.2021.06.11.06.49.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 06:49:34 -0700 (PDT) From: SeongJae Park X-Google-Original-From: SeongJae Park To: "Shah, Amit" Cc: "sj38.park@gmail.com" , "akpm@linux-foundation.org" , "rientjes@google.com" , "acme@kernel.org" , "snu@amazon.de" , "peterz@infradead.org" , "minchan@kernel.org" , "vdavydov.dev@gmail.com" , "linux-damon@amazon.com" , "zgf574564920@gmail.com" , "vbabka@suse.cz" , "fan.du@intel.com" , "Park, Seongjae" , "amit@kernel.org" , "gthelen@google.com" , "shuah@kernel.org" , "Foerster, Leonard" , "guoju.fgj@alibaba-inc.com" , "benh@kernel.crashing.org" , "shakeelb@google.com" , "Woodhouse, David" , "greg@kroah.com" , "alexander.shishkin@linux.intel.com" , "rppt@kernel.org" , "mgorman@suse.de" , "Jonathan.Cameron@Huawei.com" , "mingo@redhat.com" , "brendanhiggins@google.com" , "corbet@lwn.net" , "namhyung@kernel.org" , "rostedt@goodmis.org" , "elver@google.com" , "riel@surriel.com" , linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v29 04/13] mm/idle_page_tracking: Make PG_idle reusable Date: Fri, 11 Jun 2021 13:49:20 +0000 Message-Id: <20210611134920.6302-1-sjpark@amazon.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=cLtaTlvz; spf=pass (imf18.hostedemail.com: domain of sj38park@gmail.com designates 209.85.222.169 as permitted sender) smtp.mailfrom=sj38park@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: t8hkghd3mkcpeifsb7x1o73z863jm6fs X-Rspamd-Queue-Id: BDA75200106B X-Rspamd-Server: rspam06 X-HE-Tag: 1623419370-891875 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 Hi Amit, On Fri, 11 Jun 2021 12:55:27 +0000 "Shah, Amit" wrote: > On Thu, 2021-05-20 at 07:56 +0000, SeongJae Park wrote: > > From: SeongJae Park > > > > PG_idle and PG_young allow the two PTE Accessed bit users, Idle Page > > Tracking and the reclaim logic concurrently work while don't interfere > > ... while not interfering with ... Will fix so. > > > each other. That is, when they need to clear the Accessed bit, they set > > PG_young to represent the previous state of the bit, respectively. And > > when they need to read the bit, if the bit is cleared, they further read > > the PG_young to know whether the other has cleared the bit meanwhile or > > not. > > > > We could add another page flag and extend the mechanism to use the flag > > if we need to add another concurrent PTE Accessed bit user subsystem. > > However, the space is limited. Meanwhile, if the new subsystem is > > mutually exclusive with IDLE_PAGE_TRACKING or interfering with it is not > > a real problem, it would be ok to simply reuse the PG_idle flag. > > However, it's impossible because the flags are dependent on > > IDLE_PAGE_TRACKING. > > For better readability, I suggest: > > For yet another user of the PTE Accessed bit, we could add another page > flag, or extend the mechanism to use the flags. For the DAMON usecase, > however, we don't need to do that just yet. IDLE_PAGE_TRACKING and > DAMON are mutually exclusive, so there's only ever going to be one user > of the current set of flags. > > In this commit, we split out the CONFIG options to allow for the use of > PG_young and PG_idle outside of idle page tracking. Thank you for the suggestion, it looks better to me, either. I will update so in the next spin. Thanks, SeongJae Park [...]