On 11/10 18:52:49, Christophe Milard wrote: > Hi, > > My hope was that packet segments would all be smaller than one page > (either normal pages or huge pages)
When is this the case? With a 4096 byte page, a couple 1518 byte Ethernet packets can fit. A 9038 byte Jumbo wont fit. Or is it to ease the memory manager by having a logical array of objects laid out in virtual memory space and depending on the number of objects and the size of each object, a few are bound to span across 2 pages which might not be adjacent in physical memory? Or is it when the view of a packet is a bunch of packet segments which may be of varying sizes and possibly scattered across in memory and the packet needs to go out the wire? Are 2M, 16M, 1G page size used? > to guarantee physical memory > continuity which is needed by some drivers (read non vfio drivers for > PCI). If IOMMU enables IO device the same virtual addressing as the CPU by sharing page tables, would ever a IO device or IOMMU have limitations on the number of pages supported or other performance limitations during the VA->PA translation? Does the IOMMU remap interrupts from the IO device when the vm migrates cores? What happens when no irq remapping, does core get irq and must interprocessorinterrupt core where vm is now running? Are non vfio drivers for PCI needing contiguous physical memory the design target? > Francois Ozog's experience (with dpdk)shows that this hope will fail > in some case: not all platforms support the required huge page size. > And it would be nice to be able to run even in the absence of huge > pages. > > I am therefore planning to expand drvshm to include a flag requesting > contiguous physical memory. But sadly, from user space, this is > nothing we can guarantee... So when this flag is set, the allocator > will allocate untill physical memory "happens to be continuous". > This is a bit like the DPDK approach (try & error), which I dislike, > but there aren't many alternatives from user space. This would be > triggered only in case huge page allocation failed, or if the > requested size exceed the HP size. Are device drivers for the target devices (SoCs, cards) easier to program when there's an IOMMU? If so, is this contiguous physical memory requirement necessary? > Last alternative would be to have a kernel module to do this kind of > allocation, but I guess we don't really want to depend on that... > > Any comment?
