Page MenuHomeFreeBSD

libvmmapi: Add support for setting up and configuring guest NUMA domains
Needs ReviewPublic

Authored by bnovkov on Mar 30 2024, 4:33 PM.
Tags
None
Referenced Files
F96329311: D44566.id138715.diff
Tue, Sep 24, 3:15 PM
Unknown Object (File)
Mon, Sep 23, 10:34 PM
Unknown Object (File)
Sun, Sep 22, 4:44 PM
Unknown Object (File)
Sun, Sep 22, 12:02 PM
Unknown Object (File)
Sat, Sep 21, 3:10 PM
Unknown Object (File)
Sat, Sep 21, 9:48 AM
Unknown Object (File)
Fri, Sep 20, 4:09 PM
Unknown Object (File)
Thu, Sep 19, 11:16 AM
Subscribers

Details

Reviewers
jhb
corvink
markj
Group Reviewers
bhyve
Summary

This patch reworks libvmmapi to provide support for emulating NUMA domains in guests.

More specifically, it reworks vm_setup_memory to setup system memory segments for each guest NUMA domain, adds per-domain CPU affinity tracking to struct vm_ctx, and adds two new routines for fetching and setting a domain's CPU set.

An emulated NUMA domain is described by a struct vmdom in vmmapi.h. Aside from its size in bytes, each domain can be configured to use a specific domainset(9) policy and domain mask.
vm_setup_memory now takes two additional arguments - an array of struct vmdoms and the array's size. It then proceeds to set up a memory segment for each specified domain using the existing memory mapping scheme. If no domain info is passed, the memory setup falls back to the original, non-NUMA behaviour.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

bnovkov retitled this revision from libvmmapi: Add interfaces for setting and getting VM NUMA configuration to libvmmapi: Add support for setting up and configuring guest NUMA domains.
bnovkov edited the summary of this revision. (Show Details)

Update patch and summary.

bnovkov edited the summary of this revision. (Show Details)

Update patch with support for handling arbitrary domainset(9) policies.

Fix an issue when mapping segments larger than VM_LOWMEM_LIMIT.