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 42A7DC49EA1 for ; Tue, 6 Aug 2024 03:44:53 +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-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To: Subject:CC:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rQg3/gATG39lAUNPYvj867mdRlcTNVjrG1SnF12TwOc=; b=AOxl+zcpGEanbNWXAYcxxVaDdD 24gPXHvu8IErvjwjXgRPHeRvfbOHmPHONARYvT4NdlZ2guaNk1+zyo70e22WN3HicSmtbbr98DBwz 8RQZOksOHh3jKMxFmDBh1p83nIfLwpU1ET3TStngpf2oHNBi6zp7//GREehJyNiCuHstFpRfRoilc Icb4Nr4+pF5X4AR/7juGnY6MX4/nlDP9Zvps/oxX/Y9+vPpQU6mh+3udWb2LoDqFKxDk4jnuysmXM xrmpzIHHeJLq5TZHFBP2+R2S3dwAmFaveX1XtZsjkPZJeM9zJXf7JIO1YiVQ7Y5li8ue84BI/BomD US3q6Ngg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbB7o-00000000PIZ-44uL; Tue, 06 Aug 2024 03:44:40 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbB7H-00000000PCG-41y3 for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 03:44:09 +0000 Received: from mail.maildlp.com (unknown [172.19.163.252]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4WdK0h6Yz7zyQ5x; Tue, 6 Aug 2024 11:43:48 +0800 (CST) Received: from kwepemd200014.china.huawei.com (unknown [7.221.188.8]) by mail.maildlp.com (Postfix) with ESMTPS id B6EF3180AE3; Tue, 6 Aug 2024 11:43:54 +0800 (CST) Received: from [10.67.121.177] (10.67.121.177) by kwepemd200014.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Tue, 6 Aug 2024 11:43:53 +0800 CC: , , , , , , , , , , , , , Subject: Re: [PATCH 0/2] Support Armv8.9/v9.4 FEAT_HAFT To: Marc Zyngier References: <20240802093458.32683-1-yangyicong@huawei.com> <86cymr1a3z.wl-maz@kernel.org> From: Yicong Yang Message-ID: Date: Tue, 6 Aug 2024 11:43:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <86cymr1a3z.wl-maz@kernel.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.177] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemd200014.china.huawei.com (7.221.188.8) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240805_204408_217956_90E6378C X-CRM114-Status: GOOD ( 10.47 ) 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 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. Thanks.