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 91260C433EF for ; Tue, 25 Jan 2022 06:48:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 16B936B0081; Tue, 25 Jan 2022 01:48:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 11B9F6B0083; Tue, 25 Jan 2022 01:48:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F25746B0085; Tue, 25 Jan 2022 01:48:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0078.hostedemail.com [216.40.44.78]) by kanga.kvack.org (Postfix) with ESMTP id E424E6B0081 for ; Tue, 25 Jan 2022 01:48:37 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 92B3F94FA5 for ; Tue, 25 Jan 2022 06:48:37 +0000 (UTC) X-FDA: 79067881074.19.702F650 Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) by imf20.hostedemail.com (Postfix) with ESMTP id D49C81C0005 for ; Tue, 25 Jan 2022 06:48:36 +0000 (UTC) Received: by mail-io1-f44.google.com with SMTP id c188so315817iof.6 for ; Mon, 24 Jan 2022 22:48:36 -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=2CO/0VtOREtMtGW71kkDBfMgMYeipJa6iXGHC5VC/RU=; b=X1ftQALT1SX5jUMQWj7RoMqtz2ewnU+L3TGQqWmlcbgo3KSmMxF5sCjshQxkke1ZFA jzg3QMPbXZxTMJpqsuUnVp2tRS/gMu7mDs1i1AXKoC0Yn9NtDnO+jiAMoTVASSnpv88c oxTgFX+w+blwFXMcVO+umvS9Edyq2CPSGETtOkEmOYF6ChWDaI8pDRoItSjToYMdRYUV 3zSSoseakDUqj/d4eR4g4BvplCQ0+YE8vHSaImz4kwNEIMnc6CD09VE7b2FyutUNyDch Ve7PL8FasxksLlw2ftA7KN04RdQRMY+YmJqacRaP4Qr2KrglAy9VvNHhS6fn8jyA3DE3 tKOA== 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=2CO/0VtOREtMtGW71kkDBfMgMYeipJa6iXGHC5VC/RU=; b=2zgVVWj7yusUQuwJHsIlRGPgmVwTUSfYzL4N7IyjIB4UOj+91lOxm85yGDE12EYpOB 7yfUnZfi2q54XQeNYyEKImJk58/eXe/rx9VwmRbeV4z2b18wcWqGIfXvj7Gj6o4ITbOj BLqW/v75fThmA5AMJXtk/Ms0eVIVuML0KOzEB6QA5GaLxZv9wuRpa5NNy1BmwGbpevvn wgUkmL7XBAKED99vWdn0quRnkZ40XzsUJiYKaB6ZgVSR8tq/XIpiDYXac2RAj+6Z7F77 m/54vX5Brq5barSOL9Nz6p4xZVTG0TyTFrVd1tVEQ2JCV0r72tIgT5aCqLRcPS7TAzcQ Vmjw== X-Gm-Message-State: AOAM531rbzaybyMI4iR7UVSMb9raog/OdPDAVuev56Ro8qGi3mUGC+l4 QWjdkpHK0v4uO9/Lc4G7TN58XA== X-Google-Smtp-Source: ABdhPJwDp6hR1qn1SHpSjIF3pYJ7fhWeNimbnilfiMoehjRW8WORjpC4cJ6QnM6/gZMjIwnNZM9XPQ== X-Received: by 2002:a02:6d48:: with SMTP id e8mr9063758jaf.250.1643093315535; Mon, 24 Jan 2022 22:48:35 -0800 (PST) Received: from google.com ([2620:15c:183:200:c4ed:79a3:8a0e:7ee]) by smtp.gmail.com with ESMTPSA id c3sm8292027iow.28.2022.01.24.22.48.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 22:48:34 -0800 (PST) Date: Mon, 24 Jan 2022 23:48:30 -0700 From: Yu Zhao To: Barry Song <21cnbao@gmail.com> Cc: Andrew Morton , Linus Torvalds , Andi Kleen , Catalin Marinas , Dave Hansen , Hillf Danton , Jens Axboe , Jesse Barnes , Johannes Weiner , Jonathan Corbet , Matthew Wilcox , Mel Gorman , Michael Larabel , Michal Hocko , Rik van Riel , Vlastimil Babka , Will Deacon , Ying Huang , LAK , Linux Doc Mailing List , LKML , Linux-MM , page-reclaim@google.com, x86 Subject: Re: [PATCH v6 0/9] Multigenerational LRU Framework Message-ID: References: <20220104202227.2903605-1-yuzhao@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: D49C81C0005 X-Stat-Signature: 6a8eb65mb9gejusor1e34xwwd48dze4h X-Rspam-User: nil Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=X1ftQALT; spf=pass (imf20.hostedemail.com: domain of yuzhao@google.com designates 209.85.166.44 as permitted sender) smtp.mailfrom=yuzhao@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1643093316-306415 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 Sun, Jan 23, 2022 at 06:43:06PM +1300, Barry Song wrote: > On Wed, Jan 5, 2022 at 7:17 PM Yu Zhao wrote: > > Large-scale deployments > > ----------------------- > > We've rolled out MGLRU to tens of millions of Chrome OS users and > > about a million Android users. Google's fleetwide profiling [13] shows > > an overall 40% decrease in kswapd CPU usage, in addition to > > Hi Yu, > > Was the overall 40% decrease of kswap CPU usgae seen on x86 or arm64? > And I am curious how much we are taking advantage of NONLEAF_PMD_YOUNG. > Does it help a lot in decreasing the cpu usage? Hi Barry, The fleet-wide profiling data I shared was from x86. For arm64, I only have data from synthetic benchmarks at the moment, and it also shows similar improvements. For Chrome OS (individual users), walk_pte_range(), the function that would benefit from ARCH_HAS_NONLEAF_PMD_YOUNG, only uses a small portion (<4%) of kswapd CPU time. So ARCH_HAS_NONLEAF_PMD_YOUNG isn't that helpful. > If so, this might be > a good proof that arm64 also needs this hardware feature? > In short, I am curious how much the improvement in this patchset depends > on the hardware ability of NONLEAF_PMD_YOUNG. For data centers, I do think ARCH_HAS_NONLEAF_PMD_YOUNG has some value. In addition to cold/hot memory scanning, there are other use cases like dirty tracking, which can benefit from the accessed bit on non-leaf entries. I know some proprietary software uses this capability on x86 for different purposes than this patchset does. And AFAIK, x86 is the only arch that supports this capability, e.g., risc-v and ppc can only set the accessed bit in PTEs. In fact, I've discussed this with one of the arm maintainers Will. So please check with him too if you are interested in moving forward with the idea. I might be able to provide with additional data if you need it to make a decision. Thanks.