Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp227365imw; Mon, 4 Jul 2022 08:09:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vFenThbptUTWkYL9kman0ieTpMP+qn80Nywrk4lHpPLlqB0wfSAS9TChK2qCK/OGvES3id X-Received: by 2002:a17:906:6416:b0:722:e812:1000 with SMTP id d22-20020a170906641600b00722e8121000mr30303307ejm.275.1656947380911; Mon, 04 Jul 2022 08:09:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656947380; cv=none; d=google.com; s=arc-20160816; b=M+IXf7XuWMhdqPV/EHt+/VMnfeacApIk2VolUS7lguAZH6Wq+WlE3fmsJZkfO6wG8b gK20vpPFlQaQYnpr93y39Pl6n76nLAXGzhRAwEm/WtrWKXiqTm7f2i2jHnhVtSW0AU/K JDgnN7qZvquATuazduShMKmC4EmzNPA+25YG5N/nHmEXZDTuzXxMpWzOZf5gCXb6paed FMomVdEuP8SHnFaCSFIeKqBgrNFYDPSWfx7b114o9u4WD8KqfapEbhorKZO333rVen4t nuelgpSgurLSpyeoVDTquepIicRTYpShlmEt+/2Ajl2rpO8UCU0NBZnw/e5uni2XtD+3 a8+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yswN5aZkyvlegWG7tn/cLii2U3IAmP4FdWDVkw8I23c=; b=PJ29lggSOzWOS+z391/WGiOCACRdAM+7GipZeoFLXhb32iIM0IPbkQv+sn/cwbzSEu 8YAUWzdcTFlinirvuRtRJh4kM7NJhcYpoRWrPEcKphVoT4rdjiYH85rnyq7/rS/GbNag k9LRtg9UImlGDCCb2C4Bjcd4hVXAFryoXRnXZ+W3rlCrHZafc3a6+Xjg64RbdgnO/9+T JiqioAjIlFMVLocPe7biaVjBfCmnUXITyMEUH87E5eqr7y2jmkjl7lr+DaKe9tOx9AzR oUIB9pxwoZ4CGXp5qi+jbDkKdIhHzrK4vzO+xm5whcxxhn4P/ca+lGdp+a5BrhK7Gyf7 Firw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=SyYMOfEL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb34-20020a170907962200b007121b9fc6fbsi11700561ejc.956.2022.07.04.08.09.14; Mon, 04 Jul 2022 08:09:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=SyYMOfEL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234011AbiGDPAb (ORCPT + 99 others); Mon, 4 Jul 2022 11:00:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230174AbiGDPAa (ORCPT ); Mon, 4 Jul 2022 11:00:30 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6C5B62D4 for ; Mon, 4 Jul 2022 08:00:28 -0700 (PDT) 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> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.