From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DE2F1BE23F for ; Tue, 30 Jul 2024 16:00:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722355219; cv=none; b=kOIjMXrutP+tH/VcLq4lE98bVC0S+66MDeBZPRvuen5oRnUF5QqZx4uipYETeqNkoWLcdvNeQuwapjgb+iPL7wo07dVaV6Xwo+BFwu0FOVOrL3hhxwhqsB9a1qigBtpGtv93l+x2c6cGyBaTTZKyt6795vZZtRuIjnUw/svVDM0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722355219; c=relaxed/simple; bh=mCh601FrRtPxjpmD6wTsae7FGFqTSFvvavFvDhd9LnI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=V/i6U5en8hcQVO7pjpbInxOhJy8rwyMmNyiJj/fpRF9ZqCY9lkco+yFHFeQNKvHe31hbd7gpW80iYevF8yNqwhCXpXALDAZzf1ZsB2D5p3h811yMsh8yY0pXB6jQxC0DfGIqxykBaTKhfPlsBKX12CHhPz7oLNQbkOX/JOLsB0o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=nyuzWyqJ; arc=none smtp.client-ip=209.85.217.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="nyuzWyqJ" Received: by mail-vs1-f47.google.com with SMTP id ada2fe7eead31-4928989e272so1129118137.2 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=vger.kernel.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=nyuzWyqJID1+9n4yHSdJ8yP0dcTZQrXCr+yT6oD2PBfMFklD2z9JCBubRwnGxCZC93 FlOqMi0PMh6oZvMH/40Ul7+kzE5yB0jws7Nuk1fySJEAwpzG5wmbIzM8DR+wU8edIGPJ 6c2fcej1jARgTQ0hcZI6H/Fil1nNsJlqN+lG2zeH065UtJ9WWA7FBaBJxV8iYIiAJ/cV hZOnK3UmgKTF6Blban3ZvcWHcdWNMock4tNMzUMFlo7Dia0/D9BRDEZA5Uks4kIAhl5Z eerUqmd5Twu2HVfNXVXDXRUmw+VjlXtooIYHzX1E8Cln7cXA7+XpAf2aoAhJ8/0AP8/Q ActQ== 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=bDMRnINsFMM+SytANK6qEBheMoZyWrQ1LA+VpK/cYRsvsPreintILxRhbiW64HZ95H 3/J9QK9jbVzcEhBiBjp7PRR30ZS/anfqIfoWGw9o8IWhwsBtnoF7bA615UfRSQT1fPd4 WAJZ3s7xuqAlBGzrUJobkjU+dkmSnUMGn+9WJZQAgkbzcNIzmwrloMdxNO29euoXNrNc kjPNAwBr/OEnQ5MC63xn52WEmXnbk32GkjojAsvgXCbXVoivqZTBZASMZvnIabO0wr0Y ag5vC6Axjwteg8wSh/K5aGN60nzH47hKmyJRoKg6+yat3ZZLa7ERMTvrmQjguanEmlhX Pr2A== X-Forwarded-Encrypted: i=1; AJvYcCUbisoODO5ReKKb2DSNY0XlsP5qqu1Wiia7oEoyw8kteZmPg8v/32Xs3ceBini5IZnLYs+13GK7lb0d2OLJaeGjh+aqzldyskPZDiDW X-Gm-Message-State: AOJu0YzHQW+E3umGzEiC4K6cDNDWkLLfoeopY82I2Ytm+ulBK2GO1Pes 0W7TCFq8sQbZBYG9I4/UW2KmTSMD2uJQRcL79FdSjdVns6zMXIK077vFxUuELOk= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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> 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