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 39ABEC4743C for ; Mon, 21 Jun 2021 21:23:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DBD8860FF2 for ; Mon, 21 Jun 2021 21:23:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DBD8860FF2 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 73C616B006C; Mon, 21 Jun 2021 17:23:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6EC156B0070; Mon, 21 Jun 2021 17:23:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5656F6B0072; Mon, 21 Jun 2021 17:23:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0063.hostedemail.com [216.40.44.63]) by kanga.kvack.org (Postfix) with ESMTP id 247FC6B006C for ; Mon, 21 Jun 2021 17:23:21 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 9F1D86C11 for ; Mon, 21 Jun 2021 21:23:20 +0000 (UTC) X-FDA: 78279006960.40.35CCCFB Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by imf13.hostedemail.com (Postfix) with ESMTP id 5DA8DE000999 for ; Mon, 21 Jun 2021 21:23:20 +0000 (UTC) Received: by mail-lf1-f49.google.com with SMTP id h15so13919626lfv.12 for ; Mon, 21 Jun 2021 14:23:20 -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=SDkdKQO3vtfGIS1rAZlQjDwV1/jRxi/pckUkfKSHVIw=; b=XCp3y76rTcage77Jk32OI3VnG0nOR7bH6bDmiM5scgPolz6ylItJj7apAVA4BwAGJp 6DeBUrl/WMkeCMMlARVfEkiWC0vyGsGjzy00bJgyEA0/JbfeoAWhfsYozlrDsuw9LuVy gfrQkAVtLuoPI+juslwt7e3RrwDPLIrav4OLyW88xAu72jf41MuyTw91jkBrfbngH7Bb g+f66ZU19HDiTXj3zUEceS9UxdvMVFoEOZ9w+M9cwSYgHC4WEX+gWvsSfgbP/AOCh0Ct YhzOnMtOyk2mNcjOYlakznxQceYkBh7UPqAUXIzhxDkqyADQbZuVJUTqWFcehbJnfjfV WtKQ== 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=SDkdKQO3vtfGIS1rAZlQjDwV1/jRxi/pckUkfKSHVIw=; b=grj6ocTo0TvB84XNktRje1SdRtmh4pxTGgzVHQGh6/gkJpIV8Of3QgcJHaEZ835j8F OCV4eDMx6HQWtrNEkWx7l+kh567bVDvHgGum0QJnQ5jE/IUVS8AVGSM+tQdULk0YxQCR ywYolm1DALNSMiHoJO16Rsed1WRilEYtHDMH3FzbMZiulWW08XkFmyHUoUh7e6kEPMEU GK9Jkq3wmC/kUUuY0vILOFAGv3z6mj1aJj8KbEOpSNEodCgK5lGzvHgMpDx7Zgs4H2xX WbDun1C9Mm/n2p73QaAuOXMdcakpSGTeMlwHAtTdqH7Xug9c0MfpOmiDhvuJKzfijS+T 02YA== X-Gm-Message-State: AOAM530WrskvyL/ErUYYXCuwwQCqghaLo9GG284i72iHuWpTqKVghVH8 kuFIHsGf6TxRg2o3x/Iw+gF5GhQpYkrSHQmU4BVgTQ== X-Google-Smtp-Source: ABdhPJyW/1485yjGzgT3PJ5t5xisYLqiLZT3OyYwWiYA1d1qR87boJtki8YRvOFTaQ2cil8SeX0B7JzWw4Uv117y1CE= X-Received: by 2002:ac2:545a:: with SMTP id d26mr194227lfn.83.1624310598373; Mon, 21 Jun 2021 14:23:18 -0700 (PDT) MIME-Version: 1.0 References: <475cbc62-a430-2c60-34cc-72ea8baebf2c@linux.intel.com> In-Reply-To: From: Shakeel Butt Date: Mon, 21 Jun 2021 14:23:07 -0700 Message-ID: Subject: Re: [LSF/MM TOPIC] Tiered memory accounting and management To: Yang Shi Cc: Tim Chen , lsf-pc@lists.linux-foundation.org, Linux MM , Michal Hocko , Dan Williams , Dave Hansen , David Rientjes , Wei Xu , Greg Thelen Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=XCp3y76r; spf=pass (imf13.hostedemail.com: domain of shakeelb@google.com designates 209.85.167.49 as permitted sender) smtp.mailfrom=shakeelb@google.com; dmarc=pass (policy=reject) header.from=google.com X-Stat-Signature: 6tonzdgppdgjgwbinzqss1sqces7snpq X-Rspamd-Queue-Id: 5DA8DE000999 X-Rspamd-Server: rspam06 X-HE-Tag: 1624310600-488361 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 Mon, Jun 21, 2021 at 1:43 PM Yang Shi wrote: > > On Thu, Jun 17, 2021 at 11:49 AM Shakeel Butt wrote: [...] > > > > IMHO we should focus more on the "aging" of the application memory and > > "migration/balance" between the tiers. I don't think the memory > > reclaim infrastructure is the right place for these operations > > (unevictable pages are ignored and not accurate ages). What we need is > > Why is unevictable pages a problem? I don't get why you have to demote > unevictable pages. If you do care what nodes the memory will be > mlock'ed on, don't you have to move the memory to the target nodes > before mlock them? > I think we want the ability to balance the memory (hot in higher tier and cold in lower tier) irrespective if it is evictable or not. Similarly we want aging information of both evictable and unevictable memory. If we depend on the reclaim infrastructure for demotion then cold unevictable memory may get stuck in the higher tier and have no aging information of unevictable memory. > > proactive continuous aging and balancing. We need something like, with > > additions, Multi-gen LRUs or DAMON or page idle tracking for aging and > > a new mechanism for balancing which takes ages into account. > > I agree the better balance could be reached by more accurate aging. It > is a more general problem than tier'ed memory specific. > I agree and proactive reclaim is the other use-case.