Skip to content

Allow configuring and pinning of iothreads #28

@praveen-pk

Description

@praveen-pk

Cloud-hypervisor creates IO threads based on an input device id after cloud-hypervisor/cloud-hypervisor#2163.

cloud-hypervisor  --kernel hypervisor-fw --disk path=bionic-server-cloudimg-amd64.raw path=cloud-config.raw --cpus boot=2 --memory size=1024M  --console off  --seccomp false   --serial tty  --net "tap=ich0,mac=00:11:22:33:44:55,ip=,mask=,num_queues=4" --rng

$ pstree -p -c -l -t $(pidof cloud-hypervisor)
cloud-hyperviso(33146)─┬─{_disk0_q0}(33185)
                       ├─{_disk1_q0}(33188)
                       ├─{_net2_ctrl}(33189)
                       ├─{_net2_qp0}(33190)
                       ├─{_net2_qp1}(33191)
                       ├─{_rng}(33197)
                       ├─{http-server}(33148)
                       ├─{signal_handler}(33158)
                       ├─{vcpu0}(33156)
                       ├─{vcpu1}(33157)
                       └─{vmm}(33147)

## By passing id to network configuration, network thread will now be renamed based on input id.

$ pstree -p -c -l -t $(pidof cloud-hypervisor)
cloud-hyperviso(33334)─┬─{_disk0_q0}(33375)
                       ├─{_disk1_q0}(33381)
                       ├─{_rng}(33389)
                       ├─{http-server}(33336)
                       ├─{signal_handler}(33346)
                       ├─{vcpu0}(33344)
                       ├─{vcpu1}(33345)
                       ├─{vmm}(33335)
                       ├─{vnet_ctrl}(33376)
                       ├─{vnet_qp0}(33377)
                       └─{vnet_qp1}(33378)

This issue will track mapping IO threads from input domain XML like

<domain>
  ...
  <iothreads>4</iothreads>
  <iothreadids>
    <iothread id="2"/>
    <iothread id="4"/>
    <iothread id="6"/>
    <iothread id="8"/>
  </iothreadids>
  <iothreadpin iothread="1" cpuset="5,6"/>
  <iothreadpin iothread="2" cpuset="7,8"/>
  <iothread_period>1000000</iothread_period>
  <iothread_quota>-1</iothread_quota>
  ...
</domain>

to the IO threads created by Cloud-hypervisor based on input arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions