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 66041C433ED for ; Wed, 14 Apr 2021 02:30:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 416C4613C4 for ; Wed, 14 Apr 2021 02:30:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244971AbhDNCal (ORCPT ); Tue, 13 Apr 2021 22:30:41 -0400 Received: from shelob.surriel.com ([96.67.55.147]:53626 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232708AbhDNCai (ORCPT ); Tue, 13 Apr 2021 22:30:38 -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 1lWVHk-0002fD-KE; Tue, 13 Apr 2021 22:29:44 -0400 Message-ID: Subject: Re: [PATCH v2 00/16] Multigenerational LRU Framework From: Rik van Riel To: Dave Chinner , Jens Axboe Cc: SeongJae Park , Yu Zhao , linux-mm@kvack.org, 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 , Ying Huang , Zi Yan , linux-kernel@vger.kernel.org, lkp@lists.01.org, page-reclaim@google.com Date: Tue, 13 Apr 2021 22:29:44 -0400 In-Reply-To: <20210413231436.GF63242@dread.disaster.area> References: <20210413075155.32652-1-sjpark@amazon.de> <3ddd4f8a-8e51-662b-df11-a63a0e75b2bc@kernel.dk> <20210413231436.GF63242@dread.disaster.area> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-F++cZhSa2Af2JhhC9Dpg" 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 --=-F++cZhSa2Af2JhhC9Dpg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2021-04-14 at 09:14 +1000, Dave Chinner wrote: > On Tue, Apr 13, 2021 at 10:13:24AM -0600, Jens Axboe wrote: >=20 > > The initial posting of this patchset did no better, in fact it did > > a bit > > worse. Performance dropped to the same levels and kswapd was using > > as > > much CPU as before, but on top of that we also got excessive > > swapping. > > Not at a high rate, but 5-10MB/sec continually. > >=20 > > I had some back and forths with Yu Zhao and tested a few new > > revisions, > > and the current series does much better in this regard. Performance > > still dips a bit when page cache fills, but not nearly as much, and > > kswapd is using less CPU than before. >=20 > Profiles would be interesting, because it sounds to me like reclaim > *might* be batching page cache removal better (e.g. fewer, larger > batches) and so spending less time contending on the mapping tree > lock... >=20 > IOWs, I suspect this result might actually be a result of less lock > contention due to a change in batch processing characteristics of > the new algorithm rather than it being a "better" algorithm... That seems quite likely to me, given the issues we have had with virtual scan reclaim algorithms in the past. SeongJae, what is this algorithm supposed to do when faced with situations like this: 1) Running on a system with 8 NUMA nodes, and memory pressure in one of those nodes. 2) Running PostgresQL or Oracle, with hundreds of processes mapping the same (very large) shared memory segment. How do you keep your algorithm from falling into the worst case virtual scanning scenarios that were crippling the 2.4 kernel 15+ years ago on systems with just a few GB of memory? --=20 All Rights Reversed. --=-F++cZhSa2Af2JhhC9Dpg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAmB2U5gACgkQznnekoTE 3oPxNggArWAg3BKjFNFCqV6hmRJcPb8OiTUU7M6upcMdSo+qTt5ivPbR1oqnHCc4 9B41LFwOhK4jc2LThte6bsSVL3GkPTia9RC5oXouoUiwJdp56vhc6fFnWcXqjJTJ M2E8mu4iJKq7nDGYqz/w212PB93qDfyv00newmUFybKj6VaJoJf2iR7WLjpU4wjK SNXJct21QO7AftDHPGYsXmSqVK4vQrodF0b9Pl5CVvfida/SJk0da762a9R8KwqF pIBWVmGNBD7pZWp7xwvYff0OnIt/5n43O2ZdOhKOwRa6H2jEdaAB3IvsQSknBTJF FO+6mbmBscAP3jwlbHf2DddcgZKh5A== =0Yad -----END PGP SIGNATURE----- --=-F++cZhSa2Af2JhhC9Dpg-- 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 E5A55C43460 for ; Wed, 14 Apr 2021 02:30:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 62042613C7 for ; Wed, 14 Apr 2021 02:30:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62042613C7 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 BB9C56B0070; Tue, 13 Apr 2021 22:30:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B42FA6B0071; Tue, 13 Apr 2021 22:30:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9BC446B0072; Tue, 13 Apr 2021 22:30:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 7B79C6B0070 for ; Tue, 13 Apr 2021 22:30:08 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 37A9982499B9 for ; Wed, 14 Apr 2021 02:30:08 +0000 (UTC) X-FDA: 78029392896.21.72593F3 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) by imf28.hostedemail.com (Postfix) with ESMTP id 06DFB2000255 for ; Wed, 14 Apr 2021 02:30:08 +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 1lWVHk-0002fD-KE; Tue, 13 Apr 2021 22:29:44 -0400 Message-ID: Subject: Re: [PATCH v2 00/16] Multigenerational LRU Framework From: Rik van Riel To: Dave Chinner , Jens Axboe Cc: SeongJae Park , Yu Zhao , linux-mm@kvack.org, 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 , Ying Huang , Zi Yan , linux-kernel@vger.kernel.org, lkp@lists.01.org, page-reclaim@google.com Date: Tue, 13 Apr 2021 22:29:44 -0400 In-Reply-To: <20210413231436.GF63242@dread.disaster.area> References: <20210413075155.32652-1-sjpark@amazon.de> <3ddd4f8a-8e51-662b-df11-a63a0e75b2bc@kernel.dk> <20210413231436.GF63242@dread.disaster.area> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-F++cZhSa2Af2JhhC9Dpg" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 06DFB2000255 X-Stat-Signature: qpnf6qr3twmuae9s5cjghjz7b91ab939 Received-SPF: none (shelob.surriel.com>: No applicable sender policy available) receiver=imf28; identity=mailfrom; envelope-from=""; helo=shelob.surriel.com; client-ip=96.67.55.147 X-HE-DKIM-Result: none/none X-HE-Tag: 1618367408-166292 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: --=-F++cZhSa2Af2JhhC9Dpg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2021-04-14 at 09:14 +1000, Dave Chinner wrote: > On Tue, Apr 13, 2021 at 10:13:24AM -0600, Jens Axboe wrote: >=20 > > The initial posting of this patchset did no better, in fact it did > > a bit > > worse. Performance dropped to the same levels and kswapd was using > > as > > much CPU as before, but on top of that we also got excessive > > swapping. > > Not at a high rate, but 5-10MB/sec continually. > >=20 > > I had some back and forths with Yu Zhao and tested a few new > > revisions, > > and the current series does much better in this regard. Performance > > still dips a bit when page cache fills, but not nearly as much, and > > kswapd is using less CPU than before. >=20 > Profiles would be interesting, because it sounds to me like reclaim > *might* be batching page cache removal better (e.g. fewer, larger > batches) and so spending less time contending on the mapping tree > lock... >=20 > IOWs, I suspect this result might actually be a result of less lock > contention due to a change in batch processing characteristics of > the new algorithm rather than it being a "better" algorithm... That seems quite likely to me, given the issues we have had with virtual scan reclaim algorithms in the past. SeongJae, what is this algorithm supposed to do when faced with situations like this: 1) Running on a system with 8 NUMA nodes, and memory pressure in one of those nodes. 2) Running PostgresQL or Oracle, with hundreds of processes mapping the same (very large) shared memory segment. How do you keep your algorithm from falling into the worst case virtual scanning scenarios that were crippling the 2.4 kernel 15+ years ago on systems with just a few GB of memory? --=20 All Rights Reversed. --=-F++cZhSa2Af2JhhC9Dpg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAmB2U5gACgkQznnekoTE 3oPxNggArWAg3BKjFNFCqV6hmRJcPb8OiTUU7M6upcMdSo+qTt5ivPbR1oqnHCc4 9B41LFwOhK4jc2LThte6bsSVL3GkPTia9RC5oXouoUiwJdp56vhc6fFnWcXqjJTJ M2E8mu4iJKq7nDGYqz/w212PB93qDfyv00newmUFybKj6VaJoJf2iR7WLjpU4wjK SNXJct21QO7AftDHPGYsXmSqVK4vQrodF0b9Pl5CVvfida/SJk0da762a9R8KwqF pIBWVmGNBD7pZWp7xwvYff0OnIt/5n43O2ZdOhKOwRa6H2jEdaAB3IvsQSknBTJF FO+6mbmBscAP3jwlbHf2DddcgZKh5A== =0Yad -----END PGP SIGNATURE----- --=-F++cZhSa2Af2JhhC9Dpg-- From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1163170855751955649==" MIME-Version: 1.0 From: Rik van Riel To: lkp@lists.01.org Subject: Re: [PATCH v2 00/16] Multigenerational LRU Framework Date: Tue, 13 Apr 2021 22:29:44 -0400 Message-ID: In-Reply-To: <20210413231436.GF63242@dread.disaster.area> List-Id: --===============1163170855751955649== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Wed, 2021-04-14 at 09:14 +1000, Dave Chinner wrote: > On Tue, Apr 13, 2021 at 10:13:24AM -0600, Jens Axboe wrote: > = > > The initial posting of this patchset did no better, in fact it did > > a bit > > worse. Performance dropped to the same levels and kswapd was using > > as > > much CPU as before, but on top of that we also got excessive > > swapping. > > Not at a high rate, but 5-10MB/sec continually. > > = > > I had some back and forths with Yu Zhao and tested a few new > > revisions, > > and the current series does much better in this regard. Performance > > still dips a bit when page cache fills, but not nearly as much, and > > kswapd is using less CPU than before. > = > Profiles would be interesting, because it sounds to me like reclaim > *might* be batching page cache removal better (e.g. fewer, larger > batches) and so spending less time contending on the mapping tree > lock... > = > IOWs, I suspect this result might actually be a result of less lock > contention due to a change in batch processing characteristics of > the new algorithm rather than it being a "better" algorithm... That seems quite likely to me, given the issues we have had with virtual scan reclaim algorithms in the past. SeongJae, what is this algorithm supposed to do when faced with situations like this: 1) Running on a system with 8 NUMA nodes, and memory pressure in one of those nodes. 2) Running PostgresQL or Oracle, with hundreds of processes mapping the same (very large) shared memory segment. How do you keep your algorithm from falling into the worst case virtual scanning scenarios that were crippling the 2.4 kernel 15+ years ago on systems with just a few GB of memory? -- = All Rights Reversed. --===============1163170855751955649== Content-Type: application/pgp-signature MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRRXpCQUFCQ0FBZEZpRUVLUjczcENDdEo1 WGozeUFEem5uZWtvVEUzb01GQW1CMlU1Z0FDZ2tRem5uZWtvVEUKM29QeE5nZ0FyV0FnM0JLakZO RkNxVjZobVJKY1BiOE9pVFVVN002dXBjTWRTbytxVHQ1aXZQYlIxb3FuSENjNAo5QjQxTEZ3T2hL NGpjMkxUaHRlNmJzU1ZMM0drUFRpYTlSQzVvWG91b1Vpd0pkcDU2dmhjNmZGbldjWHFqSlRKCk0y RThtdTRpSktxN25ER1lxei93MjEyUEI5M3FEZnl2MDBuZXdtVUZ5YktqNlZhSm9KZjJpUjdXTGpw VTR3aksKU05YSmN0MjFRTzdBZnRESFBHWXNYbVNxVks0dlFyb2RGMGI5UGw1Q1Z2ZmlkYS9TSmsw ZGE3NjJhOVI4S3dxRgpwSUJXVm1HTkJEN3BaV3A3eHd2WWZmME9uSXQvNW40M08yWmRPaEtPd1Jh NkgyakVkYUFCM0l2c1FTa25CVEpGCkZPKzZtYm1Cc2NBUDNqd2xiSGYyRGRkY2daS2g1QT09Cj0w WWFkCi0tLS0tRU5EIFBHUCBTSUdOQVRVUkUtLS0tLQo= --===============1163170855751955649==--