Skip to content

[release/11.0-rc1] Fix transition from monomorphic to polymorphic VSD - #132622

Merged
akoeplinger merged 1 commit into
release/11.0-rc1from
backport/pr-132544-to-release/11.0-rc1
Aug 21, 2026
Merged

[release/11.0-rc1] Fix transition from monomorphic to polymorphic VSD#132622
akoeplinger merged 1 commit into
release/11.0-rc1from
backport/pr-132544-to-release/11.0-rc1

Conversation

@github-actions

@github-actionsgithub-actionsBot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Backport of #132544 to release/11.0-rc1

/cc @AndyAyersMS

Customer Impact

  • Customer reported
  • Found internally

Perf issue on arm64 on many core machines.

Regression

  • Yes
  • No

Arm64 VSD implementation has diverged from x64 for a long time, and was able to get trapped in a continually mispredicting mode. The shared misprediction counter writes were causing a high amount of cache coherence overhead, seriously limiting scaling.

Testing

Verified with user app on 32 core Arm64 HW.

Risk

Low. Arm64 (and other arches) now use exact same logic as x64.

An interface call site initially uses a dispatch stub specialized for
one receiver type. After enough misses, the site should be backpatched
to a resolve stub to handle polymorphic receivers.
On ARM, ARM64, LoongArch64, and RISC-V64, the expired-counter path set
`SDF_ResolveBackPatch` but then probed the inline resolve cache. A cache
hit there branched directly to the target without processing the flag,
leaving the site monomorphic and causing subsequent receiver-type misses
to continue through the dispatch stub.
Enter the slow resolve path after setting `SDF_ResolveBackPatch` so the
call site is backpatched as intended. Also correct the inverted
miss-counter handling on LoongArch64 and RISC-V64. This matches the
existing x64 behavior.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6bd43e03-841f-47ee-80f4-4da985b32a67
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke
See info in area-owners.md if you want to be subscribed.

@AndyAyersMS

Copy link
Copy Markdown
Member

@jkotas PTAL

@dotnet-milestone-botdotnet-milestone-botBot added this to the 11.0-rc1 milestone Aug 21, 2026
@akoeplingerakoeplinger added the Servicing-approved Approved for servicing release label Aug 21, 2026
@akoeplinger
akoeplinger merged commit 0d49690 into release/11.0-rc1Aug 21, 2026
111 of 113 checks passed
@akoeplinger
akoeplinger deleted the backport/pr-132544-to-release/11.0-rc1 branch August 21, 2026 21:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-coreclrServicing-approvedApproved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@AndyAyersMS@jkotas@akoeplinger