[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispa
From: |
Alexey Kardashevskiy |
Subject: |
Re: [Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispatch trees between address spaces |
Date: |
Mon, 11 Sep 2017 19:06:10 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 11/09/17 17:40, Paolo Bonzini wrote:
> On 07/09/2017 11:20, Alexey Kardashevskiy wrote:
>>
>> /* Accessed via RCU. */
>> struct FlatView *current_map;
>>
>> int ioeventfd_nb;
>> struct MemoryRegionIoeventfd *ioeventfds;
>> - struct AddressSpaceDispatch *dispatch;
>> - struct AddressSpaceDispatch *next_dispatch;
>> +
>
> The rough idea of the patch matches my suggestion indeed. However, I am
> not sure why all of the changes in patch 2 are needed.
For this:
struct MemoryRegionSection {
MemoryRegion *mr;
- AddressSpace *address_space;
+ AddressSpaceDispatch *dispatch;
as there are many ASes attached to the same flatview/dispatch.
And because of that, there is also:
struct IOMMUTLBEntry {
- AddressSpace *target_as;
+ AddressSpaceDispatch *target_dispatch;
as the "section" in address_space_get_iotlb_entry() does not have
address_space any more, even though the only user of it -
vhost_device_iotlb_miss() - only checks if (iotlb.target_dispatch != NULL).
> Once you have built the FlatView and the dispatch within it, you can
> still cache its dispatch tree in as->dispatch, and free it with RCU from
> flatview_destroy. This removes the need to use call_rcu from
> flatview_unref.
Ok, I will do that.
> In addition, you could change the computation of FlatView's root to
> resolve 2^64-sized aliases;
Here we reached the boundary of my english :)
Roots are given when AS/Flatview is created, and aliases are resolved already.
> also set it to NULL if the AddressSpace's
> root is disabled or the alias it resolves to is disabled (and so on
> recursively until a non-alias is found). This should remove the need
> for address_space_root() and the change to pci_init_bus_master.
--
Alexey
- [Qemu-devel] [RFC PATCH qemu 4/4] memory: Add flat views to HMP "info mtree", (continued)
[Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispatch trees between address spaces, Alexey Kardashevskiy, 2017/09/07
- Re: [Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispatch trees between address spaces, Philippe Mathieu-Daudé, 2017/09/07
- Re: [Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispatch trees between address spaces, Paolo Bonzini, 2017/09/11
- Re: [Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispatch trees between address spaces,
Alexey Kardashevskiy <=
- Re: [Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispatch trees between address spaces, Paolo Bonzini, 2017/09/11
- Re: [Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispatch trees between address spaces, Alexey Kardashevskiy, 2017/09/11
- Re: [Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispatch trees between address spaces, Paolo Bonzini, 2017/09/11
- Re: [Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispatch trees between address spaces, Alexey Kardashevskiy, 2017/09/12
- Re: [Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispatch trees between address spaces, Paolo Bonzini, 2017/09/12
- Re: [Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispatch trees between address spaces, Alexey Kardashevskiy, 2017/09/12
[Qemu-devel] [RFC PATCH qemu 2/4] memory: Prepare for shared flat views, Alexey Kardashevskiy, 2017/09/07
Re: [Qemu-devel] [RFC PATCH qemu 0/4] memory: Reduce memory use, Dr. David Alan Gilbert, 2017/09/07