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 C0F93C52D7C for ; Fri, 16 Aug 2024 03:14:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3D6ED8D0037; Thu, 15 Aug 2024 23:14:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 386418D0002; Thu, 15 Aug 2024 23:14:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 228E08D0037; Thu, 15 Aug 2024 23:14:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id F21568D0002 for ; Thu, 15 Aug 2024 23:14:49 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id A1C471A1455 for ; Fri, 16 Aug 2024 03:14:49 +0000 (UTC) X-FDA: 82456641498.11.BA08B26 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by imf23.hostedemail.com (Postfix) with ESMTP id CF416140006 for ; Fri, 16 Aug 2024 03:14:47 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=zwfuRMlU; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf23.hostedemail.com: domain of rientjes@google.com designates 209.85.214.169 as permitted sender) smtp.mailfrom=rientjes@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1723778033; a=rsa-sha256; cv=none; b=g89gTiEJRPK9ALOqkyTA7P3S2XnhWkB1yzoIvb704e1lkmwCXUYyCmGleNv2ZEGjdcbMS2 9c8ae8Z1vYDK7065tqCVONNnxmFyrV9Qw5uIBri2jGQAbDleEE2lDmYh5QadiQbR0LnESy O480t9odnaSWurQa0rIGDDP2BnRXgpI= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=zwfuRMlU; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf23.hostedemail.com: domain of rientjes@google.com designates 209.85.214.169 as permitted sender) smtp.mailfrom=rientjes@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723778033; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=mncEnTrGLhr0XZSwehPQoXmibCtIqyrKNXwcgQ7YQTo=; b=o+71lUYawlXP+BV6phSTIMQmZRVGZdlz1h0QGN/8cwJ/7E5YKbQdZgHE9qJnteh2miIX2x kMSc9gee9zAorRrLNHdEUfFncjf0uIm6Edx1G/ftCaMzUWPcxeZDpJe+w8FfdKDIwNZ5OG mFYkFvxlasyeTnode1SL1bnavc1oLVw= Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-201e4cf371eso48665ad.0 for ; Thu, 15 Aug 2024 20:14:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1723778086; x=1724382886; darn=kvack.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=mncEnTrGLhr0XZSwehPQoXmibCtIqyrKNXwcgQ7YQTo=; b=zwfuRMlUJqO6dyS6lvD9tiPX7sraUZwG4ZJcsKraW7Hxnobpbfw0FwV+aY2Kf+NwSG psQ/R783FMOczWpD2pY2kxsgIe3wytAKkuBs17Hosoof+Sezxpqeb1skwQhQl+9ROSd9 UKmRqIGCA5Ip2wK/DYILjUgOtALC0C5kzLgjuRHqkNv1EjCktxcnjMM2ExdQzma77BQO tEmwJvPTIqTpp3MEM70wo9jcZ511moKOzypwz5s7VJ6GLGM/xSvQtjBBADZ39GMP3Ns0 VDWL4YM5HU+Y41Ob+8YAau31U+KrENn1aJgj+Wbp5Kw9RkhwnCnyjaMx921esp4ELlG2 S3fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723778086; x=1724382886; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mncEnTrGLhr0XZSwehPQoXmibCtIqyrKNXwcgQ7YQTo=; b=Www3Ux0LwjjaQpQaZJ8gWHXIAVQvqNGGDOT6ceKHVJqYEdbLvhOcAnP94+kAPG1mvd LGiD3Kbra+gJ4K80ewfuGP+/prZopcACNsUUfVlSGQpGj4LjAff6xrz/ctD7dDCb0FRa k2JuwT7pfNoU54u/FIYkMHwLw6Cby4trRXGfpXal8UyOGwFFBBi3Volsa+AolwqkcCiR EHCkBjkajwfoNmo3DWJvet3TQOvUt+Cm0+nyCek/0+9r1fPpVlLaXu5j5LloVHWIeAj2 YNB4W6IEe2hfmSUAmsIxiRf6M0+qQxKQZ+N87aCOW2FEfIEMJoffCAFoEZPJZUjipEyJ Fj+w== X-Forwarded-Encrypted: i=1; AJvYcCXlm4EACm48FmQWE+jEmSyalBbhABxN9zhddD44Wog15sPNFvCZh+MnlwZnTlE6IiytnR7qMv1vQ9c3pnQZBwaAHuY= X-Gm-Message-State: AOJu0Yxb0ulgxU5nz/h217UWxt7iF4SnMq3Fug+h40LSZbJv0bcdfL8w brpTs1ZTe+99HP8mME9QDry9Zyo1P6u4MfWNy8QmkPJyjyuPSZX0ArB0f7AKwg== X-Google-Smtp-Source: AGHT+IFkMI2RQ+dV/zqGKwCGQNSnORZnm91mCder9ExHmxN0iIRaokp29nlhb3NlU0WjhxLfSdsqYg== X-Received: by 2002:a17:902:ce90:b0:1fb:563:3c25 with SMTP id d9443c01a7336-20206100d86mr759675ad.18.1723778086021; Thu, 15 Aug 2024 20:14:46 -0700 (PDT) Received: from [2620:0:1008:15:4d4d:6efc:cb52:8b8e] ([2620:0:1008:15:4d4d:6efc:cb52:8b8e]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d3e2e6b3ccsm633416a91.20.2024.08.15.20.14.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2024 20:14:45 -0700 (PDT) Date: Thu, 15 Aug 2024 20:14:44 -0700 (PDT) From: David Rientjes To: Andrew Morton cc: Yuanchu Xie , David Hildenbrand , "Aneesh Kumar K.V" , Khalid Aziz , Henry Huang , Yu Zhao , Dan Williams , Gregory Price , Huang Ying , Lance Yang , Randy Dunlap , Muhammad Usama Anjum , Kalesh Singh , Wei Xu , Greg Kroah-Hartman , "Rafael J. Wysocki" , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , Shuah Khan , Yosry Ahmed , Matthew Wilcox , Sudarshan Rajagopalan , Kairui Song , "Michael S. Tsirkin" , Vasily Averin , Nhat Pham , Miaohe Lin , Qi Zheng , Abel Wu , "Vishal Moola (Oracle)" , Kefeng Wang , linux-kernel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v3 0/7] mm: workingset reporting In-Reply-To: <20240813113313.1af3a5d7db7134a354a4cda3@linux-foundation.org> Message-ID: <54a4d626-faed-ad86-f3c4-5e725986bd29@google.com> References: <20240813165619.748102-1-yuanchu@google.com> <20240813113313.1af3a5d7db7134a354a4cda3@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: CF416140006 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 4bfx9ybw8xkbsbucr53nt4f9pjzr44dr X-HE-Tag: 1723778087-413946 X-HE-Meta: U2FsdGVkX1+tEUlT9TKcZnTQTZ6HyusWesL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t6jqGJxzNgAcZrHRDb7ci1tIfytg35WqYWi83k97jHhphnOM9gtdxIVt5wR6S8SwIaXSDA/JBVqr0S1buQoOnIsqTkZENj9XNiqIaiuEGeGUy5YsESJ7+Er9ppghfihZNEjn6RiDLqrDO757ia9i0MygPTMeVKwuldA2jNTruSI3ytst+cjsCehLjX0e/Q+lZO257GqQt2+oAiXOxpXBE8/5emnjyqVTuImpCfNMmhN2QZKmybvuQUIHtb7mdZ9tsA1Qr6Z1GolsywJEBuQk3VIx+8oNmlSIOChQRAKsW7xOybuK+VULzcfwnuuSz5o= 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: List-Subscribe: List-Unsubscribe: On Tue, 13 Aug 2024, Andrew Morton wrote: > On Tue, 13 Aug 2024 09:56:11 -0700 Yuanchu Xie wrote: > > > This patch series provides workingset reporting of user pages in > > lruvecs, of which coldness can be tracked by accessed bits and fd > > references. > > Very little reviewer interest. I wonder why. Will Google be the only > organization which finds this useful? > Although also from Google, I'm optimistic that others will find this very useful. It's implemented in a way that is intended to be generally useful for multiple use cases, including user defined policy for proactive reclaim. The cited sample userspace implementation is intended to demonstrate how this insight can be put into practice. Insight into the working set of applications, particularly on multi-tenant systems, has derived significant memory savings for Google over the past decade. The introduction of MGLRU into the upstream kernel has allowed this information to be derived in a much more efficient manner, presented here, that should make upstreaming of this insight much more palatable. This insight into working set will only become more critical going forward with memory tiered systems. Nothing here is specific to Google; in fact, we apply the insight into working set in very different ways across our fleets. > > Benchmarks > > ========== > > Ghait Ouled Amar Ben Cheikh has implemented a simple "reclaim everything > > colder than 10 seconds every 40 seconds" policy and ran Linux compile > > and redis from the phoronix test suite. The results are in his repo: > > https://github.com/miloudi98/WMO > > I'd suggest at least summarizing these results here in the [0/N]. The > Linux kernel will probably outlive that URL! > Fully agreed that this would be useful for including in the cover letter. The results showing the impact of proactive reclaim using insight into working set is impressive for multi-tenant systems. Having very comparable performance for kernbench with a fraction of the memory usage shows the potential for proactive reclaim and without the dependency on direct reclaim or throttling of the application itself. This is one of several benchmarks that we are running and we'll be expanding upon this with cotenancy, user defined latency senstivity per job, extensions for insight into memory re-access, and in-guest use cases.