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 A3BFF214A9B for ; Sun, 10 May 2026 07:21:54 +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=1778397715; cv=none; b=QbPbKs2jGPZb6h0gEriPUvf6FqFskUE5vGZkAQa3Ly9lo4jVvZfS6CEaGwsuvn3jDoG9mrRkeEpPurdThRpUwre52GmLuppweuHpL13dvu/SY3tZSlQ5QxRCoqfPUjQdSAa995ifQXL3UAdSs07uXq17TsQjBr7Tfyc823GBt0I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778397715; c=relaxed/simple; bh=yXgYoPyqpCypUsQZmTs7HcQRYQTS9uLm/XyXJff+kSs=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=bJiWHBGRiJkj3GmI2lNnS/Eb0qeAnFJHeupyvUWF2qH9rEUHkIFPcSzIYZu1nkb9hu1Ssj2dOf63bC64FgGfpiw5EIy+Rtic78QMGW9gWm/7AtJ6JAa7oidwmk78LLdTUYVamRMdf2XGxykJr/InIkgXzq0T6CAGSaOS7kKuprk= 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=COM6iKJ2; 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="COM6iKJ2" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-365faf6006dso3843641a91.1 for ; Sun, 10 May 2026 00:21:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1778397714; x=1779002514; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=if2R4DTpWcRo19/tCAWfphYb8a6St3McgVsuZtgi38M=; b=COM6iKJ22kBCQu/yJwwtiTtCdoiclKsT0I/qemBxnTcw8SzF0vWBh7Kunzkuuvsurl 6t0psGaT0gwp2+xBeONGg580M/n3Aw5bQtqlKyuul2SvDVMyNfm3/yRZSJoRe6fLCPAa qFiVIxaIGA7/aQKXV17rBo2B6rsaupHrXDX2UQ8fX0nq39F4vbIMd7RwphA5RWHsCNgc KjHNzkCAIdIivXAx8W897TDsQrIS+Hi0C8QUsfuVeZlsG6pXfElbBCZtD/13iVMUWOel EoaFN6IB5oTqB3dO0gnYZmtwfgw0nz34lEB9F+VVN5P5fuCWK6+tJOr4yat08pkEDGYV cM+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778397714; x=1779002514; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=if2R4DTpWcRo19/tCAWfphYb8a6St3McgVsuZtgi38M=; b=Wez+nMT0q/cKzojRCnxJNLvaj+yK8bLD5IE2B3ABSfaKjBBwR5lN5tF5JLiCn3ZVRr HObpaptAxt/SIHugunmP1c/pe3Qo1/B6+JsAIvU8+x5VtjsY5WGmDZkBLdijvOjfT/tJ tXW5Mfxb4jEaNUlIen4imtLBm9rkX6VHs601c5YJhMJ+uWS4be6Cs+MXWxDK0z7nOVud GvffY1tRSPy3iVjlNMJyy4CmzKWwdJ6PIIhPiwCCtl3ilZViSVXSVhKf1rtlPxXRwB6Z JGlw0iONBu5oX7GmiVIqoH8+7h7esPR1HrDNaBvoZcHOLWzKbO4ct3Ff+x6YyF574QZN ftpg== X-Forwarded-Encrypted: i=1; AFNElJ9onXlLcllUu6W9sRHXKd1y4r6hExCkKnD53cG5nyNWjFEb74RoK1eE592hgpwKkdDC3DLvxnjDQU3xCSI=@vger.kernel.org X-Gm-Message-State: AOJu0YyNa5jeGcN8CbK/qxwiBMeNjTgS1NLLknHoYpMAe0vzrs/PO3Rk Q6iWrK2vpFrMh+PHR4OAo5EPfVm2r2GJgYanWDQtbXk+66uKrXVyyG974qSh+dUVxxx3FOXYEo1 aN1blK2OomX3M28pToBgYwHA04w== X-Received: from pggr5.prod.google.com ([2002:a63:d905:0:b0:c82:283f:132f]) (user=joonwonkang job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90a:d004:b0:364:edd2:812 with SMTP id 98e67ed59e1d1-365ac7a440fmr20885008a91.25.1778397713827; Sun, 10 May 2026 00:21:53 -0700 (PDT) Date: Sun, 10 May 2026 07:21:46 +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.563.g4f69b47b94-goog Message-ID: <20260510072149.1279887-1-joonwonkang@google.com> Subject: [PATCH v5 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 --- v5: No change. 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.563.g4f69b47b94-goog