[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5 1/4] xen: introduce a helper to allocate non-contiguous memory

>>> On 11.05.15 at 14:11, <roger.pau@xxxxxxxxxx> wrote:
> El 11/05/15 a les 12.41, Jan Beulich ha escrit:
>>>>> On 11.05.15 at 11:52, <roger.pau@xxxxxxxxxx> wrote:
>>> El 11/05/15 a les 9.42, Jan Beulich ha escrit:
>>>>>>> On 08.05.15 at 16:34, <roger.pau@xxxxxxxxxx> wrote:
>>>> There actually is another problem here: You must not free the
>>>> pages before having torn down the mapping. An option (to
>>>> avoid the need for a memory allocation) might be to zap the
>>>> present bits (or whatever their equivalent on ARM) in a first
>>>> pass (making sure to flush TLBs), free, and then vunmap().
>>> The aim of this is to catch reads/writes to those mappings while we are
>>> tearing them down?
>> No, that wouldn't be worth it. The aim is to avoid cache attribute
>> conflicts between the to be torn down mapping and possible
>> immediate re-uses of the pages elsewhere.
> After looking into this I think that this approach is complex to
> implement on ARM. OTOH I've realized we could fetch all pages before
> vunmap and add them to a temporary linked list (using pg->list) unless
> there's a chance this page might be already member of a list. Then
> vunmap and finally free all the pages. Does this sound sensible?

Yes, of course - very good thought!


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.