From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E341283C89 for ; Fri, 20 Mar 2026 16:20:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774023631; cv=none; b=NRO+e9U5xKO1tJC7vJrsJIdqhJR6Sa5gDL6U9teVGFqcBpdatUwFBRHbDY8Pjw/SIX1BCmbefu6b5PWeNAIMtUPz9vjfhUVBz/tTlQWD30GReaf5SLaj4art9d7kmSGZtges5AjqmxT8EPzDNO5Ma+uSRL3ANICsc5AFY9zMgZg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774023631; c=relaxed/simple; bh=f23/cWvuFntyKkPcVW9s0H4JKUGUfEjEqYonI0uUxQE=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=LKBr46CmzbEB2q1QNFRbwLFp9EV6fUkzbnmqSSwIEFQZVEhB7iYEPBFiZC8vccyonh1GQs4U2RMNCI0X3NfOYFTjrhkPfPt6xrqZBri/CvIdMxo2tp8zSc/0ymrIfDCdihc7OynCtBDr0L+YMven1zW7B9aRzcPRqTke3gA+z+s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=iStf9NT4; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="iStf9NT4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 860F3C4CEF7; Fri, 20 Mar 2026 16:20:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1774023630; bh=f23/cWvuFntyKkPcVW9s0H4JKUGUfEjEqYonI0uUxQE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iStf9NT4SDcQQaDyNM3BjMWqAwsEPKu1Wy3rOsjOXNraunwPj1d3UKqhUaJKvnww0 jN+Bw0bAUglB7UKIH6esRRJ0c9nDZkwCfKGqk5H0EUj/tsAKH8AYgKzlJKh514hgEH SXDRLSWkRzv+Zc+Wh76Q47CaQHilRiadCdaw2P04= Date: Fri, 20 Mar 2026 09:20:29 -0700 From: Andrew Morton To: Donet Tom Cc: David Hildenbrand , Ingo Molnar , Peter Zijlstra , Ritesh Harjani , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Baolin Wang , Ying Huang , Juri Lelli , Mel Gorman Subject: Re: [PATCH] memory tiering: Do not allow promotion if NUMA_BALANCING_MEMORY_TIERING is disabled Message-Id: <20260320092029.7b2e2a9f24bfd5197541223e@linux-foundation.org> In-Reply-To: <20260320092251.1290207-1-donettom@linux.ibm.com> References: <20260320092251.1290207-1-donettom@linux.ibm.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Fri, 20 Mar 2026 14:52:51 +0530 Donet Tom wrote: > In the current implementation, if NUMA_BALANCING_MEMORY_TIERING is > disabled and the pages are on the lower tier, the pages may still be > promoted. > > This happens because task_numa_work() updates the last_cpupid field to > record the last access time only when NUMA_BALANCING_MEMORY_TIERING is > enabled and the folio is on the lower tier. If > NUMA_BALANCING_MEMORY_TIERING is disabled, the last_cpupid field > retains a valid last CPU id. > > In should_numa_migrate_memory(), the decision checks whether > NUMA_BALANCING_MEMORY_TIERING is disabled, the folio is on the lower > tier, and last_cpupid is invalid. However, since last_cpupid remains > valid when NUMA_BALANCING_MEMORY_TIERING is disabled, the condition > evaluates to false and migration is allowed. > > This patch prevents promotion when NUMA_BALANCING_MEMORY_TIERING is > disabled and the folio is on the lower tier. Thanks. The AI reviewbot asked some questions: https://sashiko.dev/#/patchset/20260320092251.1290207-1-donettom@linux.ibm.com