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 BDA4837DACE for ; Tue, 12 May 2026 22:46:29 +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=1778625989; cv=none; b=X2TieMfv92yk8nycIRBKVfDdb70QQ5FAekrS32Lz9+8mPfobjiDHF+RN/+W8l72phYu9itVvoYvF4ZpbBr6ObSTRwVNawndWYa50gNDONMsTltP7zziKlpO1yP53prWDij2YWsCm40ZsV3hvjIvaAB1LLyTqqWG0R5qLdHQrQd4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778625989; c=relaxed/simple; bh=SMUx2+NAIUaALUF7jFMmKKri2IWeIDMtw8A52vqEhKc=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=W0cuhg/E6Cjpk8m/5W7Yx1lKgVu+R6PJ+NegrX55CwZ3FctFRI1l5oLC0h50sH6OthLX4a4YnknjvegFhYWYkVsovei8pfNjLZleF5g9U71Z3zwiAd8PJKi35EYHC9+VFkxZzn+rSAq2RsSDhKZ7dDToN8dHtePrz+y58IyRTEU= 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=rjRg8MmV; 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="rjRg8MmV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14ECCC2BCB0; Tue, 12 May 2026 22:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1778625989; bh=SMUx2+NAIUaALUF7jFMmKKri2IWeIDMtw8A52vqEhKc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rjRg8MmVMQX/cuud2vWEUG7rlEBs5/1tlb4i2HZuNoDMhuoP68UCCkK5SV72FL/dV q8WwTI+FgGEGLrsiIUPywyExff7RJ/vq4H1hb4mpcCxTpSRanZE7ZItuDvsFQbYcOk tLSknkZYN/ep5ULvx4wtEMv9fruY0RZEMYQRhB8w= Date: Tue, 12 May 2026 15:46:28 -0700 From: Andrew Morton To: Joonwon Kang Cc: dennis@kernel.org, tj@kernel.org, cl@gentwo.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, dodam@google.com Subject: Re: [PATCH v5 4/4] percpu: Fix hint invariant breakage Message-Id: <20260512154628.a30e8eb1827c80e0529b672e@linux-foundation.org> In-Reply-To: <20260510072149.1279887-4-joonwonkang@google.com> References: <20260510072149.1279887-1-joonwonkang@google.com> <20260510072149.1279887-4-joonwonkang@google.com> X-Mailer: Sylpheed 3.7.0 (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 Sun, 10 May 2026 07:21:49 +0000 Joonwon Kang wrote: > The invariant "scan_hint_start > contig_hint_start if and only if > scan_hint == contig_hint" should be kept for hint management. However, > it could be broken in some cases: > > - if (new contig == contig_hint == scan_hint) && (contig_hint_start < > scan_hint_start < new contig start) && the new contig is to become a > new contig_hint due to its better alignment, then scan_hint should > be invalidated instead of keeping the old value. > > - if (new contig == contig_hint > scan_hint) && (new contig start < > contig_hint_start) && the new contig is not to become a new > contig_hint, then scan_hint should be not updated to the new contig. > > This commit mainly fixes this invariant breakage and includes more: Thanks. AI review asked a single question: https://sashiko.dev/#/patchset/20260510072149.1279887-1-joonwonkang@google.com