Skip to content

xen: patch to batch pvh/dom0 mem mapping#181

Merged
alexandermerritt merged 1 commit into
mainfrom
alexm/mmap-batch
May 29, 2026
Merged

xen: patch to batch pvh/dom0 mem mapping#181
alexandermerritt merged 1 commit into
mainfrom
alexm/mmap-batch

Conversation

@alexandermerritt
Copy link
Copy Markdown
Contributor

Addresses some of the latency costs identified in https://github.com/edera-dev/protect/issues/1890

Tested on native dell desktop and was measured to improve performance of zone launches by ~37ms.

bleggett
bleggett previously approved these changes May 20, 2026
Copy link
Copy Markdown
Contributor

@bleggett bleggett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me and makes logical sense but I'm not an MMU expert.

Comment thread patches/0001-xen-xlate_mmu-batch-gfn-mappings.patch Outdated
Comment thread patches/0001-xen-xlate_mmu-batch-gfn-mappings.patch Outdated
Comment thread patches/0001-xen-xlate_mmu-batch-gfn-mappings.patch Outdated
@alexandermerritt
Copy link
Copy Markdown
Contributor Author

I rewrote the patch to another branch, and attempted to simplify it more: https://github.com/edera-dev/linux-upstream/commits/alexm/mmap_batch_v2/

more recent two commits contain the changes, and in them I addressed the above comments

@alexandermerritt
Copy link
Copy Markdown
Contributor Author

alexandermerritt commented May 27, 2026

I rewrote the patch to another branch, and attempted to simplify it more: https://github.com/edera-dev/linux-upstream/commits/alexm/mmap_batch_v2/

more recent two commits contain the changes, and in them I addressed the above comments

Notably, with a more minimal change, reusing xen_for_each_gfn, I am measuring we lost 10ms to launching a zone (88ms vs 78ms with the v1), as that iterates with a callback on each page.

EDIT

Actually, my base latencies went up, so the above statement is not true. With this diff it is still 88ms, so we can arguably keep the smaller patch.

@alexandermerritt
Copy link
Copy Markdown
Contributor Author

Pushed the v2 edits to simplify the patch, and split into two separate ones for easier reading.

@bleggett
Copy link
Copy Markdown
Contributor

Actually, my base latencies went up, so the above statement is not true. With this diff it is still 88ms, so we can arguably keep the smaller patch.

Oh good news, SGTM then!

added to improve performance of PVH dom0 mapping in domU memory,
esp. during zone launches

Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
@alexandermerritt alexandermerritt merged commit 59841be into main May 29, 2026
7 checks passed
@alexandermerritt alexandermerritt deleted the alexm/mmap-batch branch May 29, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants