From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (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 2C9C34266A3 for ; Wed, 6 May 2026 14:21:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778077266; cv=none; b=PXGnGg5TymK1l515W3+chR3QLbdy7D/3BUHWrVw7ESjUxLfQB08COLoMD8DSoLMy+GeM31YOPRWe+17duvJZw0gwCHvOBEQBML6AqnaDkBQe7mC++ESedO9rpGRGQFFrJ1LEHeQPI1HhQrv9xokRJaTAJSBVci0UveyqfV+b93E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778077266; c=relaxed/simple; bh=0WOcIl+gA5kc456/GAyfRQY68VkJdcXYQ35P52J1BPY=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=U/OsU2hzv642r68XUTN6n3vFEd+wGC9IwMwUMox3X0zYFRzLigT2Iu8jfQMXcRizD/tVNGLCag/O+eJStUC0XPOwp3hg9TJxOsstnx14ul7W9xGFAjFH/zHHn/b0VJyVJlmsNiVZtYlB5EsuSBe803TxWZHkbWRlDH8OmlnnnF8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--joonwonkang.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=pff7Lyyz; arc=none smtp.client-ip=209.85.216.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--joonwonkang.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="pff7Lyyz" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-3594620fe97so14789098a91.1 for ; Wed, 06 May 2026 07:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1778077264; x=1778682064; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=q9XrFDn9RlM9E9i0+tEuXQjIVQWHXE0StqNRpBmRS5s=; b=pff7LyyzJmBk3o3C17n5fP3NYHETJ+ZSn2y73ndIs+T/iWAVtO70Lc2pigudh1AA8k +hWBpZuE22onlExddW19bxS+wIT5ksCJZVpeK2QDPriNpQNV1jjYNZY8ZgFPxf3xng3g cC1SEgpP/999RuFUWQ3PsqLZ7wwR9ZaXS35bphSa4j6PX14JCmQYRJApZuOYm2KV6i4o SYwAG5mQMIcAQlwjXUYtXD4X/PAcWTvAYrm6i/FYHj6ExwzE/DWk7ywB0yOc2I37uyr1 7SuMEWt29i7yREztf5q/eIbZsFdHdjGR5Zhlj2TmAu5IoGrJRObfri/dAEfzIl5/CMAp k+4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778077264; x=1778682064; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=q9XrFDn9RlM9E9i0+tEuXQjIVQWHXE0StqNRpBmRS5s=; b=dOsqy9tgJNx/X5BwvUi0eNnVFGVbFTconhWQ1OKdwjMrBi51BsVC+Af3gDJBY9aSBa 8GiSVt4HH9KCI9l664dpyBhueEnl0iWnMmlW5/D8Iwik66P0I7Onwxbj7bzIaeYYbdrJ cMq3i+jnlHfhFIQyNoyujPNCj6hJylVQxAvH+v3+k2dU1THH4G1ECmJd0MXmdKIQggTT +FqxlsNNBW6QNI058AdB50WZYoPMi08YOoISNNaCXdes00E58gzZjOwz1JrtzKFEV3rT RFQWbQJeSgbb447Jd5vrY953Vds4VOMwMysn6QIU/8aaMnljoTlSTsKFImxl/c4h8hVf E50w== X-Forwarded-Encrypted: i=1; AFNElJ/ZKr3jl3t1Vi7F5cO9HGG+p6Tshkiq/809vB5pn/fiaeuAlpQiQR7fju2smGv272D+sxIOauIeGVFB3S4=@vger.kernel.org X-Gm-Message-State: AOJu0Yw8BOlSUdbPR1HRKrOfVnQ9NAbIZ61Z9TxSKTyfuN3fZI+Alf9n R/+FbIm7n+BXmQVBV8Lpjf+49FuIM/VEGDeeZPFScemtgMS1Y/mE5WR1W27d8B0JtRGDShKYEZ9 PBWBF+Xa6iLdD9dfdZl6Me0/L5w== X-Received: from pgbda10.prod.google.com ([2002:a05:6a02:238a:b0:c73:9a1a:387d]) (user=joonwonkang job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a21:6d8b:b0:3a2:c685:f9af with SMTP id adf61e73a8af0-3aa5ac432aemr3760559637.50.1778077264177; Wed, 06 May 2026 07:21:04 -0700 (PDT) Date: Wed, 6 May 2026 14:20:56 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.54.0.545.g6539524ca2-goog Message-ID: <20260506142100.1289509-1-joonwonkang@google.com> Subject: [PATCH v4 1/4] percpu: Fix wrong chunk hints update From: Joonwon Kang To: dennis@kernel.org, tj@kernel.org, cl@gentwo.org Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, dodam@google.com, joonwonkang@google.com Content-Type: text/plain; charset="UTF-8" Chunk end offset was set to a block end offset, which could prevent chunk hints from being updated correctly. It was observed that the chunk free size gets minus or shorter than the actual free size due to this. This commit fixes it. Fixes: 92c14cab4326 ("percpu: convert chunk hints to be based on pcpu_block_md") Signed-off-by: Joonwon Kang Reviewed-by: Dennis Zhou --- v4: Add Fixes tag. v3: Initial version. mm/percpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/percpu.c b/mm/percpu.c index 81462ce5866e..3ecd86096641 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -1054,7 +1054,7 @@ static void pcpu_block_update_hint_free(struct pcpu_chunk *chunk, int bit_off, else pcpu_block_update(&chunk->chunk_md, pcpu_block_off_to_off(s_index, start), - end); + pcpu_block_off_to_off(e_index, end)); } /** -- 2.54.0.545.g6539524ca2-goog