[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V2] memory: flat section iterator
From: |
Steven Sistare |
Subject: |
Re: [PATCH V2] memory: flat section iterator |
Date: |
Wed, 8 Feb 2023 12:54:26 -0500 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 |
On 2/7/2023 4:47 PM, Peter Xu wrote:
> On Tue, Feb 07, 2023 at 04:28:49PM -0500, Steven Sistare wrote:
>> On 2/7/2023 3:10 PM, Peter Xu wrote:
>>> On Tue, Feb 07, 2023 at 11:03:29AM -0800, Steve Sistare wrote:
>>>> Add an iterator over the sections of a flattened address space.
>>>> This will be needed by cpr to issue vfio ioctl's on the same memory
>>>> ranges that are already programmed.
>>>
>>> Should this better be proposed with the context of using it? Or I don't
>>> know how to justify this new interface is needed.
>>>
>>> For example, any explanations on why memory region listeners cannot work?
>>
>> For context, the new interfaces is used in the patch
>> "vfio-pci: recover from unmap-all-vaddr failure"
>> in the original live update series:
>>
>> https://lore.kernel.org/qemu-devel/1658851843-236870-1-git-send-email-steven.sistare@oracle.com/
>>
>> More succinctly, the memory region listeners already ran, and the vfio
>> callbacks created vfio memory regions. Now we want to perform live update,
>> and are in steady state, so no listeners are being called. We need the
>> flat section iterator to reproduce the same addresses and extents that were
>> produced by the listeners, to make a state change on each distinct vfio
>> memory region.
>
> Okay it makes sense, thanks.
>
> I think it'll be the same as one memory_listener_register() followed by an
> unregister with region_add() hooked only, but maybe we should avoid
> fiddling with the global list of listeners when possible.
Indeed it is the same, thanks for the suggestion. And this occurs infrequently,
so modifying the listener list has no impact.
I withdraw this patch request. Thank you all for reviewing it.
- Steve
> If you plan to keep posting it separately, would you add some information
> into the commit message? With that enhanced, please feel free to add:
>
> Acked-by: Peter Xu <peterx@redhat.com>
>