On 09.10.23 14:30, Jonathan Cameron wrote:
On Sun, 8 Oct 2023 01:47:40 +0530
<ank...@nvidia.com> wrote:

From: Ankit Agrawal <ank...@nvidia.com>

NVIDIA GPU's support MIG (Mult-Instance GPUs) feature [1], which allows
partitioning of the GPU device resources (including device memory) into
several (upto 8) isolated instances. Each of the partitioned memory needs
a dedicated NUMA node to operate. The partitions are not fixed and they
can be created/deleted at runtime.

Unfortunately Linux OS does not provide a means to dynamically create/destroy
NUMA nodes and such feature implementation is not expected to be trivial. The
nodes that OS discovers at the boot time while parsing SRAT remains fixed. So
we utilize the GI Affinity structures that allows association between nodes
and devices. Multiple GI structures per BDF is possible, allowing creation of
multiple nodes by exposing unique PXM in each of these structures.

Introducing a new nvidia-acpi-generic-initiator object, which inherits from
the generic acpi-generic-initiator object to allow a BDF to be associated with
more than 1 nodes.

An admin can provide the range of nodes using numa-node-start and
numa-node-count and link it to a device by providing its id. The following
sample creates 8 nodes and link them to the device dev0:

         -numa node,nodeid=2 \
         -numa node,nodeid=3 \
         -numa node,nodeid=4 \
         -numa node,nodeid=5 \
         -numa node,nodeid=6 \
         -numa node,nodeid=7 \
         -numa node,nodeid=8 \
         -numa node,nodeid=9 \
         -device 
vfio-pci-nohotplug,host=0009:01:00.0,bus=pcie.0,addr=04.0,rombar=0,id=dev0 \
         -object 
nvidia-acpi-generic-initiator,id=gi0,device=dev0,numa-node-start=2,numa-node-count=8
 \

If you go this way, use an array of references to the numa nodes instead of a 
start and number.
There is no obvious reason why they should be contiguous that I can see.

Right, a uint16List should do.


--
Cheers,

David / dhildenb


Reply via email to