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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07321C433EF for ; Mon, 4 Jul 2022 15:00:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7F01E6B0072; Mon, 4 Jul 2022 11:00:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7A0786B0073; Mon, 4 Jul 2022 11:00:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 668006B0074; Mon, 4 Jul 2022 11:00:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 53E6E6B0072 for ; Mon, 4 Jul 2022 11:00:19 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 250A332C3E for ; Mon, 4 Jul 2022 15:00:19 +0000 (UTC) X-FDA: 79649728158.06.55E29F3 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf14.hostedemail.com (Postfix) with ESMTP id 07E2A100016 for ; Mon, 4 Jul 2022 15:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=yswN5aZkyvlegWG7tn/cLii2U3IAmP4FdWDVkw8I23c=; b=SyYMOfELnNCGaaPbSWD/JGXhXh MLbsalnhhK7QuipbmZDNCWfxzN4mOdM23XricwOPKMP1kbKeEz577rXjrwsYlL4eNXSXunynR+U+y F7q6Sc79Rtf84OsBGBDMMY0c2HSXe2R+h4ix5JmhVcdihOb5KYZJ3l/5JU3O0Df+m99e0UiPMmUio udO0dfm8XWh2dI9jUCHOjqRTk7Iwwagrg1m/lLbaEixP+zGIafxWFFTtxoOKU6VCCuwzxnWkc9OCo OH2wGaAzUqCfTMw/t462zIW6fba7glnuRvORXn2vfBwaHyy5zVivgTMfZQ93jAhzgmyVFcXJHkxse 0FHAad0g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8NYX-00HNZO-Kl; Mon, 04 Jul 2022 15:00:09 +0000 Date: Mon, 4 Jul 2022 16:00:09 +0100 From: Matthew Wilcox To: "Aneesh Kumar K.V" Cc: linux-mm@kvack.org, akpm@linux-foundation.org, Wei Xu , Huang Ying , Yang Shi , Davidlohr Bueso , Tim C Chen , Michal Hocko , Linux Kernel Mailing List , Hesham Almatary , Dave Hansen , Jonathan Cameron , Alistair Popple , Dan Williams , Johannes Weiner , jvgediya.oss@gmail.com Subject: Re: [PATCH v8 00/12] mm/demotion: Memory tiers and demotion Message-ID: References: <20220704070612.299585-1-aneesh.kumar@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220704070612.299585-1-aneesh.kumar@linux.ibm.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656946818; a=rsa-sha256; cv=none; b=hiU+FDRG8wqc0Zl4dqjwpYTayD5TDY7zWKBbtseo8Ob9scU16vQ/vgIEdzor1zbmmekSEY c/UuA48nlTx/H7+kmlXRmLKeEH6rHKQ/TByqj2yqngeUAledaHptgAZF6pEgzs59XAvdsv Boa5TntOiHWwxM+kzgyXMF2l+xEXxSw= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=SyYMOfEL; dmarc=none; spf=none (imf14.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656946818; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yswN5aZkyvlegWG7tn/cLii2U3IAmP4FdWDVkw8I23c=; b=ya3q4YVybUZTrkyOO0eJMaqsi67MigXOqFXx7nXZJNWFkW9Thun+6RcAjuzvPHkDq8w2z7 qDxXOPTYvui5QQQW9pe0zmP6VAYxWKwH5i7QR5NiWHkngwgjEzfR8PRmYG6lf1t2NsFRIw MZQtKA+X4IQq4mnrHiEA8wjy9bBJRVQ= Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=SyYMOfEL; dmarc=none; spf=none (imf14.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 07E2A100016 X-Rspam-User: X-Stat-Signature: mctzw5kxb8dgocch7w7yjfmaa9zuosb7 X-HE-Tag: 1656946816-854651 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, Jul 04, 2022 at 12:36:00PM +0530, Aneesh Kumar K.V wrote: > * The current tier initialization code always initializes > each memory-only NUMA node into a lower tier. But a memory-only > NUMA node may have a high performance memory device (e.g. a DRAM > device attached via CXL.mem or a DRAM-backed memory-only node on > a virtual machine) and should be put into a higher tier. > > * The current tier hierarchy always puts CPU nodes into the top > tier. But on a system with HBM (e.g. GPU memory) devices, these > memory-only HBM NUMA nodes should be in the top tier, and DRAM nodes > with CPUs are better to be placed into the next lower tier. These things that you identify as problems seem perfectly sensible to me. Memory which is attached to this CPU has the lowest latency and should be preferred over more remote memory, no matter its bandwidth.