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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BA1DC433ED for ; Wed, 14 Apr 2021 13:52:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5BF1A610E8 for ; Wed, 14 Apr 2021 13:52:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351709AbhDNNwm (ORCPT ); Wed, 14 Apr 2021 09:52:42 -0400 Received: from shelob.surriel.com ([96.67.55.147]:48344 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233454AbhDNNwj (ORCPT ); Wed, 14 Apr 2021 09:52:39 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lWfvr-0001GU-Kr; Wed, 14 Apr 2021 09:51:51 -0400 Message-ID: <93308ea276cfe7997c29ce7132516e830e8fec40.camel@surriel.com> Subject: Re: [PATCH v2 00/16] Multigenerational LRU Framework From: Rik van Riel To: "Huang, Ying" , Yu Zhao Cc: Dave Chinner , Jens Axboe , SeongJae Park , Linux-MM , Andi Kleen , Andrew Morton , Benjamin Manes , Dave Hansen , Hillf Danton , Johannes Weiner , Jonathan Corbet , Joonsoo Kim , Matthew Wilcox , Mel Gorman , Miaohe Lin , Michael Larabel , Michal Hocko , Michel Lespinasse , Roman Gushchin , Rong Chen , SeongJae Park , Tim Chen , Vlastimil Babka , Yang Shi , Zi Yan , linux-kernel , lkp@lists.01.org, Kernel Page Reclaim v2 Date: Wed, 14 Apr 2021 09:51:51 -0400 In-Reply-To: <87lf9lqnit.fsf@yhuang6-desk1.ccr.corp.intel.com> References: <20210413075155.32652-1-sjpark@amazon.de> <3ddd4f8a-8e51-662b-df11-a63a0e75b2bc@kernel.dk> <20210413231436.GF63242@dread.disaster.area> <87tuo9qtmd.fsf@yhuang6-desk1.ccr.corp.intel.com> <87lf9lqnit.fsf@yhuang6-desk1.ccr.corp.intel.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-TvVzMFbUNFpXYZ2w65cj" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Sender: riel@shelob.surriel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-TvVzMFbUNFpXYZ2w65cj Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2021-04-14 at 16:27 +0800, Huang, Ying wrote: > Yu Zhao writes: >=20 > > On Wed, Apr 14, 2021 at 12:15 AM Huang, Ying > > wrote: > > >=20 > > NUMA Optimization > > ----------------- > > Support NUMA policies and per-node RSS counters. > >=20 > > We only can move forward one step at a time. Fair? >=20 > You don't need to implement that now definitely. But we can discuss > the > possible solution now. That was my intention, too. I want to make sure we don't end up "painting ourselves into a corner" by moving in some direction we have no way to get out of. The patch set looks promising, but we need some plan to avoid the worst case behaviors that forced us into rmap based scanning initially. > Note that it's possible that only some processes are bound to some > NUMA > nodes, while other processes aren't bound. For workloads like PostgresQL or Oracle, it is common to have maybe 70% of memory in a large shared memory segment, spread between all the NUMA nodes, and mapped into hundreds, if not thousands, of processes in the system. Now imagine we have an 8 node system, and memory pressure in the DMA32 zone of node 0. How will the current VM behave? Wha t will the virtual scanning need to do? If we can come up with a solution to make virtual scanning scale for that kind of workload, great. If not ... if it turns out most of the benefits of the multigeneratinal LRU framework come from sorting the pages into multiple LRUs, and from being able to easily reclaim unmapped pages before having to scan mapped ones, could it be an idea to implement that first, independently from virtual scanning? I am all for improving our page reclaim system, I just want to make sure we don't revisit the old traps that forced us where we are today :) --=20 All Rights Reversed. --=-TvVzMFbUNFpXYZ2w65cj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAmB283cACgkQznnekoTE 3oPHTAgAibRj26Dg8hudb4TbNjzdUMWxbcn01w6bKFBXrdvDF+R0L9GpYE5Ujha7 xkegocz6XyUNRTHvfvLL7Z/CsZezxbeJoe3PIvRLZ0DV2L5TxYKFDdq5I+oeYuE2 cRpk5iE4eqZ8e9OK5NV2uFMBJ9M/s1ajvHLlY3izNfSAPX86rjAMFI50DboJChL5 +AXB3s0Qgmg4U9Wo9yyefUNma3AA9zN8E9mMeKnJuBsfVT4SLv+EZxIIPbLUPV24 bd0bce2U1BVlb1U6d4gHgLFDmVrlKmH1NK4MopRQU5sQSTYlnoh5BIsJO9pstNFp CBP8TQTqMhWSLDnwv7rBMQo8Z5pv9w== =tvZB -----END PGP SIGNATURE----- --=-TvVzMFbUNFpXYZ2w65cj-- 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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 704F4C433B4 for ; Wed, 14 Apr 2021 13:52:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id ED8B8610E8 for ; Wed, 14 Apr 2021 13:52:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED8B8610E8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8444B6B0075; Wed, 14 Apr 2021 09:52:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 81AD46B0080; Wed, 14 Apr 2021 09:52:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6E3536B0081; Wed, 14 Apr 2021 09:52:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0253.hostedemail.com [216.40.44.253]) by kanga.kvack.org (Postfix) with ESMTP id 502FA6B0075 for ; Wed, 14 Apr 2021 09:52:15 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 0B1202DFD for ; Wed, 14 Apr 2021 13:52:15 +0000 (UTC) X-FDA: 78031111830.28.688EFDD Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) by imf06.hostedemail.com (Postfix) with ESMTP id C9066C0007C9 for ; Wed, 14 Apr 2021 13:52:14 +0000 (UTC) Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lWfvr-0001GU-Kr; Wed, 14 Apr 2021 09:51:51 -0400 Message-ID: <93308ea276cfe7997c29ce7132516e830e8fec40.camel@surriel.com> Subject: Re: [PATCH v2 00/16] Multigenerational LRU Framework From: Rik van Riel To: "Huang, Ying" , Yu Zhao Cc: Dave Chinner , Jens Axboe , SeongJae Park , Linux-MM , Andi Kleen , Andrew Morton , Benjamin Manes , Dave Hansen , Hillf Danton , Johannes Weiner , Jonathan Corbet , Joonsoo Kim , Matthew Wilcox , Mel Gorman , Miaohe Lin , Michael Larabel , Michal Hocko , Michel Lespinasse , Roman Gushchin , Rong Chen , SeongJae Park , Tim Chen , Vlastimil Babka , Yang Shi , Zi Yan , linux-kernel , lkp@lists.01.org, Kernel Page Reclaim v2 Date: Wed, 14 Apr 2021 09:51:51 -0400 In-Reply-To: <87lf9lqnit.fsf@yhuang6-desk1.ccr.corp.intel.com> References: <20210413075155.32652-1-sjpark@amazon.de> <3ddd4f8a-8e51-662b-df11-a63a0e75b2bc@kernel.dk> <20210413231436.GF63242@dread.disaster.area> <87tuo9qtmd.fsf@yhuang6-desk1.ccr.corp.intel.com> <87lf9lqnit.fsf@yhuang6-desk1.ccr.corp.intel.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-TvVzMFbUNFpXYZ2w65cj" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 X-Rspamd-Queue-Id: C9066C0007C9 X-Stat-Signature: dqt63q6gdqbrwoaq7ei3snnmd66eayir X-Rspamd-Server: rspam02 Received-SPF: none (shelob.surriel.com>: No applicable sender policy available) receiver=imf06; identity=mailfrom; envelope-from=""; helo=shelob.surriel.com; client-ip=96.67.55.147 X-HE-DKIM-Result: none/none X-HE-Tag: 1618408334-941268 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: --=-TvVzMFbUNFpXYZ2w65cj Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2021-04-14 at 16:27 +0800, Huang, Ying wrote: > Yu Zhao writes: >=20 > > On Wed, Apr 14, 2021 at 12:15 AM Huang, Ying > > wrote: > > >=20 > > NUMA Optimization > > ----------------- > > Support NUMA policies and per-node RSS counters. > >=20 > > We only can move forward one step at a time. Fair? >=20 > You don't need to implement that now definitely. But we can discuss > the > possible solution now. That was my intention, too. I want to make sure we don't end up "painting ourselves into a corner" by moving in some direction we have no way to get out of. The patch set looks promising, but we need some plan to avoid the worst case behaviors that forced us into rmap based scanning initially. > Note that it's possible that only some processes are bound to some > NUMA > nodes, while other processes aren't bound. For workloads like PostgresQL or Oracle, it is common to have maybe 70% of memory in a large shared memory segment, spread between all the NUMA nodes, and mapped into hundreds, if not thousands, of processes in the system. Now imagine we have an 8 node system, and memory pressure in the DMA32 zone of node 0. How will the current VM behave? Wha t will the virtual scanning need to do? If we can come up with a solution to make virtual scanning scale for that kind of workload, great. If not ... if it turns out most of the benefits of the multigeneratinal LRU framework come from sorting the pages into multiple LRUs, and from being able to easily reclaim unmapped pages before having to scan mapped ones, could it be an idea to implement that first, independently from virtual scanning? I am all for improving our page reclaim system, I just want to make sure we don't revisit the old traps that forced us where we are today :) --=20 All Rights Reversed. --=-TvVzMFbUNFpXYZ2w65cj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAmB283cACgkQznnekoTE 3oPHTAgAibRj26Dg8hudb4TbNjzdUMWxbcn01w6bKFBXrdvDF+R0L9GpYE5Ujha7 xkegocz6XyUNRTHvfvLL7Z/CsZezxbeJoe3PIvRLZ0DV2L5TxYKFDdq5I+oeYuE2 cRpk5iE4eqZ8e9OK5NV2uFMBJ9M/s1ajvHLlY3izNfSAPX86rjAMFI50DboJChL5 +AXB3s0Qgmg4U9Wo9yyefUNma3AA9zN8E9mMeKnJuBsfVT4SLv+EZxIIPbLUPV24 bd0bce2U1BVlb1U6d4gHgLFDmVrlKmH1NK4MopRQU5sQSTYlnoh5BIsJO9pstNFp CBP8TQTqMhWSLDnwv7rBMQo8Z5pv9w== =tvZB -----END PGP SIGNATURE----- --=-TvVzMFbUNFpXYZ2w65cj-- From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5975520548217812166==" MIME-Version: 1.0 From: Rik van Riel To: lkp@lists.01.org Subject: Re: [PATCH v2 00/16] Multigenerational LRU Framework Date: Wed, 14 Apr 2021 09:51:51 -0400 Message-ID: <93308ea276cfe7997c29ce7132516e830e8fec40.camel@surriel.com> In-Reply-To: <87lf9lqnit.fsf@yhuang6-desk1.ccr.corp.intel.com> List-Id: --===============5975520548217812166== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Wed, 2021-04-14 at 16:27 +0800, Huang, Ying wrote: > Yu Zhao writes: > = > > On Wed, Apr 14, 2021 at 12:15 AM Huang, Ying > > wrote: > > > = > > NUMA Optimization > > ----------------- > > Support NUMA policies and per-node RSS counters. > > = > > We only can move forward one step at a time. Fair? > = > You don't need to implement that now definitely. But we can discuss > the > possible solution now. That was my intention, too. I want to make sure we don't end up "painting ourselves into a corner" by moving in some direction we have no way to get out of. The patch set looks promising, but we need some plan to avoid the worst case behaviors that forced us into rmap based scanning initially. > Note that it's possible that only some processes are bound to some > NUMA > nodes, while other processes aren't bound. For workloads like PostgresQL or Oracle, it is common to have maybe 70% of memory in a large shared memory segment, spread between all the NUMA nodes, and mapped into hundreds, if not thousands, of processes in the system. Now imagine we have an 8 node system, and memory pressure in the DMA32 zone of node 0. How will the current VM behave? Wha t will the virtual scanning need to do? If we can come up with a solution to make virtual scanning scale for that kind of workload, great. If not ... if it turns out most of the benefits of the multigeneratinal LRU framework come from sorting the pages into multiple LRUs, and from being able to easily reclaim unmapped pages before having to scan mapped ones, could it be an idea to implement that first, independently from virtual scanning? I am all for improving our page reclaim system, I just want to make sure we don't revisit the old traps that forced us where we are today :) -- = All Rights Reversed. --===============5975520548217812166== Content-Type: application/pgp-signature MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRRXpCQUFCQ0FBZEZpRUVLUjczcENDdEo1 WGozeUFEem5uZWtvVEUzb01GQW1CMjgzY0FDZ2tRem5uZWtvVEUKM29QSFRBZ0FpYlJqMjZEZzho dWRiNFRiTmp6ZFVNV3hiY24wMXc2YktGQlhyZHZERitSMEw5R3BZRTVVamhhNwp4a2Vnb2N6Nlh5 VU5SVEh2ZnZMTDdaL0NzWmV6eGJlSm9lM1BJdlJMWjBEVjJMNVR4WUtGRGRxNUkrb2VZdUUyCmNS cGs1aUU0ZXFaOGU5T0s1TlYydUZNQko5TS9zMWFqdkhMbFkzaXpOZlNBUFg4NnJqQU1GSTUwRGJv SkNoTDUKK0FYQjNzMFFnbWc0VTlXbzl5eWVmVU5tYTNBQTl6TjhFOW1NZUtuSnVCc2ZWVDRTTHYr RVp4SUlQYkxVUFYyNApiZDBiY2UyVTFCVmxiMVU2ZDRnSGdMRkRtVnJsS21IMU5LNE1vcFJRVTVz UVNUWWxub2g1QklzSk85cHN0TkZwCkNCUDhUUVRxTWhXU0xEbnd2N3JCTVFvOFo1cHY5dz09Cj10 dlpCCi0tLS0tRU5EIFBHUCBTSUdOQVRVUkUtLS0tLQo= --===============5975520548217812166==--