Re: [PATCH 2/4] iommu: add a bitmap based dma address allocator

2015-11-25 Thread Woodhouse, David
On Wed, 2015-11-25 at 15:46 +0100, jroe...@suse.de wrote: > On Tue, Nov 24, 2015 at 02:05:12PM -0800, Shaohua Li wrote: > > The lib/iommu-common.c uses a bitmap and a lock. This implementation > > actually uses a percpu_ida which completely avoids locking. It would be > > possible to make

Re: [PATCH 2/4] iommu: add a bitmap based dma address allocator

2015-11-25 Thread Jens Axboe
On 11/25/2015 10:33 AM, Shaohua Li wrote: On Wed, Nov 25, 2015 at 09:43:49AM -0700, Jens Axboe wrote: On 11/25/2015 09:40 AM, Woodhouse, David wrote: On Wed, 2015-11-25 at 15:46 +0100, jroe...@suse.de wrote: On Tue, Nov 24, 2015 at 02:05:12PM -0800, Shaohua Li wrote: The lib/iommu-common.c

Re: [PATCH 2/4] iommu: add a bitmap based dma address allocator

2015-11-25 Thread Jens Axboe
On 11/25/2015 09:40 AM, Woodhouse, David wrote: On Wed, 2015-11-25 at 15:46 +0100, jroe...@suse.de wrote: On Tue, Nov 24, 2015 at 02:05:12PM -0800, Shaohua Li wrote: The lib/iommu-common.c uses a bitmap and a lock. This implementation actually uses a percpu_ida which completely avoids locking.

Re: [PATCH 2/4] iommu: add a bitmap based dma address allocator

2015-11-25 Thread Shaohua Li
On Wed, Nov 25, 2015 at 09:43:49AM -0700, Jens Axboe wrote: > On 11/25/2015 09:40 AM, Woodhouse, David wrote: > >On Wed, 2015-11-25 at 15:46 +0100, jroe...@suse.de wrote: > >>On Tue, Nov 24, 2015 at 02:05:12PM -0800, Shaohua Li wrote: > >>>The lib/iommu-common.c uses a bitmap and a lock. This

Re: [RFC PATCH v2] iommu/amd: gray the 'irq_remap_table' object for kmemleak

2015-11-25 Thread Joerg Roedel
On Fri, Nov 20, 2015 at 12:33:50PM +0100, Michael Wang wrote: > The kmemleak testing on 3.18.24 show: > > unreferenced object 0x880233ff9010 (size 16): > comm "swapper/0", pid 1, jiffies 4294937440 (age 2010.490s) > hex dump (first 16 bytes): > 0a 0a 00 00 20 00 00 00 00 44 fb 33 02

Re: [RFC PATCH v2] iommu/amd: gray the 'irq_remap_table' object for kmemleak

2015-11-25 Thread Michael Wang
On 11/25/2015 04:08 PM, Joerg Roedel wrote: > On Fri, Nov 20, 2015 at 12:33:50PM +0100, Michael Wang wrote: >> The kmemleak testing on 3.18.24 show: >> >> unreferenced object 0x880233ff9010 (size 16): >> comm "swapper/0", pid 1, jiffies 4294937440 (age 2010.490s) >> hex dump (first 16

Re: [RFC PATCH v2] iommu/amd: gray the 'irq_remap_table' object for kmemleak

2015-11-25 Thread Michael Wang
Hi, Joery On 11/20/2015 12:33 PM, Michael Wang wrote: > The kmemleak testing on 3.18.24 show: > > unreferenced object 0x880233ff9010 (size 16): > comm "swapper/0", pid 1, jiffies 4294937440 (age 2010.490s) > hex dump (first 16 bytes): > 0a 0a 00 00 20 00 00 00 00 44 fb 33 02 88 ff ff

Re: [PATCH 2/4] iommu: add a bitmap based dma address allocator

2015-11-25 Thread jroe...@suse.de
On Tue, Nov 24, 2015 at 02:05:12PM -0800, Shaohua Li wrote: > The lib/iommu-common.c uses a bitmap and a lock. This implementation > actually uses a percpu_ida which completely avoids locking. It would be > possible to make lib/iommu-common.c use percpu_ida too if somebody wants > to do it, but I