Skip to content
Snippets Groups Projects
Commit 544cff46 authored by hongmianquan's avatar hongmianquan Committed by David Hildenbrand
Browse files

memory: avoid updating ioeventfds for some address_space


When updating ioeventfds, we need to iterate all address spaces,
but some address spaces do not register eventfd_add|del call when
memory_listener_register() and they do nothing when updating ioeventfds.
So we can skip these AS in address_space_update_ioeventfds().

The overhead of memory_region_transaction_commit() can be significantly
reduced. For example, a VM with 8 vhost net devices and each one has
64 vectors, can reduce the time spent on memory_region_transaction_commit by 20%.

Message-ID: <20230830032906.12488-1-hongmianquan@bytedance.com>
Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
Signed-off-by: default avatarhongmianquan <hongmianquan@bytedance.com>
Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
parent 41ddcd23
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment