[dpdk-dev] [PATCH v4 00/10] VM Power Management
I had replied to this message, but my reply never got to the list. Let's try again. I wonder if this might be papering over a bug in the host cpufreq driver. If the guest is not doing much and leaving a lot of idle CPU time, the host should scale down the frequency of that CPU. In the case of pinned VCPUs this should really "just work". What is the problem that is being solved? Paolo On 22/11/2014 18:17, Vincent JARDIN wrote: > Tim, > > cc-ing Paolo and qemu-devel@ again in order to get their take on it. > Did you make any progress in Qemu/KVM community? We need to be sync'ed up with them to be sure we share the same goal. I want also to avoid using a solution which doesn't fit with their plan. Remember that we already had this problem with ivshmem which was planned to be dropped. > >>> Unfortunately, I have not yet received any feedback: >>> http://lists.nongnu.org/archive/html/qemu-devel/2014-11/msg01103.html >> >> Just to add to what Alan said above, this capability does not exist in >> qemu at the moment, and based on there having been no feedback on the >> qemu mailing list so far, I think it's reasonable to assume that it >> will not be implemented in the immediate future. The VM Power >> Management feature has also been designed to allow easy migration to a >> qemu-based solution when this is supported in future. Therefore, I'd >> be in favour of accepting this feature into DPDK now. >> >> It's true that the implementation is a work-around, but there have >> been similar cases in DPDK in the past. One recent example that comes >> to mind is userspace vhost. The original implementation could also be >> considered a work-around, but it met the needs of many in the >> community. Now, with support for vhost-user in qemu 2.1, that >> implementation is being improved. I'd see VM Power Management >> following a similar path when this capability is supported in qemu. > > Best regards, > Vincent >
[dpdk-dev] [PATCH v4 00/10] VM Power Management
On 12/12/2014 14:00, Carew, Alan wrote: > The problem is deterministic control of host CPU frequency and the DPDK usage > model. > A hands-off power governor will scale based on workload, whether this is a > host > application or VM, so no problems or bug there. > > Where this solution fits is where an application wants to control its own > power policy, for example l3fwd_power uses librte_power library to change > frequency via apci_cpufreq based on application heuristics rather than > relying on an inbuilt policy for example ondemand or performance. > > This ability has existed in DPDK for host usage for some time and VM power > management allows this use case to be extended to cater for virtual machines > by re-using the librte_power interface to encapsulate the VM->Host > comms and provide an example means of managing such communications. > > I hope this clears it up a bit. Ok, this looks specific enough that an out-of-band solution within DPDK sounds like the best approach. It seems unnecessary to involve the hypervisor (neither KVM nor QEMU). Paolo
[dpdk-dev] [PATCH v4 00/10] VM Power Management
On 12/12/2014 17:10, Thomas Monjalon wrote: > > Ok, this looks specific enough that an out-of-band solution within DPDK > > sounds like the best approach. It seems unnecessary to involve the > > hypervisor (neither KVM nor QEMU). > > Paolo, I don't understand why you don't imagine controlling frequency scaling > of a pinned vCPU transparently? Probably because I don't imagine controlling frequency scaling from the application on bare metal, either. :) It seems to me that this is just working around limitations of the kernel. Paolo > In my understanding, we currently cannot control frequency scaling without > knowing wether we are in a VM or not.
Re: [dpdk-dev] [PATCH v5 0/4] Vhost: fix mq=on but VIRTIO_NET_F_MQ not negotiated
On 13/12/2017 09:51, Maxime Coquelin wrote: > This series fixes this by destroying all but first queue pair in > the backend if VIRTIO_NET_F_MQ isn't negotiated. First patches > makes sure that VHOST_USER_SET_FEATURES request doesn't change > Virtio features while the device is running, which should never > happen as per the Virtio spec. This helps to make sure vitqueues > aren't destroyed while being processed, but also protect from > other illegal features changes (e.g. VIRTIO_NET_F_MRG_RXBUF). Hi Maxime, I think this series is wrong from the virtio spec's point of view. If the driver requests VIRTIO_NET_F_MQ, that does not mean "the driver knows about multiqueue", it only means that "the driver wants to read max_virtqueue_pairs" from configuration space. Just like it's perfectly fine for a device to propose VIRTIO_NET_F_MQ and set max_virtqueue_pairs=1, a driver can negotiate VIRTIO_NET_F_MQ and then skip initialization of some virtqueues. In fact, for virtio-net there is an explicit way to say how many virtqueue pairs are available; the virtio spec's section 5.1.5 (Network device, Device Initialization) mentions that Even with VIRTIO_NET_F_MQ, only receiveq1, transmitq1 and controlq are used by default. The driver would send the VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command specifying the number of the transmit and receive queues to use. Thanks, Paolo
Re: [dpdk-dev] [PATCH v5 0/4] Vhost: fix mq=on but VIRTIO_NET_F_MQ not negotiated
On 13/12/2017 11:11, Maxime Coquelin wrote: >> Hi Maxime, >> >> I think this series is wrong from the virtio spec's point of view. If >> the driver requests VIRTIO_NET_F_MQ, that does not mean "the driver >> knows about multiqueue", it only means that "the driver wants to read >> max_virtqueue_pairs" from configuration space. > > Actually, my series fixes half of the problem, the case where driver > does not know about multiqueue. > > In this case, there is no point in the backend to wait for the > initialization of queues that does not exist. > > So I think my series is not enough, but not wrong. You're right; what I meant by "wrong" is that it becomes unnecessary if you do VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET. But since this requires a vhost-user update, doing both makes sense. Thanks! Paolo