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

Re: [Xen-devel] [PATCH] xen-swiotlb: exchange memory with Xen only when pages are contiguous



> -----Original Message-----
> From: Xen-devel [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf
> Of Joe Jin
> Sent: 30 October 2018 02:52
> To: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>; Konrad Rzeszutek Wilk
> <konrad.wilk@xxxxxxxxxx>
> Cc: John Sobecki <john.sobecki@xxxxxxxxxx>; DONGLI.ZHANG
> <dongli.zhang@xxxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx" <linux-
> kernel@xxxxxxxxxxxxxxx>; konrad@xxxxxxxxxx; xen-
> devel@xxxxxxxxxxxxxxxxxxxx; Christoph Helwig <hch@xxxxxx>
> Subject: Re: [Xen-devel] [PATCH] xen-swiotlb: exchange memory with Xen
> only when pages are contiguous
> 
> On 10/25/18 11:56 AM, Joe Jin wrote:
> > I just discussed this patch with Boris in private, his opinions(Boris,
> > please correct me if any misunderstood) are:
> >
> > 1. With/without the check, both are incorrect, he thought we need to
> >    prevented unalloc'd free at here.
> > 2. On freeing, if upper layer already checked the memory was DMA-able,
> >    the checking at here does not make sense, we can remove all checks.
> > 3. xen_create_contiguous_region() and xen_destroy_contiguous_region()
> >    to come in pairs.
> I tried to added radix_tree to track allocating/freeing and I found some
> memory only allocated but was not freed, I guess it caused by driver used
> dma_pool, that means if lots of such requests, the list will consume lot
> of memory for it. Will continue to work on it, if anyone have good idea
> for it please let me know, I'd like to try it.
> 

FWIW, in my Xen PV-IOMMU test patches, I have also tried keeping a list of 
ranges mapped for DMA and have discovered apparent issues with some drivers, 
particularly tg3, that seem to free mappings that have not been allocated (or 
possibly double-free). I've never fully tracked down the issue.

  Paul

> Thanks,
> Joe
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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