[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH qemu] exec: Destroy dispatch immediately
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC PATCH qemu] exec: Destroy dispatch immediately |
Date: |
Fri, 25 Aug 2017 11:58:12 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 25/08/2017 11:16, Alexey Kardashevskiy wrote:
> On 25/08/17 19:01, Paolo Bonzini wrote:
>> On 25/08/2017 10:31, Alexey Kardashevskiy wrote:
>>> Each address_space_init() updates topology for _every_ address space.
>>
>> And finally, does this patch help with the above?
>>
>> diff --git a/memory.c b/memory.c
>> index c0adc35..97c16cc 100644
>> --- a/memory.c
>> +++ b/memory.c
>> @@ -2607,10 +2607,16 @@ void memory_region_invalidate_mmio_ptr(MemoryRegion
>> *mr, hwaddr offset,
>> RUN_ON_CPU_HOST_PTR(invalidate_data));
>> }
>>
>> +static void address_space_rebuild(AddressSpace *as)
>> +{
>> + MEMORY_LISTENER_CALL(as, begin, Forward);
>> + address_space_update_topology(as);
>> + MEMORY_LISTENER_CALL(as, commit, Forward);
>> +}
>> +
>> void address_space_init(AddressSpace *as, MemoryRegion *root, const char
>> *name)
>> {
>> memory_region_ref(root);
>> - memory_region_transaction_begin();
>> as->ref_count = 1;
>> as->root = root;
>> as->malloced = false;
>> @@ -2622,8 +2628,7 @@ void address_space_init(AddressSpace *as, MemoryRegion
>> *root, const char *name)
>> QTAILQ_INSERT_TAIL(&address_spaces, as, address_spaces_link);
>> as->name = g_strdup(name ? name : "anonymous");
>> address_space_init_dispatch(as);
>> - memory_region_update_pending |= root->enabled;
>> - memory_region_transaction_commit();
>> + address_space_rebuild(as);
>> }
>>
>> static void do_address_space_destroy(AddressSpace *as)
>>
>>
>> Completely untested because vacation is coming.
>
>
> Friday night arrived here already ;)
>
> The patch did not help though (I also had to define section-less
> MEMORY_LISTENER_CALL()). I'll look into your first suggestion on Monday.
Note that this is not a full solution, only for the O(n^2) transaction
commits.
Paolo
- Re: [Qemu-devel] Memory use with >100 virtio devices, (continued)
- Re: [Qemu-devel] Memory use with >100 virtio devices, Alexey Kardashevskiy, 2017/08/21
- Re: [Qemu-devel] Memory use with >100 virtio devices, Alexey Kardashevskiy, 2017/08/24
- Re: [Qemu-devel] Memory use with >100 virtio devices, David Gibson, 2017/08/24
- [Qemu-devel] [RFC PATCH qemu] exec: Destroy dispatch immediately, Alexey Kardashevskiy, 2017/08/25
- Re: [Qemu-devel] [RFC PATCH qemu] exec: Destroy dispatch immediately, Paolo Bonzini, 2017/08/25
- Re: [Qemu-devel] [RFC PATCH qemu] exec: Destroy dispatch immediately, Peter Maydell, 2017/08/25
- Re: [Qemu-devel] [RFC PATCH qemu] exec: Destroy dispatch immediately, Paolo Bonzini, 2017/08/25
- Re: [Qemu-devel] [RFC PATCH qemu] exec: Destroy dispatch immediately, Paolo Bonzini, 2017/08/25
- Re: [Qemu-devel] [RFC PATCH qemu] exec: Destroy dispatch immediately, Paolo Bonzini, 2017/08/25
- Re: [Qemu-devel] [RFC PATCH qemu] exec: Destroy dispatch immediately, Alexey Kardashevskiy, 2017/08/25
- Re: [Qemu-devel] [RFC PATCH qemu] exec: Destroy dispatch immediately,
Paolo Bonzini <=
- Re: [Qemu-devel] Memory use with >100 virtio devices, Paolo Bonzini, 2017/08/25