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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C37CC52D6D for ; Tue, 6 Aug 2024 08:06:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EgS9HWoJFckv9b1UthJ28TCeDcZn6M4hicNLdDrpinE=; b=OPUXLanGwwrklgqfLevyBKYjV5 ELZNT0pp8fLtpOYupiRFgRGEoNUOb1oZX1M15NGT5u2nqIRkOAb0kQNS5wVZLuoMx7EWzlYDXkPAp ql2JtrTFMGBat4rDcwVGcfENWmmFoZrzRCEtxNxAmMCLpxhC7r5iCikm9lANIqmzk1esYbinT56x4 iqbh1Hkxh1Rt3yDFl/RMFfiaYaPnOgV4sCnyVZtQhmy7jybcXyCoaFhEFY52KaZAXzxn9VuZ4BIDn nSFbnrGZc3jmahH+adzfXU+0KJGa3wPZ40GaPSHSAowFpu3kEdJYb3ko63TrStJUGgEdKRxS4j58B SCShBAhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbFDO-00000000shu-3pdE; Tue, 06 Aug 2024 08:06:42 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbFCq-00000000sYz-1MAt for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 08:06:09 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id BB45DCE0E38; Tue, 6 Aug 2024 08:06:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04E04C32786; Tue, 6 Aug 2024 08:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722931566; bh=givJ9QJR3DmBGcNCtayYiSk3qqSFHLfAIrepkygMWZA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cB5rWnO9p3f8JQpfL1q5RLiTJFaRW8/FnXM81hbWP4hKrRIBcsmR1/Qp1nayAOZ2J bLkowHvVgCzeHTMeHhumpeWCYyf9mMcrIRWp86VdsN5X2o8zlOnvshmjE+v7jo1IVJ aUH0X4wQ0h+9/mKwzn3RLBdS6SLLIeGvntYy/VGTJjP1SvT5i3Gxmk6ro7k++hMMd6 bSVEnqUfHowihrSK+opHJ3QK0Cw72c1uKKTD2jUON63TEEZcmq9VR0PBraKXyMNKUg Jb6oPcmt9sNuOJVv4UIe1wuI89wtQauEvd4PeBf2TBznHJU/jZCvb8Ljh8ubKkKiPz tV+fXKMp3bkew== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sbFCl-001IFv-Qg; Tue, 06 Aug 2024 09:06:03 +0100 Date: Tue, 06 Aug 2024 09:06:03 +0100 Message-ID: <86jzgu2hzo.wl-maz@kernel.org> From: Marc Zyngier To: Yicong Yang Cc: , , , , , , , , , , , , , Subject: Re: [PATCH 0/2] Support Armv8.9/v9.4 FEAT_HAFT In-Reply-To: References: <20240802093458.32683-1-yangyicong@huawei.com> <86cymr1a3z.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.3 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: yangyicong@huawei.com, yangyicong@hisilicon.com, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, oliver.upton@linux.dev, broonie@kernel.org, ryan.roberts@arm.com, linuxarm@huawei.com, jonathan.cameron@huawei.com, shameerali.kolothum.thodi@huawei.com, prime.zeng@hisilicon.com, xuwei5@huawei.com, wangkefeng.wang@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240806_010608_728307_8ABE26DC X-CRM114-Status: GOOD ( 21.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 06 Aug 2024 04:43:52 +0100, Yicong Yang wrote: > > On 2024/8/2 18:40, Marc Zyngier wrote: > > On Fri, 02 Aug 2024 10:34:56 +0100, > > Yicong Yang wrote: > >> > >> From: Yicong Yang > >> > >> This series adds basic support for FEAT_HAFT introduced in Armv8.9/v9.4 > >> and enable ARCH_HAS_NONLEAF_PMD_YOUNG. The latter will be used in > >> lru-gen aging. Tested with lru-gen in below steps: > >> 1. Generate a 1GiB workingset by `stress-ng --vm 1`. Then hang the task to > >> stop accessing the memory. (AF bit won't be updated) > >> 2. try to age the memory by /sys/kernel/debug/lru_gen > >> > >> Run above steps with LRU_GEN_NONLEAF_YOUNG(0x4) and not respectively > >> (switching by /sys/kernel/mm/lru_gen/enabled). LRU_GEN_NONLEAF_YOUNG > >> will clear and test the PMD AF bit on page walking for aging, > >> otherwise will clear and test the PTE AF bit for aging. In this case > >> LRU_GEN_NONLEAF_YOUNG will improve the efficiency of page scanning > >> since pages won't be accessed and we don't need to scan each PTE. > > > > Improve by how much? Can you please publish numbers that demonstrate > > the effect of this feature? > > > > With LRU_GEN_NONLEAF_YOUNG ~40% time saved for 1GiB memory observed on our > emulated platform. This certainly looks impressive, but it is a very ad-hoc benchmark, and emulation numbers don't necessarily result in similar improvement on actual HW. How does this translate for a more realistic/useful workload? Even numbers obtained on another architecture would be useful. Thanks, M. -- Without deviation from the norm, progress is not possible.