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=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 6AB68C433B4 for ; Wed, 14 Apr 2021 15:59:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 119BF61158 for ; Wed, 14 Apr 2021 15:59:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 119BF61158 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8C5086B0072; Wed, 14 Apr 2021 11:59:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 89C066B0073; Wed, 14 Apr 2021 11:59:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 73CF26B0075; Wed, 14 Apr 2021 11:59:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0049.hostedemail.com [216.40.44.49]) by kanga.kvack.org (Postfix) with ESMTP id 55FDA6B0072 for ; Wed, 14 Apr 2021 11:59:10 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 19CDA40CA for ; Wed, 14 Apr 2021 15:59:10 +0000 (UTC) X-FDA: 78031431660.13.AF3D443 Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by imf04.hostedemail.com (Postfix) with ESMTP id 14CB93C2 for ; Wed, 14 Apr 2021 15:59:07 +0000 (UTC) Received: by mail-lj1-f170.google.com with SMTP id c1so15570576ljd.7 for ; Wed, 14 Apr 2021 08:59: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=Nw9XoSWLF/lbloHZk5v1ZuW1BtLC1PdKJBw9usU2gQI=; b=A5tw8XeSwq+jA9n7FPOt0Mgv8oEzWPt8AjVPF7ltD8uF+jKouH88BeIUGUlgp0TvOq dyncM+o+W/B+r4TT9W0grbDpGIY1M8PnpvX0GBzebHxiH7+NCfSqFZ0eTSkcgpnY99CA xgBBWPnvRAehJaEZLUO+BmQc7c/q3J11H1YjrsVJD+W735SeEAhoT3XWH0FltIcLDE+l 7xnxdQHLbnoOiYBEFt0F7Ggg8WMyy/BUPx9eBnQopRgvATyOavcV/6k1kX7qFS3T3n2K 2gSWIVknQMtd9eAt4I1CGm8xAPFTr2BrVzvDG4ga2gNRWHPEvUxnRm+xuvt9F0a3mPWB 6skQ== 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=Nw9XoSWLF/lbloHZk5v1ZuW1BtLC1PdKJBw9usU2gQI=; b=GguJHKLkx9qGVobnDKbcM9DsDmXjaQzV+23d+WdPlT8+E4v7MaUL8I/VKzyB3s/XHz EP8gX9F3R+SpCHp+OxsUa4BVrKwiM4NLm4Yjec7BeSf8CkI/+CEqC9tsUcewnfoZuVmw G8ayKf0KMoynTOT44TbpH1JY7Lkvl2Qzj2TFFQMPFQVHZAAV87PxFtr3V0f0M5WOST5i EaWOEmfdNEW3JioFCyEYIImNfp54f5XHHQ3tkdHJ79cn7GYVF0hzZzUQ68IVOvqdW9PI S9lsEuW7CQG6sePrwkvgfrQUd54kM0QuUm4eTZ14OEakaXdB5v2nIRPH4hguKiCyrB+u 6Cjg== X-Gm-Message-State: AOAM530BxTK5DhYK+t33j5Mw/apIPvTPb0ggZwW5G7QkBaGprxuNQR8c PT+YA7RQMx/Q1IK3zuiyipL/4aSHd7s7xdD9qYinNQ== X-Google-Smtp-Source: ABdhPJw/3oYqJpS76cT+/fGrsZXpWQ8TJmCFedFydR6GaBHuQnfuE2PzG69m/AE6KlWJAwKhCn2t5nz6ZqeAsXDs2zU= X-Received: by 2002:a2e:968a:: with SMTP id q10mr14306858lji.0.1618415947897; Wed, 14 Apr 2021 08:59: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> <87tuo9qtmd.fsf@yhuang6-desk1.ccr.corp.intel.com> <87lf9lqnit.fsf@yhuang6-desk1.ccr.corp.intel.com> <93308ea276cfe7997c29ce7132516e830e8fec40.camel@surriel.com> In-Reply-To: <93308ea276cfe7997c29ce7132516e830e8fec40.camel@surriel.com> From: Shakeel Butt Date: Wed, 14 Apr 2021 08:58:56 -0700 Message-ID: Subject: Re: [page-reclaim] Re: [PATCH v2 00/16] Multigenerational LRU Framework To: Rik van Riel Cc: "Huang, Ying" , Yu Zhao , 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 Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 14CB93C2 X-Stat-Signature: zfnyzpzbqgjjwxwpirji6skspsmhh59u X-Rspamd-Server: rspam02 Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf04; identity=mailfrom; envelope-from=""; helo=mail-lj1-f170.google.com; client-ip=209.85.208.170 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618415947-996127 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: On Wed, Apr 14, 2021 at 6:52 AM Rik van Riel wrote: > > 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 :) > One potential idea is to take the hybrid 'of rmap and virtual scanning' approach. If the number of pages that are targeted to be scanned is below some threshold, do rmap otherwise virtual scanning. I think we can experimentally find good value for that threshold.