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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A10C7C433F5 for ; Tue, 8 Feb 2022 08:27:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 37F326B008C; Tue, 8 Feb 2022 03:27:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 32F636B0099; Tue, 8 Feb 2022 03:27:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1F6836B009A; Tue, 8 Feb 2022 03:27:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0043.hostedemail.com [216.40.44.43]) by kanga.kvack.org (Postfix) with ESMTP id 0F7DD6B008C for ; Tue, 8 Feb 2022 03:27:08 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id BEE9695199 for ; Tue, 8 Feb 2022 08:27:07 +0000 (UTC) X-FDA: 79118932494.31.8BD21BF Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) by imf24.hostedemail.com (Postfix) with ESMTP id 62637180004 for ; Tue, 8 Feb 2022 08:27:07 +0000 (UTC) Received: by mail-il1-f176.google.com with SMTP id d3so13278937ilr.10 for ; Tue, 08 Feb 2022 00:27:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=44T1HlXr7BuKORnt0ndhEiJslHbwl0ICNg4Sr/XHz9A=; b=Fzfpbyn7+b2s9yL3hUzIjl5MZBYGazEFVmXaeDrjIUeTtnDQ1OKoJyGAaKMtxyGBdd 4S1ZxZrFHWKucVy3EVDiDlCD+GukmMqNELhAsJoSpYETtgs71v/eSRy8upPtMCw5WldL rt3deAo5QqvbMpsGjjXyu9cBWMJifParnnXDYP56kPIXheap/MgjK8ZH/RdsMKPQB6HC /BvTqTkhEd0OAYRI5Tu6cBy5LEC/2CU7nzKqW6W6PwC2DiTRG+wyIF6qCI+23T5iXNEO Jhi9jsf0AnZsftBtRnyi8NbBzkMyzYKHVPnZxJUTiWpmI67LrnD/P7YMneI+Z6FVVvSh 9Yiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=44T1HlXr7BuKORnt0ndhEiJslHbwl0ICNg4Sr/XHz9A=; b=Ab+YFiniZOO0vG9cKc++P8p8mZfi40KyJLbb3gN0K1VLLuee+iIwTy5jqWfScmfUy2 ybmnZiBybFuUV9VvQnO3I6YRJ88i8w3tB22addd+wa+H139OkiOuOLuMMc/fmnEWXHnH A6UddbXaPQjqNgmKx/R2SVnVrKt2fVAcBznMJeaH1GW95NDHO9HbJXOsRX0+JYhNd1Xf mKKSjzpiNxS2jo4hdcHsJlhVkyE2HVwLSS0WnX2NR2rdvl3Vf0sNVbgiTGKfkeIBHSQG pCI+coe+MEF1HizTnsWR/qtyy7rvjL18EctaobPbGaD0G7a0Xl9GApe7f6zcA57cNApl 1gng== X-Gm-Message-State: AOAM532SrKPy2r2RBsk+Zqst1DE41dSW2Muvkm/f1/3LAUvgCFHqSBdx L/RePn8CCGDirYfz0i6qfFx42Q== X-Google-Smtp-Source: ABdhPJxhgIu0UmLk8Z4r1+xA9jtb+cGWoKPZ+ozf9Iro3uQDBVD7tgKvOm4k7ftLHpOu/qObU3L4GQ== X-Received: by 2002:a05:6e02:20c9:: with SMTP id 9mr1689066ilq.267.1644308826595; Tue, 08 Feb 2022 00:27:06 -0800 (PST) Received: from google.com ([2620:15c:183:200:5f31:19c3:21f5:7300]) by smtp.gmail.com with ESMTPSA id e17sm6912666ilm.67.2022.02.08.00.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 00:27:06 -0800 (PST) Date: Tue, 8 Feb 2022 01:27:01 -0700 From: Yu Zhao To: Andrew Morton , Johannes Weiner , Mel Gorman , Michal Hocko Cc: Andi Kleen , Aneesh Kumar , Barry Song <21cnbao@gmail.com>, Catalin Marinas , Dave Hansen , Hillf Danton , Jens Axboe , Jesse Barnes , Jonathan Corbet , Linus Torvalds , Matthew Wilcox , Michael Larabel , Mike Rapoport , Rik van Riel , Vlastimil Babka , Will Deacon , Ying Huang , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, page-reclaim@google.com, x86@kernel.org, Brian Geffon , Jan Alexander Steffens , Oleksandr Natalenko , Steven Barrett , Suleiman Souhlal , Daniel Byrne , Donald Carr , Holger =?iso-8859-1?Q?Hoffst=E4tte?= , Konstantin Kharlamov , Shuang Zhai , Sofia Trinh Subject: Re: [PATCH v7 02/12] mm: x86: add CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG Message-ID: References: <20220208081902.3550911-1-yuzhao@google.com> <20220208081902.3550911-3-yuzhao@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220208081902.3550911-3-yuzhao@google.com> X-Rspamd-Queue-Id: 62637180004 X-Stat-Signature: 1xrtpe5qxmtzghs5opb1m3iznrghbnoj Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=Fzfpbyn7; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf24.hostedemail.com: domain of yuzhao@google.com designates 209.85.166.176 as permitted sender) smtp.mailfrom=yuzhao@google.com X-Rspamd-Server: rspam06 X-Rspam-User: X-HE-Tag: 1644308827-466891 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: On Tue, Feb 08, 2022 at 01:18:52AM -0700, Yu Zhao wrote: > Some architectures support the accessed bit in non-leaf PMD entries, > e.g., x86 sets the accessed bit in a non-leaf PMD entry when using it > as part of linear address translation [1]. Page table walkers that > clear the accessed bit may use this capability to reduce their search > space. > > Note that: > 1. Although an inline function is preferable, this capability is added > as a configuration option for the consistency with the existing > macros. > 2. Due to the little interest in other varieties, this capability was > only tested on Intel and AMD CPUs. Clarified ARCH_HAS_NONLEAF_PMD_YOUNG for x86 as requested here: https://lore.kernel.org/linux-mm/CAHk-=wgvOqj6LUhNp8V5ddT8eZyYdFDzMZE73KgPggOnc28VWg@mail.gmail.com/ > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 9f5bd41bf660..e787b7fc75be 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -85,6 +85,7 @@ config X86 > select ARCH_HAS_PMEM_API if X86_64 > select ARCH_HAS_PTE_DEVMAP if X86_64 > select ARCH_HAS_PTE_SPECIAL > + select ARCH_HAS_NONLEAF_PMD_YOUNG And enabled it for both 32-bit and 64-bit.