Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp358383pxb; Wed, 14 Apr 2021 17:45:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrX98uQOUza6rku2tDBcNNUldkP6SmGx4i9FbBL0RYQVN58mKnqoL5cWGJK7qm1DxFIRs0 X-Received: by 2002:a17:906:d8a9:: with SMTP id qc9mr739962ejb.37.1618447531532; Wed, 14 Apr 2021 17:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618447531; cv=none; d=google.com; s=arc-20160816; b=B1/JVYIyzhAxd4/9lTm/pw/2grLTCoYu2Mi1dRjWQ56iMNt7csig5bipfHvz1STZDf wZU6I9I1Rh+ZtbEFLPK1ZNjVJJOF5vHWlptLb78LBps8kqqgEay/i+KJs8XdgJfV6gci e6OnohsTeDEr/3n9eHfPp7JZTDOOzT6DybVIndnHfynUWu6lFcUA3AizbdKii1MBvdd8 LQJJpfNlPSLxaKnMS4I1NPLCeSQl+YWaw9B9MowYbiUTZkCAB67pFUC8vwmrm0zaXJpi DNcxSHIPjUddhC57TVG9zqCkG+eIAZzpBPD+yF0xxEtEtLzt4WuHPGvzPyMXTyNoJvqE nR4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=ClFFjdhlNMrz2hYrk1pQtQqRBlWZGEMnvUzztObFieA=; b=YyI7spKxYoN6Fyw6nR0ly/NG9bpuyelq0JGigsnxU86FqMoI57kl95biU4/iYTNbig CdSUdyMBapLuzJt4DV05DHiltGKJ0UrZWEek7ibRgKZ4RA3njMdskGCbXcQqnqUFhm6Y TCRBsA+w8jtaM8d4cftlnSVWNj5wyRy1h+ooB2nS3zxK+Xx+86M3z/GhZxEY3ahIeqwk +ecQWZg4pV24x5Y/5YFfUwdfRb/vAlU+VGA8a2Vx9MNH2rDOKpCR3unhRFjsACECGz/E MaEW2hE/R7JM4YNJ6FnVcZlQDP6euIumTarlIT3LHEobOK+FqzByfwTzaVRsXHJ03djn A6xQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t22si966874edd.558.2021.04.14.17.45.05; Wed, 14 Apr 2021 17:45:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237401AbhDNTmf (ORCPT + 99 others); Wed, 14 Apr 2021 15:42:35 -0400 Received: from shelob.surriel.com ([96.67.55.147]:34198 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235066AbhDNTme (ORCPT ); Wed, 14 Apr 2021 15:42:34 -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 1lWlOV-0004hX-Kt; Wed, 14 Apr 2021 15:41:47 -0400 Message-ID: Subject: Re: [PATCH v2 00/16] Multigenerational LRU Framework From: Rik van Riel To: Yu Zhao Cc: Andi Kleen , Dave Chinner , Jens Axboe , SeongJae Park , Linux-MM , 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 , lkp@lists.01.org, Kernel Page Reclaim v2 Date: Wed, 14 Apr 2021 15:41:46 -0400 In-Reply-To: References: <20210413075155.32652-1-sjpark@amazon.de> <3ddd4f8a-8e51-662b-df11-a63a0e75b2bc@kernel.dk> <20210413231436.GF63242@dread.disaster.area> <20210414155130.GU3762101@tassilo.jf.intel.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-d7+pZEnMCdzHhTJvagz0" 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 --=-d7+pZEnMCdzHhTJvagz0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2021-04-14 at 13:14 -0600, Yu Zhao wrote: > On Wed, Apr 14, 2021 at 9:59 AM Rik van Riel > wrote: > > On Wed, 2021-04-14 at 08:51 -0700, Andi Kleen wrote: > > > > 2) It will not scan PTE tables under non-leaf PMD entries > > > > that > > > > do not > > > > have the accessed bit set, when > > > > CONFIG_HAVE_ARCH_PARENT_PMD_YOUNG=3Dy. > > >=20 > > > This assumes that workloads have reasonable locality. Could > > > there > > > be a worst case where only one or two pages in each PTE are used, > > > so this PTE skipping trick doesn't work? > >=20 > > Databases with large shared memory segments shared between > > many processes come to mind as a real-world example of a > > worst case scenario. >=20 > Well, I don't think you two are talking about the same thing. Andi > was > focusing on sparsity. Your example seems to be about sharing, i.e., > ihgh mapcount. Of course both can happen at the same time, as I > tested > here: > https://lore.kernel.org/linux-mm/YHFuL%2FDdtiml4biw@google.com/#t >=20 > I'm skeptical that shared memory used by databases is that sparse, > i.e., one page per PTE table, because the extremely low locality > would > heavily penalize their performance. But my knowledge in databases is > close to zero. So feel free to enlighten me or just ignore what I > said. A database may have a 200GB shared memory segment, and a worker task that gets spun up to handle a query might access only 1MB of memory to answer that query. That memory could be from anywhere inside the shared memory segment. Maybe some of the accesses are more dense, and others more sparse, who knows? A lot of the locality will depend on how memory space inside the shared memory segment is reclaimed and recycled inside the database. --=20 All Rights Reversed. --=-d7+pZEnMCdzHhTJvagz0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAmB3RXsACgkQznnekoTE 3oOQKgf/cHYeGYL+vEGo2ujR7QJ1IO0KzWQoVv9TjWcfYctiTXl+jzYf/fuyBLqh Hk+VhgI+jxkQljbjg7Tha183gQRlykdjrghGI8ojQFkNIy1sNRH/JYAeiuqcw/zZ 3YUJhxS7WFczgI7KQ5+iLXFTQebr+UQE/LwfS+FW9gTYVg8OwizIfeQdCowQoiAt qDbaVKQRClFyGYL7m3FKa84SodEXFf0JIY+qPrTqOWMwH93liO0rQhMNJIcw9XBx Vd6Ns18YXOCk2tUlv9lVMVBPM+cM7PxFDPjgaZf+L5N2B7z/H2A4UsijUn1ZDe9U RzcIQ9rtP3HF0tD/lwW4C0pnBLAwLg== =BeNw -----END PGP SIGNATURE----- --=-d7+pZEnMCdzHhTJvagz0--