Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp357118pxb; Wed, 14 Apr 2021 17:43:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyH0cVudaRw8prEB41zPmvqMdehSWZW7fHVU2L52b0N13Ahnp86nzWYQ5DLY68gTsncc3SA X-Received: by 2002:aa7:c641:: with SMTP id z1mr1000797edr.144.1618447384638; Wed, 14 Apr 2021 17:43:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618447384; cv=none; d=google.com; s=arc-20160816; b=aHEUqo8+UjSpRclXvCZTYWVtgCo55e6OBKdFvf7n3GXZHKn9T62QKzZ8P3xN7U96tB +Wo4bYXqm4pdnmei0VFTv0z4u278lalx1UTCKDDH2Jqe8RN6gGXsr+JCTIS/NjZw3fym MSIfMHZTCHzYsxUd1e4KZbEU0eIWr3+myoGvXrA3+eDYQ/jgD7turygzvuVzIAWBaEx8 HA+TyYf99fhjkXEkoYX21fShQtMuBNNMOVjLw9DgLrf8dSz0CSUAjv2ubOX0FmHFtrBu nhAwmOkHqJjax8c0begampp6XsMRJxID9NrJSUahBblSc3WcH7Yi+bloZg3/ho6BV3La GcsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cFk9xs2GNfkAG4LwFGmGU5idTsGe49u9Ar1GX/8V8R4=; b=oi8KCrLOXMxkchWZ3gdiwADz3X7Qt34m3MxsuozFT3SfrtoOMPEGwcMCNGbsyWDoVW Av9PllWbk8t/w7/z4UkJ4V3P7S7hvQE9LKIO92qUiaN91ZbXs9u5ai98H8/SbXESS0D/ bRpXJwkevajmteCs4C7voDZ9GsNnMmDnQzqr08sWEzKHWPTydQtY6wnpTjoCNk+VFtsm fqfy9PvJy5QU0RY+Ueo6haAy1Gdlv5wLINzmt4OiNw8mM0qrbg77f0+reKxTJCSd4gpm YL9YazfhqhBMN2EFZ0jtRwT/FlSdaclH9DKKLuG1QW6p/LjcYO6hLaiZtJmvaExfB3SU wtzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="RHqW+I/c"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id wr14si670785ejb.11.2021.04.14.17.42.41; Wed, 14 Apr 2021 17:43:04 -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; dkim=pass header.i=@google.com header.s=20161025 header.b="RHqW+I/c"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352871AbhDNTPe (ORCPT + 99 others); Wed, 14 Apr 2021 15:15:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353126AbhDNTPc (ORCPT ); Wed, 14 Apr 2021 15:15:32 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25099C06175F for ; Wed, 14 Apr 2021 12:15:09 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id w4so17177641wrt.5 for ; Wed, 14 Apr 2021 12:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cFk9xs2GNfkAG4LwFGmGU5idTsGe49u9Ar1GX/8V8R4=; b=RHqW+I/cdvDL4vkAOSqhD4lvQxt3Y5Aa2VhgrbK6C+OJl5+wZd6bQkVczV0xZIKYS9 CkwU9hFDSKBDT44C7J6Cu9afnSpN6elhc8X8S3fGXNH9nJTfR6s4n0NvBqtz8KuBxI+I +bJJ1UVLMFov2AgHIMn3ug+4k9cvnqitCgqgE6d5tcC7fDRX0EtLXqlSp5/Up3l3tFUt /3togF4vDLRZI/LOabvlLAIuRwBcxwudDEjURLOKGPoZpQAYF4/VzIibnHzPknIL2+th 8pmdkf7VCYgZN4Q0lkxoNNj1+2/Kqbzky0ZoGnBkCQDRArbWG2kfgE9MXadAuP7UiupJ CpwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cFk9xs2GNfkAG4LwFGmGU5idTsGe49u9Ar1GX/8V8R4=; b=qV78aGMPuFmli7c8M8yP878wQufzVrLkiZk5XPPGI8cQ2e9axkYIR2WAoCKijzBdIE PjX0eiguABIAJrbR/9UHKwwIwT8oscNM71wZBgIm+uAtB7J7CwL5vVYSNo7BCtUSNMWZ iorrnmThSnSyqufqvrtMiN59ObtN7WUrywd+aq9gcNVHnvfNExiimUxnuEIZdhVF7xzI q1H6FRy73vxZBiSgescke3i7fWMW9CELmy3pHEOLQ8utL/vEOY+vAb8oce3Ou3FREUeY wSvkMd4gnNpaDIvqeO6uUrNcbFUD5da53iyIKzouhc6sFxzMaApy/c0ygmfARoyTxYFT hPLA== X-Gm-Message-State: AOAM5326FHVSATPtOaZPEY6VaM+WpEyq95FRe/e2PUqiY2hFfEIkf30h AFU7ztFsksJOdqeru5lg0ZTfF35LGrPsUTApBxsdKA== X-Received: by 2002:a5d:6a84:: with SMTP id s4mr35949194wru.92.1618427707498; Wed, 14 Apr 2021 12:15:07 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Yu Zhao Date: Wed, 14 Apr 2021 13:14:55 -0600 Message-ID: Subject: Re: [PATCH v2 00/16] Multigenerational LRU Framework To: Rik van Riel 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=y. > > > > 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? > > Databases with large shared memory segments shared between > many processes come to mind as a real-world example of a > worst case scenario. 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 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.