Linux-HyperV List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Naman Jain" <namjain@linux.microsoft.com>
Cc: linux-hyperv@vger.kernel.org
Subject: Re: [PATCH v3 4/5] x86/hyperv: Filter TLB targets before building hypercalls
Date: Tue, 01 Dec 2026 04:44:43 +0000	[thread overview]
Message-ID: <sashiko-outbox-242536@kernel.org> (raw)
In-Reply-To: <20261201043642.1054258-5-namjain@linux.microsoft.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] x86/hyperv: missing Fixes tag for commit 209954cbc7d0
--

commit ffd1be8a9bff8ab7dcfc38d55cedf5571c8c7235
Author: Naman Jain <namjain@linux.microsoft.com>

> x86/hyperv: Filter TLB targets before building hypercalls
>
> SuperBench's eight-GPU PyTorch LSTM training on Azure MI300X VMs
> regressed between Linux 6.8 and 7.0. Recreating DataLoader workers each
> epoch caused host-to-GPU copy stalls and timeouts. Bisection identified
> commit 209954cbc7d0 ("x86/mm/tlb: Update mm_cpumask lazily") as the cause
> of the regression.
>
> That change leaves a CPU's bit set in mm_cpumask() even after the CPU
> switches to another mm. Native flush callbacks remove these stale bits,
> but successfully taking the Hyper-V hypercall path does not run those
> callbacks. A CPU running another mm need not be in lazy TLB mode, so the
> existing lazy-TLB check does not exclude it. If the mask includes all
> present CPUs, hyperv_flush_tlb_multi() selects HV_FLUSH_ALL_PROCESSORS
> before checking individual CPUs.
>
> Use should_flush_tlb() to build a per-CPU target mask before selecting
> HV_FLUSH_ALL_PROCESSORS or either hypercall format. Keep the full mask
> when freeing page tables, since should_flush_tlb() excludes lazy CPUs
> that still need invalidation in that case. Retain the empty basic-mask
> check because filtering can leave no targets.
>
> This patch does not affect when trimming is requested.
>
> Signed-off-by: Naman Jain <namjain@linux.microsoft.com>

[Severity: Low]
Since this fixes a regression caused by lazy mm_cpumask updates, should the
commit message include:

  Fixes: 209954cbc7d0 ("x86/mm/tlb: Update mm_cpumask lazily")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261201043642.1054258-1-namjain@linux.microsoft.com?part=4

  reply	other threads:[~2026-12-01  4:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  4:36 [PATCH v3 0/5] x86/hyperv: Account for lazy mm_cpumask maintenance Naman Jain
2026-12-01  4:36 ` [PATCH v3 1/5] x86/hyperv: Reject unrepresentable TLB flush VP sets Naman Jain
2026-12-01  4:36 ` [PATCH v3 2/5] x86/tlb: Make should_flush_tlb() available to Hyper-V Naman Jain
2026-12-01  4:36 ` [PATCH v3 3/5] x86/hyperv: Use native flushes for mask trimming and ASID transitions Naman Jain
2026-12-01  4:36 ` [PATCH v3 4/5] x86/hyperv: Filter TLB targets before building hypercalls Naman Jain
2026-12-01  4:44   ` sashiko-bot [this message]
2026-12-01  4:36 ` [PATCH v3 5/5] x86/hyperv: Request mask cleanup when no remote target remains Naman Jain
2026-12-01  4:53   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-242536@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=namjain@linux.microsoft.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox