On 09/21/2017 12:13 AM, Antti Kantee wrote: > On 20/09/17 19:07, Jakub Jermář wrote: >> Btw, is there a bug in the Linux implementation as there is currently >> nothing to prevent Linux from paging such buffers out and in again to a >> different physical address? > > The call to mlockall() is meant to prevent that; yes, it's a very big > hammer, but then again the implementation is not meant to be optimal, > only [reasonably] correct.
Ah, right, there is a mlockall() in rumpcomp_pci_dmalloc(). So if get this right, the Linux implementation relies on rumpcomp_pci_dmalloc() being called prior to calling rumpcomp_pci_virt_to_mach() on rumpuser_malloc()'ed memory. Hopefully this holds for all drivers :-) Jakub
