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 DD06BC3DA70 for ; Tue, 30 Jul 2024 16:00:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5A49A6B0083; Tue, 30 Jul 2024 12:00:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 554F16B0089; Tue, 30 Jul 2024 12:00:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 41D076B008A; Tue, 30 Jul 2024 12:00:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 2152D6B0083 for ; Tue, 30 Jul 2024 12:00:20 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id CA70EA447C for ; Tue, 30 Jul 2024 16:00:19 +0000 (UTC) X-FDA: 82396880958.10.8EC25EA Received: from mail-ua1-f51.google.com (mail-ua1-f51.google.com [209.85.222.51]) by imf04.hostedemail.com (Postfix) with ESMTP id 9E2234000D for ; Tue, 30 Jul 2024 16:00:17 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=d4HeXPeS; dmarc=none; spf=pass (imf04.hostedemail.com: domain of gourry@gourry.net designates 209.85.222.51 as permitted sender) smtp.mailfrom=gourry@gourry.net ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722355177; a=rsa-sha256; cv=none; b=bBAJLdj8HrPjfiYStCCCCK7rd2CveqhX9OzEB2BIHeEStssAvHKEfgqAm+ybtbuUfF+pzF Dt+JBQ1aRXHIsuDhbPvAZgrJdLlUPYi7VnLWoQ036QqTWkIIGk28/hiB2IJTx6VUVubH3h wpPJvTF2NvqUWBbBIYVDoYduo8KGiKM= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=d4HeXPeS; dmarc=none; spf=pass (imf04.hostedemail.com: domain of gourry@gourry.net designates 209.85.222.51 as permitted sender) smtp.mailfrom=gourry@gourry.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722355177; 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=ebSu3UElL8dKrK505UtfSRAh4jbtzC8DMHGUOIQGm/A=; b=Iih2hKgyeRkz4Ne/X/9OG2vQHMf03pFaPZkdOrVQeSPa4++CjwMQJHjbIMd9Kno3KW8HHc 9LGBbyc8TtD4T24wnWrgOEJ33wk+H1fR6JDv+WeAPJ/iH1g2dNSQnTCkpCt62kLubTiT68 TY9LZ7OE3tV9gQrm5IAzsFatNvXbvWU= Received: by mail-ua1-f51.google.com with SMTP id a1e0cc1a2514c-81ff6a80cbbso1316383241.1 for ; Tue, 30 Jul 2024 09:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1722355216; x=1722960016; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ebSu3UElL8dKrK505UtfSRAh4jbtzC8DMHGUOIQGm/A=; b=d4HeXPeSAEKT3BuXAhTQX2cBbfOrRMwzQ0hfXu2jleKSt86P3Ml7oxBvDy0E2y4OEX jVh1vdwcHDrM4ghOUZBIrf+oealTRHQhgEhYrY3qhbJonlH1B09F9cqLSEuxoSs8JQYT O/vPCpNfspygDnAK7PqtStbZadXtsPjTbHFCspXEtwFhNvKC8dq8tiFuoz4MgqVHazLj UK8ypARWblsUpCgqLUKx3piMCXsJZ9qaLKvACiYngNR3mPPocCfly7t3YN73sa8w9J01 gESXu8lPNjvB2hneAYGt5C2z3QAjzyoNz1xxPQuAnRdeo4P6qT2jXbvQyVWWn/ZMdLCq h+yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722355216; x=1722960016; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ebSu3UElL8dKrK505UtfSRAh4jbtzC8DMHGUOIQGm/A=; b=aas3xSZC8CvJJHp5PtSKEm/Y0z+PD5qXzYwBBStxt/DEuWVLRD+bJWP8KMjNCDQqW0 /52xSN2e/qj7DtTB0HiU3TG/KNIFJzNfEWwI0DMRAZwjdTNWBuYkgo2nNrUCloeZLdct 5expLJqdcKsyhUhQkj3U0SmZhaf4O5h48P/tje8gv/i4saG7O0m0lYrhIyup1SrLGULC 8QF19L/CdT8robm5IEkEy3H2Wj75Y7LT9iwywaqNa+uYLEdKX29tMbyAmlSHRNzH3Rvt 4jIhmXv/ariP4xbteldI3RATaeC+vuCurP4kO5DhcfrMo6YQW8P2LCkV/PmT0tw2NVXj 91zg== X-Gm-Message-State: AOJu0YwPrsHx0eReNX5WzWkJGmDE797lYkQtFK0wj0vEk7YrLwCseQIR tlijzGn6KCNd6V+EYSCnB0Lvaa3HvQuFyyTQx5AdkQx01kwnyGWmKj2vU8vI9sU= X-Google-Smtp-Source: AGHT+IG64oD/0BAxRTYSk9Um5ejrwHurtyJiWine+vs8I2db0quwR2iEnh/I3UfX946vZydcmQjuVg== X-Received: by 2002:a05:6102:3ec2:b0:493:b2b4:3708 with SMTP id ada2fe7eead31-493fad54e1fmr12048280137.27.1722355216237; Tue, 30 Jul 2024 09:00:16 -0700 (PDT) Received: from PC2K9PVX.TheFacebook.com (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a1d73b2036sm653148085a.38.2024.07.30.09.00.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:00:15 -0700 (PDT) Date: Tue, 30 Jul 2024 01:19:53 -0400 From: Gregory Price To: "Huang, Ying" Cc: linux-mm@kvack.org, akpm@linux-foundation.org, dave.jiang@intel.com, Jonathan.Cameron@huawei.com, horenchuang@bytedance.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, dan.j.williams@intel.com, lenb@kernel.org, "Aneesh Kumar K.V" Subject: Re: [PATCH] acpi/hmat,mm/memtier: always register hmat adist calculation callback Message-ID: References: <20240726215548.10653-1-gourry@gourry.net> <87ttg91046.fsf@yhuang6-desk2.ccr.corp.intel.com> <877cd3u1go.fsf@yhuang6-desk2.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877cd3u1go.fsf@yhuang6-desk2.ccr.corp.intel.com> X-Rspamd-Queue-Id: 9E2234000D X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 9tmkzameytpisesas1x9iscz4ch9dfzk X-HE-Tag: 1722355217-833923 X-HE-Meta: U2FsdGVkX19gQcDcqHf3fIzTaq6H3+dhx/mvZQ1iDHbgcNK1oXayefv387E+Wl5Aw2UzEQ6s3lPXmifWKqAYtFEE2P5V9GEp6fnT/Mwbpl35SDtUMJl786swhmGrul36Ua+DBNULvi7bDYg17T0t0F1vhXk5isHjyLQ59rwrSuNVIg/KpmBE5whaDy/psvDaSv3JADyTD4M+z96fA6V8PA1S6Czs+G8eSHo7kcQr8qGRUCdRwk/wEgRfudadaPdxO6BPeBbPmYuRhVC4mOtiYkzGGqKCcpmaU9/bYBjZ/+aTN+qGIUVzZi7f3eyZ5zcKtxSIJcKkbxpaO6uFtxyOaobjrH2G+s1xnrGemO6BAN86g1Yi/ON5VU9M4lGkKkbNv6IBhWQdOkfTfF31BW4fVhXAKxbzeZmRIg0b0yBEr49QQLdhF71PMG4DXf1TsfzN0NkjDxs8aNzuyDEo9oPw8Obggcu2o4WqpMYjA0NACl+N7kRk/bPztone2n2732OXQmJabsW1VWV7VJSGdYW4bdHFwbjtQCCC6YT8xO0GPQxiZVQ8LX4UVeu5HAQ2KLyx/OjaH08HoyLLxaf/AZv0xNgtAmlyRuwJbjebc24HtBF2UCBJVTZ2wXbHfw539rzeQZ9AckEQwv0sP8Y8peJET6c6NAKNhvJBfE/NYj2FMYPm7OQU/yRvSV0VgZvKA+20uiCTDmylYgwjoQXbxWBeNXgKkFDCRtCiMSgNnW0rDjrC/x4PS+dQYC4Zwfp6f9/fMwPnI6yOhYYIPuA/eVpLkkBTiJx75aEDjnyw2LjFnAfjd4W9qz17DccD5tRX+4Fntbguv9WsGGWbAjtn8BPjiFDXbmxybuHq5rdf19I7ZAY+WHZHE/hNLVhOS7uMzdvmlg2wZMRiuV2hs5plwvndVyM/+44akNn4pm/WonJqUfxl/B2d7CYHZDIKksTR94hV67ame+iTXT5ge8RxYUj 6PA10VrE 3eNu4+2NCYu3D2gm/mdnuk2Vi2Be/RtEoFSgk8FaAd/mDwUQwI7gQbioO5DnBHikiw9oXlQsJaj9w4ELs7rE5eJBWlJvjIAYuYabGzFisvsEdKQSGladItLxv0BtU5V5xE5lSdTFjL3mWmPtZzUUOuzAlAlfnslr+ej1rnBMUOfOuXtkvQUov/6bEoNzpSt8yki0cCRLtWY/1IJjvur0uWXRo2xGdL/aeV65BFJ6F3YVg4oAz8DcFu1LS8cRTmtBVI/DIHKZN73xUio0= 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: List-Subscribe: List-Unsubscribe: On Tue, Jul 30, 2024 at 09:12:55AM +0800, Huang, Ying wrote: > > Right now HMAT appears to be used prescriptively, this despite the fact > > that there was a clear intent to separate CPU-nodes and non-CPU-nodes in > > the memory-tier code. So this patch simply realizes this intent when the > > hints are not very reasonable. > > If HMAT isn't available, it's hard to put memory devices to > appropriate memory tiers without other information. In commit > 992bf77591cb ("mm/demotion: add support for explicit memory tiers"), > Aneesh pointed out that it doesn't work for his system to put > non-CPU-nodes in lower tier. > Per Aneesh in 992bf77591cb - The code explicitly states the intent is to put non-CPU-nodes in a lower tier by default. The current implementation puts all nodes with CPU into the highest tier, and builds the tier hierarchy by establishing the per-node demotion targets based on the distances between nodes. This is accurate for the current code The current tier initialization code always initializes each memory-only NUMA node into a lower tier. This is *broken* for the currently upstream code. This appears to be the result of the hmat adistance callback introduction (though it may have been broken before that). ~Gregory