> -----Original Message-----
> From: Xen-devel [mailto:xen-devel-boun...@lists.xenproject.org] On Behalf
> Of Joe Jin
> Sent: 30 October 2018 02:52
> To: Boris Ostrovsky <boris.ostrov...@oracle.com>; Konrad Rzeszutek Wilk
> <konrad.w...@oracle.com>
> Cc: John Sobecki <john.sobe...@oracle.com>; DONGLI.ZHANG
> <dongli.zh...@oracle.com>; linux-ker...@vger.kernel.org" <linux-
> ker...@vger.kernel.org>; kon...@kernel.org; xen-
> de...@lists.xenproject.org; Christoph Helwig <h...@lst.de>
> 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@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to