Re: [PATCH] xen/swiotlb: correct the check for xen_destroy_contiguous_region

2020-04-28 Thread Joe Jin
On 4/28/20 10:25 AM, Konrad Rzeszutek Wilk wrote: > On Tue, Apr 28, 2020 at 12:19:41PM +0200, Jürgen Groß wrote: >> On 28.04.20 10:25, Peng Fan wrote: > > Adding Joe Jin. > > Joe, didn't you have some ideas on how this could be implemented? > >>>> Subje

Re: [PATCH 1/1] swiotlb: save io_tlb_used to local variable before leaving critical section

2019-04-12 Thread Joe Jin
kon Bugge > Signed-off-by: Dongli Zhang Reviewed-by: Joe Jin Thanks, Joe ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 1/2] swiotlb: add debugfs to track swiotlb buffer usage

2018-12-10 Thread Joe Jin
On 12/10/18 12:00 PM, Tim Chen wrote: >> @@ -528,6 +538,9 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, >> dev_warn(hwdev, "swiotlb buffer is full (sz: %zd bytes)\n", >> size); >> return SWIOTLB_MAP_ERROR; >> found: >> +#ifdef CONFIG_DEBUG_FS >> +io_tlb_used

Re: [PATCH v2 1/2] swiotlb: add debugfs to track swiotlb buffer usage

2018-12-10 Thread Joe Jin
er usage via debugfs would help the user estimate the size of > swiotlb buffer to pre-allocate or analyze device driver memory leak issue. > > Signed-off-by: Dongli Zhang Reviewed-by: Joe Jin > --- > Changed since v1: > * init debugfs with late_initcall (suggested by Robi

Re: [PATCH v2 2/2] swiotlb: checking whether swiotlb buffer is full with io_tlb_used

2018-12-10 Thread Joe Jin
On 12/9/18 4:37 PM, Dongli Zhang wrote: > This patch uses io_tlb_used to help check whether swiotlb buffer is full. > io_tlb_used is no longer used for only debugfs. It is also used to help > optimize swiotlb_tbl_map_single(). > > Suggested-by: Joe Jin > Signed-off-by: Dongl

Re: [PATCH RFC 1/1] swiotlb: add debugfs to track swiotlb buffer usage

2018-12-06 Thread Joe Jin
On 12/6/18 9:49 PM, Dongli Zhang wrote: > > > On 12/07/2018 12:12 AM, Joe Jin wrote: >> Hi Dongli, >> >> Maybe move d_swiotlb_usage declare into swiotlb_create_debugfs(): > > I assume the call of swiotlb_tbl_map_single() might be frequent in some > s

Re: [PATCH RFC 1/1] swiotlb: add debugfs to track swiotlb buffer usage

2018-12-06 Thread Joe Jin
Hi Dongli, Maybe move d_swiotlb_usage declare into swiotlb_create_debugfs(): void swiotlb_create_debugfs(void) { #ifdef CONFIG_DEBUG_FS static struct dentry *d_swiotlb_usage = NULL; if (d_swiotlb_usage) return; d_swiotlb_usage =