Skip to content
  • Paolo Bonzini's avatar
    9a54635d
    memory: add a per-AddressSpace list of listeners · 9a54635d
    Paolo Bonzini authored
    
    
    This speeds up MEMORY_LISTENER_CALL noticeably.  Right now,
    with many PCI devices you have N regions added to M AddressSpaces
    (M = # PCI devices with bus-master enabled) and each call looks
    up the whole listener list, with at least M listeners in it.
    Because most of the regions in N are BARs, which are also roughly
    proportional to M, the whole thing is O(M^3).  This changes it
    to O(M^2), which is the best we can do without rewriting the
    whole thing.
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    9a54635d
    memory: add a per-AddressSpace list of listeners
    Paolo Bonzini authored
    
    
    This speeds up MEMORY_LISTENER_CALL noticeably.  Right now,
    with many PCI devices you have N regions added to M AddressSpaces
    (M = # PCI devices with bus-master enabled) and each call looks
    up the whole listener list, with at least M listeners in it.
    Because most of the regions in N are BARs, which are also roughly
    proportional to M, the whole thing is O(M^3).  This changes it
    to O(M^2), which is the best we can do without rewriting the
    whole thing.
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading