RE: [PATCH] dma-mapping: benchmark: use the correct HiSilicon copyright

2021-03-31 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: fanghao (A) > Sent: Tuesday, March 30, 2021 7:34 PM > To: h...@lst.de; m.szyprow...@samsung.com; robin.mur...@arm.com; Song Bao Hua > (Barry Song) > Cc: iommu@lists.linux-foundation.org; linux...@openeuler.org; > linux-kselft...@vge

RE: [PATCH] dma-mapping: make map_benchmark compile into module

2021-03-24 Thread Song Bao Hua (Barry Song)
s.org; h...@lst.de; > m.szyprow...@samsung.com; Song Bao Hua (Barry Song) > ; iommu@lists.linux-foundation.org; > linux-ker...@vger.kernel.org > Subject: Re: [PATCH] dma-mapping: make map_benchmark compile into module > > On Wed, Mar 24, 2021 at 10:17:38AM +0800, Tian Tao wrote: >

RE: [PATCH] dma-mapping: make map_benchmark compile into module

2021-03-23 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: tiantao (H) > Sent: Wednesday, March 24, 2021 3:18 PM > To: a...@linux-foundation.org; pet...@infradead.org; paul...@kernel.org; > a...@kernel.org; t...@linutronix.de; rost...@goodmis.org; h...@lst.de; > m.szyprow...@samsung.com; Song B

RE: [PATCH] dma-mapping: benchmark: Add support for multi-pages map/unmap

2021-03-18 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: chenxiang (M) > Sent: Thursday, March 18, 2021 10:30 PM > To: h...@lst.de; m.szyprow...@samsung.com; robin.mur...@arm.com; Song Bao Hua > (Barry Song) > Cc: iommu@lists.linux-foundation.org; linux...@openeuler.org; > linux-ksel

RE: [RFC PATCH v3 1/2] mempinfd: Add new syscall to provide memory pin

2021-02-10 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Jason Gunthorpe [mailto:j...@ziepe.ca] > Sent: Thursday, February 11, 2021 7:04 AM > To: Song Bao Hua (Barry Song) > Cc: David Hildenbrand ; Wangzhou (B) > ; linux-ker...@vger.kernel.org; > iommu@lists.linux-foundation.org; linux...@k

RE: [RFC PATCH v3 1/2] mempinfd: Add new syscall to provide memory pin

2021-02-09 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Jason Gunthorpe [mailto:j...@ziepe.ca] > Sent: Wednesday, February 10, 2021 2:54 AM > To: Song Bao Hua (Barry Song) > Cc: David Hildenbrand ; Wangzhou (B) > ; linux-ker...@vger.kernel.org; > iommu@lists.linux-foundation.org; linux...@k

RE: [RFC PATCH v3 1/2] mempinfd: Add new syscall to provide memory pin

2021-02-08 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Jason Gunthorpe [mailto:j...@ziepe.ca] > Sent: Tuesday, February 9, 2021 10:30 AM > To: Song Bao Hua (Barry Song) > Cc: David Hildenbrand ; Wangzhou (B) > ; linux-ker...@vger.kernel.org; > iommu@lists.linux-foundation.org; linux...@k

RE: [RFC PATCH v3 1/2] mempinfd: Add new syscall to provide memory pin

2021-02-08 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: David Hildenbrand [mailto:da...@redhat.com] > Sent: Monday, February 8, 2021 11:37 PM > To: Song Bao Hua (Barry Song) ; Matthew Wilcox > > Cc: Wangzhou (B) ; linux-ker...@vger.kernel.org; > iommu@lists.linux-foundation.org; linux...@k

RE: [RFC PATCH v3 1/2] mempinfd: Add new syscall to provide memory pin

2021-02-08 Thread Song Bao Hua (Barry Song)
.infradead.org; linux-...@vger.kernel.org; Andrew > Morton ; Alexander Viro ; > gre...@linuxfoundation.org; Song Bao Hua (Barry Song) > ; kevin.t...@intel.com; > jean-phili...@linaro.org; eric.au...@redhat.com; Liguozhu (Kenneth) > ; zhangfei@linaro.org; chensihang (A) > >

RE: [RFC PATCH v3 1/2] mempinfd: Add new syscall to provide memory pin

2021-02-08 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: owner-linux...@kvack.org [mailto:owner-linux...@kvack.org] On Behalf Of > David Hildenbrand > Sent: Monday, February 8, 2021 9:22 PM > To: Song Bao Hua (Barry Song) ; Matthew Wilcox > > Cc: Wangzhou (B) ; linux-ker...@vger.kernel.org

RE: [RFC PATCH v3 1/2] mempinfd: Add new syscall to provide memory pin

2021-02-07 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: David Rientjes [mailto:rient...@google.com] > Sent: Monday, February 8, 2021 3:18 PM > To: Song Bao Hua (Barry Song) > Cc: Matthew Wilcox ; Wangzhou (B) > ; linux-ker...@vger.kernel.org; > iommu@lists.linux-foundation.org; linux...@k

RE: [RFC PATCH v3 1/2] mempinfd: Add new syscall to provide memory pin

2021-02-07 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: owner-linux...@kvack.org [mailto:owner-linux...@kvack.org] On Behalf Of > Matthew Wilcox > Sent: Monday, February 8, 2021 2:31 PM > To: Song Bao Hua (Barry Song) > Cc: Wangzhou (B) ; linux-ker...@vger.kernel.org; > iommu@lists.linux-

RE: [RFC PATCH v3 1/2] mempinfd: Add new syscall to provide memory pin

2021-02-07 Thread Song Bao Hua (Barry Song)
adead.org; > linux-...@vger.kernel.org; Andrew Morton ; > Alexander Viro ; gre...@linuxfoundation.org; Song > Bao Hua (Barry Song) ; j...@ziepe.ca; > kevin.t...@intel.com; jean-phili...@linaro.org; eric.au...@redhat.com; > Liguozhu (Kenneth) ; zhangfei@linaro.org; > chensihang (A) > S

[PATCH v3 2/2] dma-mapping: benchmark: pretend DMA is transmitting

2021-02-05 Thread Barry Song
unmap since the socket buffers come from OS. Simple RX model eg. disk driver, is also map -> RX -> unmap, but real RX model in a NIC could be more complicated considering packets can come spontaneously and many drivers are using pre-mapped buffers pool. This is in the TBD list. Signed-off-by: Barry

[PATCH v3 1/2] dma-mapping: benchmark: use u8 for reserved field in uAPI structure

2021-02-05 Thread Barry Song
in tools, otherwise, if users use old version to run on newer kernel, the random expansion value will cause side effect on newer kernel. Signed-off-by: Barry Song --- kernel/dma/map_benchmark.c | 2 +- tools/testing/selftests/dma/dma_map_benchmark.c | 4 +++- 2 files changed

RE: [PATCH v2] dma-mapping: benchmark: pretend DMA is transmitting

2021-02-05 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Christoph Hellwig [mailto:h...@lst.de] > Sent: Friday, February 5, 2021 11:36 PM > To: Song Bao Hua (Barry Song) > Cc: Christoph Hellwig ; m.szyprow...@samsung.com; > robin.mur...@arm.com; iommu@lists.linux-foundation.org; > linux-k

RE: [PATCH v2] dma-mapping: benchmark: pretend DMA is transmitting

2021-02-05 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Christoph Hellwig [mailto:h...@lst.de] > Sent: Friday, February 5, 2021 10:21 PM > To: Song Bao Hua (Barry Song) > Cc: m.szyprow...@samsung.com; h...@lst.de; robin.mur...@arm.com; > iommu@lists.linux-foundation.org; linux-ker...@vger.k

[PATCH v2] dma-mapping: benchmark: pretend DMA is transmitting

2021-02-04 Thread Barry Song
unmap since the socket buffers come from OS. Simple RX model eg. disk driver, is also map -> RX -> unmap, but real RX model in a NIC could be more complicated considering packets can come spontaneously and many drivers are using pre-mapped buffers pool. This is in the TBD list. Signed-off-by: Ba

RE: [PATCH] dma-mapping: benchmark: pretend DMA is transmitting

2021-02-04 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Robin Murphy [mailto:robin.mur...@arm.com] > Sent: Friday, February 5, 2021 12:51 PM > To: Song Bao Hua (Barry Song) ; > m.szyprow...@samsung.com; h...@lst.de; iommu@lists.linux-foundation.org > Cc: linux-ker...@vger.kernel.org; linu

[PATCH] dma-mapping: benchmark: pretend DMA is transmitting

2021-02-04 Thread Barry Song
-> transmission -> unmap. Transmission delay reduces the contention of IOMMU. Here a delay is added to simulate the transmission for TX case so that the tested result could be more accurate. RX case would be much more tricky. It is not supported yet. Signed-off-by: Barry Song --- kern

RE: [RFC PATCH v2] uacce: Add uacce_ctrl misc device

2021-02-01 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Tian, Kevin [mailto:kevin.t...@intel.com] > Sent: Tuesday, February 2, 2021 3:52 PM > To: Jason Gunthorpe > Cc: Song Bao Hua (Barry Song) ; chensihang (A) > ; Arnd Bergmann ; Greg > Kroah-Hartman ; linux-ker...@vger.kernel.org

RE: [RFC PATCH v2] uacce: Add uacce_ctrl misc device

2021-02-01 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Jason Gunthorpe [mailto:j...@ziepe.ca] > Sent: Tuesday, February 2, 2021 12:44 PM > To: Tian, Kevin > Cc: Song Bao Hua (Barry Song) ; chensihang (A) > ; Arnd Bergmann ; Greg > Kroah-Hartman ; linux-ker...@vger.kernel.org; > iommu@li

RE: [RFC PATCH v2] uacce: Add uacce_ctrl misc device

2021-01-29 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Tian, Kevin [mailto:kevin.t...@intel.com] > Sent: Friday, January 29, 2021 11:09 PM > To: Song Bao Hua (Barry Song) ; Jason Gunthorpe > > Cc: chensihang (A) ; Arnd Bergmann > ; Greg Kroah-Hartman ; > linux-ker...@vger.kerne

RE: [RFC PATCH v2] uacce: Add uacce_ctrl misc device

2021-01-27 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Jason Gunthorpe [mailto:j...@ziepe.ca] > Sent: Wednesday, January 27, 2021 7:20 AM > To: Song Bao Hua (Barry Song) > Cc: Wangzhou (B) ; Greg Kroah-Hartman > ; Arnd Bergmann ; Zhangfei Gao > ; linux-accelerat...@lists.oz

RE: [RFC PATCH v2] uacce: Add uacce_ctrl misc device

2021-01-25 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Jason Gunthorpe [mailto:j...@ziepe.ca] > Sent: Tuesday, January 26, 2021 2:13 PM > To: Song Bao Hua (Barry Song) > Cc: Wangzhou (B) ; Greg Kroah-Hartman > ; Arnd Bergmann ; Zhangfei Gao > ; linux-accelerat...@lists.ozlabs.org; > linu

RE: [RFC PATCH v2] uacce: Add uacce_ctrl misc device

2021-01-25 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: owner-linux...@kvack.org [mailto:owner-linux...@kvack.org] On Behalf Of > Jason Gunthorpe > Sent: Tuesday, January 26, 2021 12:16 PM > To: Song Bao Hua (Barry Song) > Cc: Wangzhou (B) ; Greg Kroah-Hartman > ; Arnd Bergmann ; Zhangfei Ga

RE: [RFC PATCH v2] uacce: Add uacce_ctrl misc device

2021-01-25 Thread Song Bao Hua (Barry Song)
; > iommu@lists.linux-foundation.org; linux...@kvack.org; Song Bao Hua (Barry > Song) > ; Liguozhu (Kenneth) ; > chensihang (A) > Subject: Re: [RFC PATCH v2] uacce: Add uacce_ctrl misc device > > On Mon, Jan 25, 2021 at 04:34:56PM +0800, Zhou Wang wrote: > > > +static

[PATCH RESEND] dma-mapping: benchmark: fix kernel crash when dma_map_single fails

2021-01-24 Thread Barry Song
(f8626802) [ 48.112884] ---[ end trace d4890e21e75419d5 ]--- Signed-off-by: Barry Song --- kernel/dma/map_benchmark.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/dma/map_benchmark.c b/kernel/dma/map_benchmark.c index b1496e744c68..1b1b8ff875cb 100644

[PATCH] dma-mapping: benchmark: fix kernel crash when dma_map_single fails

2021-01-07 Thread Barry Song
(f8626802) [ 48.112884] ---[ end trace d4890e21e75419d5 ]--- Signed-off-by: Barry Song --- kernel/dma/map_benchmark.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/dma/map_benchmark.c b/kernel/dma/map_benchmark.c index b1496e744c68..1b1b8ff875cb 100644

RE: [PATCH] dma-mapping: benchmark: check the validity of dma mask bits

2020-12-18 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Robin Murphy [mailto:robin.mur...@arm.com] > Sent: Saturday, December 19, 2020 7:10 AM > To: Song Bao Hua (Barry Song) ; h...@lst.de; > m.szyprow...@samsung.com > Cc: iommu@lists.linux-foundation.org; Linuxarm ; Dan > Carpenter >

RE: [PATCH v2] dma-mapping: add unlikely hint for error path in dma_mapping_error

2020-12-13 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Heiner Kallweit [mailto:hkallwe...@gmail.com] > Sent: Monday, December 14, 2020 5:33 AM > To: Christoph Hellwig ; Marek Szyprowski > ; Robin Murphy ; Song Bao Hua > (Barry Song) > Cc: open list:AMD IOMMU (AMD-VI) ; Linux > Kernel

[PATCH] dma-mapping: benchmark: check the validity of dma mask bits

2020-12-12 Thread Barry Song
While dma_mask_bits is larger than 64, the bahvaiour is undefined. On the other hand, dma_mask_bits which is smaller than 20 (1MB) makes no sense in real hardware. Reported-by: Dan Carpenter Signed-off-by: Barry Song --- kernel/dma/map_benchmark.c | 6 ++ 1 file changed, 6 insertions

RE: [bug report] dma-mapping: add benchmark support for streaming DMA APIs

2020-12-09 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Wednesday, December 9, 2020 8:00 PM > To: Song Bao Hua (Barry Song) > Cc: iommu@lists.linux-foundation.org > Subject: [bug report] dma-mapping: add benchmark support for str

RE: [PATCH] dma-mapping: Fix sizeof() mismatch on tsk allocation

2020-11-25 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Colin King [mailto:colin.k...@canonical.com] > Sent: Thursday, November 26, 2020 3:05 AM > To: Song Bao Hua (Barry Song) ; Christoph > Hellwig ; Marek Szyprowski ; > Robin Murphy ; iommu@lists.linux-foundation.org > Cc: kernel-janit...@v

RE: [PATCH] dma-mapping: fix an uninitialized pointer read due to typo in argp assignment

2020-11-25 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Colin King [mailto:colin.k...@canonical.com] > Sent: Thursday, November 26, 2020 2:56 AM > To: Song Bao Hua (Barry Song) ; Christoph > Hellwig ; Marek Szyprowski ; > Robin Murphy ; iommu@lists.linux-foundation.org > Cc: kernel-janit...@v

[PATCH v4 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-11-15 Thread Barry Song
/sys/bus/pci/devices/:00:01.0/driver_override echo :00:01.0 > /sys/bus/pci/drivers/xxx/unbind echo :00:01.0 > /sys/bus/pci/drivers/dma_map_benchmark/bind Cc: Will Deacon Cc: Shuah Khan Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Signed-off-by: Barry Song --

[PATCH v4 0/2] dma-mapping: provide a benchmark for streaming DMA mapping

2020-11-15 Thread Barry Song
like the number of threads - make cache dirty before dma_map - fix unpaired dma_map_page and dma_unmap_single; - remove redundant "long long" before ktime_to_ns(); - use devm_add_action() Barry Song (2): dma-mapping: add benchmark support for streaming DMA APIs sel

[PATCH v4 2/2] selftests/dma: add test application for DMA_MAP_BENCHMARK

2020-11-15 Thread Barry Song
average map latency(us):1.1 standard deviation:1.9 average unmap latency(us):0.5 standard deviation:0.8 Cc: Will Deacon Cc: Shuah Khan Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Signed-off-by: Barry Song --- -v4: * add dma direction and mask_

RE: [PATCH v3 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-11-15 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Christoph Hellwig [mailto:h...@lst.de] > Sent: Sunday, November 15, 2020 9:45 PM > To: Song Bao Hua (Barry Song) > Cc: Christoph Hellwig ; iommu@lists.linux-foundation.org; > robin.mur...@arm.com; m.szyprow...@samsung.com; Linuxar

RE: [PATCH v3 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-11-14 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Christoph Hellwig [mailto:h...@lst.de] > Sent: Sunday, November 15, 2020 5:54 AM > To: Song Bao Hua (Barry Song) > Cc: iommu@lists.linux-foundation.org; h...@lst.de; robin.mur...@arm.com; > m.szyprow...@samsung.com; Linuxar

RE: [PATCH v3 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-11-11 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: John Garry > Sent: Wednesday, November 11, 2020 10:37 PM > To: Song Bao Hua (Barry Song) ; > iommu@lists.linux-foundation.org; h...@lst.de; robin.mur...@arm.com; > m.szyprow...@samsung.com > Cc: linux-kselft...@vger.kernel.org; Will De

RE: [PATCH v3 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-11-10 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: John Garry > Sent: Tuesday, November 10, 2020 9:39 PM > To: Song Bao Hua (Barry Song) ; > iommu@lists.linux-foundation.org; h...@lst.de; robin.mur...@arm.com; > m.szyprow...@samsung.com > Cc: linux-kselft...@vger.kernel.org; Will De

RE: [PATCH v3 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-11-10 Thread Song Bao Hua (Barry Song)
Hello Robin, Christoph, Any further comment? John suggested that "depends on DEBUG_FS" should be added in Kconfig. I am collecting more comments to send v4 together with fixing this minor issue :-) Thanks Barry > -Original Message- > From: Song Bao Hua (Barry Song

RE: [PATCH v3 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-11-02 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: John Garry > Sent: Monday, November 2, 2020 10:19 PM > To: Song Bao Hua (Barry Song) ; > iommu@lists.linux-foundation.org; h...@lst.de; robin.mur...@arm.com; > m.szyprow...@samsung.com > Cc: linux-kselft...@vger.kernel.org; Shuah

[PATCH v3 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-11-02 Thread Barry Song
/sys/bus/pci/devices/:00:01.0/driver_override echo :00:01.0 > /sys/bus/pci/drivers/xxx/unbind echo :00:01.0 > /sys/bus/pci/drivers/dma_map_benchmark/bind Cc: Joerg Roedel Cc: Will Deacon Cc: Shuah Khan Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Signed-off-by: B

[PATCH v3 0/2] dma-mapping: provide a benchmark for streaming DMA mapping

2020-11-02 Thread Barry Song
- check users' parameters strictly like the number of threads - make cache dirty before dma_map - fix unpaired dma_map_page and dma_unmap_single; - remove redundant "long long" before ktime_to_ns(); - use devm_add_action() Barry Song (2): dma-mapping: add benchma

[PATCH v3 2/2] selftests/dma: add test application for DMA_MAP_BENCHMARK

2020-11-02 Thread Barry Song
average map latency(us):1.1 standard deviation:1.9 average unmap latency(us):0.5 standard deviation:0.8 Cc: Joerg Roedel Cc: Will Deacon Cc: Shuah Khan Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Signed-off-by: Barry Song --- MAINTAINERS | 6

[PATCH v2 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-11-01 Thread Barry Song
/sys/bus/pci/devices/:00:01.0/driver_override echo :00:01.0 > /sys/bus/pci/drivers/xxx/unbind echo :00:01.0 > /sys/bus/pci/drivers/dma_map_benchmark/bind Cc: Joerg Roedel Cc: Will Deacon Cc: Shuah Khan Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Signed-off-by: B

[PATCH v2 0/2] dma-mapping: provide a benchmark for streaming DMA mapping

2020-11-01 Thread Barry Song
of threads - make cache dirty before dma_map - fix unpaired dma_map_page and dma_unmap_single; - remove redundant "long long" before ktime_to_ns(); - use devm_add_action(); - wakeup all threads together after they are ready Barry Song (2): dma-mapping: add benchma

[PATCH v2 2/2] selftests/dma: add test application for DMA_MAP_BENCHMARK

2020-11-01 Thread Barry Song
average map latency(us):1.1 standard deviation:1.9 average unmap latency(us):0.5 standard deviation:0.8 Cc: Joerg Roedel Cc: Will Deacon Cc: Shuah Khan Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Signed-off-by: Barry Song --- -v2: * check parameters like threads, second

RE: [PATCH 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-10-31 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Song Bao Hua (Barry Song) [mailto:song.bao@hisilicon.com] > Sent: Saturday, October 31, 2020 10:45 PM > To: Robin Murphy ; > iommu@lists.linux-foundation.org; h...@lst.de; m.szyprow...@samsung.com > Cc: j...@8bytes.org; w...@kernel.org

RE: [PATCH 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-10-31 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Robin Murphy [mailto:robin.mur...@arm.com] > Sent: Saturday, October 31, 2020 4:48 AM > To: Song Bao Hua (Barry Song) ; > iommu@lists.linux-foundation.org; h...@lst.de; m.szyprow...@samsung.com > Cc: j...@8bytes.org; w...@kernel.org

RE: [PATCH 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-10-29 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Robin Murphy [mailto:robin.mur...@arm.com] > Sent: Friday, October 30, 2020 8:38 AM > To: Song Bao Hua (Barry Song) ; > iommu@lists.linux-foundation.org; h...@lst.de; m.szyprow...@samsung.com > Cc: j...@8bytes.org; w...@kernel.org; sh...@ke

RE: [PATCH] dma: Per-NUMA-node CMA should depend on NUMA

2020-10-27 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: h...@lst.de [mailto:h...@lst.de] > Sent: Tuesday, October 27, 2020 8:55 PM > To: Song Bao Hua (Barry Song) > Cc: Robin Murphy ; h...@lst.de; > iommu@lists.linux-foundation.org; linux-ker...@vger.kernel.org > Subject: Re: [PATCH] d

[PATCH 0/2] dma-mapping: provide a benchmark for streaming DMA mapping

2020-10-26 Thread Barry Song
to "dma_map_benchmark" platform_driver or pci_driver for benchmarking. In this patchset, I prefer to use the driver_override and avoid the various hack in kernel. We can dynamically switch devices behind different IOMMUs to get the performance of dma map on IOMMU or non-IOMMU. Barry Song (2): dma-ma

[PATCH 2/2] selftests/dma: add test application for DMA_MAP_BENCHMARK

2020-10-26 Thread Barry Song
9 average unmap_nsec:2423 Cc: Joerg Roedel Cc: Will Deacon Cc: Shuah Khan Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Signed-off-by: Barry Song --- MAINTAINERS | 6 ++ tools/testing/selftests/dma/Makefile | 6 ++ tools

[PATCH 1/2] dma-mapping: add benchmark support for streaming DMA APIs

2020-10-26 Thread Barry Song
will also be supported afterwards. Cc: Joerg Roedel Cc: Will Deacon Cc: Shuah Khan Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Signed-off-by: Barry Song --- kernel/dma/Kconfig | 8 ++ kernel/dma/Makefile| 1 + kernel/dma/map_benchmar

RE: [PATCH] dma: Per-NUMA-node CMA should depend on NUMA

2020-10-26 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Robin Murphy [mailto:robin.mur...@arm.com] > Sent: Tuesday, October 27, 2020 1:25 AM > To: h...@lst.de > Cc: iommu@lists.linux-foundation.org; linux-ker...@vger.kernel.org; Song Bao > Hua (Barry Song) > Subject: [PATCH] dma: Per-NUMA-n

RE: [PATCH v2 0/2] iommu/arm-smmu-v3: Improve cmdq lock efficiency

2020-09-01 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org > [mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of John Garry > Sent: Saturday, August 22, 2020 1:54 AM > To: w...@kernel.org; robin.mur...@arm.com > Cc: j...@8bytes.org; linux-arm-ker...@lists.infradead.org; >

RE: [PATCH v6 0/2] make dma_alloc_coherent NUMA-aware by per-NUMA CMA

2020-08-31 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org > [mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of Christoph Hellwig > Sent: Friday, August 21, 2020 6:19 PM > To: Song Bao Hua (Barry Song) > Cc: h...@lst.de; m.szyprow...@samsung.com; robin.m

RE: [PATCH] iommu/arm-smmu-v3: add tracepoints for cmdq_issue_cmdlist

2020-08-28 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Robin Murphy [mailto:robin.mur...@arm.com] > Sent: Friday, August 28, 2020 11:18 PM > To: Song Bao Hua (Barry Song) ; Will Deacon > > Cc: iommu@lists.linux-foundation.org; linux-arm-ker...@lists.infradead.org; > j...@8bytes.org; Li

RE: [PATCH] iommu/arm-smmu-v3: add tracepoints for cmdq_issue_cmdlist

2020-08-28 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Will Deacon [mailto:w...@kernel.org] > Sent: Friday, August 28, 2020 10:29 PM > To: Song Bao Hua (Barry Song) > Cc: iommu@lists.linux-foundation.org; linux-arm-ker...@lists.infradead.org; > robin.mur...@arm.com; j...@8bytes.org; Linux

RE: [PATCH] iommu/arm-smmu-v3: add tracepoints for cmdq_issue_cmdlist

2020-08-28 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Jean-Philippe Brucker [mailto:jean-phili...@linaro.org] > Sent: Friday, August 28, 2020 7:41 PM > To: Song Bao Hua (Barry Song) > Cc: iommu@lists.linux-foundation.org; linux-arm-ker...@lists.infradead.org; > robin.mur...@arm.com; w...@ke

[PATCH] iommu/arm-smmu-v3: add tracepoints for cmdq_issue_cmdlist

2020-08-27 Thread Barry Song
cmdq_issue_cmdlist() is the hotspot that uses a lot of time. This patch adds tracepoints for it to help debug. Signed-off-by: Barry Song --- * can furthermore develop an eBPF program to benchmark using this trace cmdlistlat.c: #include BPF_HASH(start, u32); BPF_HISTOGRAM(dist

[PATCH v5 1/3] iommu/arm-smmu-v3: replace symbolic permissions by octal permissions for module parameter

2020-08-27 Thread Barry Song
Signed-off-by: Barry Song --- -v5: add Robin's reviewed-by drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 7196207be7ea..eea5f7c6d9ab

[PATCH v5 0/3] iommu/arm-smmu-v3: permit users to disable msi polling

2020-08-27 Thread Barry Song
. on the other hand, we only need to check a bit in options rather than two bits in features Barry Song (3): iommu/arm-smmu-v3: replace symbolic permissions by octal permissions for module parameter iommu/arm-smmu-v3: replace module_param_named by module_param for disable_bypass iommu

[PATCH v5 2/3] iommu/arm-smmu-v3: replace module_param_named by module_param for disable_bypass

2020-08-27 Thread Barry Song
Just use module_param() - going out of the way to specify a "different" name that's identical to the variable name is silly. Reviewed-by: Robin Murphy Signed-off-by: Barry Song --- -v5: add Robin's reviewed-by drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +- 1 file changed, 1

[PATCH v5 3/3] iommu/arm-smmu-v3: permit users to disable msi polling

2020-08-27 Thread Barry Song
a command line option so that users can decide to use MSI polling or not based on their tests. Reviewed-by: Robin Murphy Signed-off-by: Barry Song --- -v5: add Robin's reviewed-by drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 - 1 file changed, 12 insertions(+), 5 deletions

[PATCH v8 1/3] dma-contiguous: provide the ability to reserve per-numa CMA

2020-08-23 Thread Barry Song
: Andrew Morton Cc: Mike Rapoport Signed-off-by: Barry Song --- -v8: * rename parameter from pernuma_cma to cma_pernuma with respect to the comments of Mike Rapoport and Randy Dunlap * if both hugetlb_cma and pernuma_cma are enabled, we may need a larger default CMA_AREAS. In numa, we set

[PATCH v8 2/3] arm64: mm: reserve per-numa CMA to localize coherent dma buffers

2020-08-23 Thread Barry Song
: Ganapatrao Kulkarni Cc: Catalin Marinas Cc: Nicolas Saenz Julienne Cc: Steve Capper Cc: Andrew Morton Cc: Mike Rapoport Signed-off-by: Barry Song --- arch/arm64/mm/init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 481d22c32a2e

[PATCH v8 3/3] mm: cma: use CMA_MAX_NAME to define the length of cma name array

2020-08-23 Thread Barry Song
Kravetz Cc: Roman Gushchin Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Will Deacon Cc: Robin Murphy Cc: Andrew Morton Signed-off-by: Barry Song --- this patch is fixing the magic number issue with respect to Will's comment here: https://lore.kernel.org/linux-iommu

[PATCH v8 0/3] make dma_alloc_coherent NUMA-aware by per-NUMA CMA

2020-08-23 Thread Barry Song
_reserve() to reuse the comment before hugetlb_cma_reserve() with respect to Robin's comment -v2: * fix some issues reported by kernel test robot * fallback to default cma while allocation fails in per-numa cma free memory properly Barry Song (3): dma-contiguous: provide the ability to

RE: [PATCH v7 0/3] make dma_alloc_coherent NUMA-aware by per-NUMA CMA

2020-08-21 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Song Bao Hua (Barry Song) > Sent: Saturday, August 22, 2020 7:27 AM > To: 'Mike Kravetz' ; h...@lst.de; > m.szyprow...@samsung.com; robin.mur...@arm.com; w...@kernel.org; > ganapatrao.kulka...@cavium.com; catalin.mari...@arm.com; > a...

RE: [PATCH v7 0/3] make dma_alloc_coherent NUMA-aware by per-NUMA CMA

2020-08-21 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Mike Kravetz [mailto:mike.krav...@oracle.com] > Sent: Saturday, August 22, 2020 5:53 AM > To: Song Bao Hua (Barry Song) ; h...@lst.de; > m.szyprow...@samsung.com; robin.mur...@arm.com; w...@kernel.org; > ganapatrao.kulka...@cavium

RE: [PATCH v7 1/3] dma-contiguous: provide the ability to reserve per-numa CMA

2020-08-21 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Randy Dunlap [mailto:rdun...@infradead.org] > Sent: Saturday, August 22, 2020 4:08 AM > To: Song Bao Hua (Barry Song) ; h...@lst.de; > m.szyprow...@samsung.com; robin.mur...@arm.com; w...@kernel.org; > ganapatrao.kulka...@cavium.com; catal

RE: [PATCH v7 1/3] dma-contiguous: provide the ability to reserve per-numa CMA

2020-08-21 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Mike Rapoport [mailto:r...@linux.ibm.com] > Sent: Saturday, August 22, 2020 2:28 AM > To: Song Bao Hua (Barry Song) > Cc: h...@lst.de; m.szyprow...@samsung.com; robin.mur...@arm.com; > w...@kernel.org; ganapatrao.kulka...@cavium.c

[PATCH v7 2/3] arm64: mm: reserve per-numa CMA to localize coherent dma buffers

2020-08-21 Thread Barry Song
: Ganapatrao Kulkarni Cc: Catalin Marinas Cc: Nicolas Saenz Julienne Cc: Steve Capper Cc: Andrew Morton Cc: Mike Rapoport Signed-off-by: Barry Song --- -v7: add Will's acked-by arch/arm64/mm/init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm

[PATCH v7 3/3] mm: cma: use CMA_MAX_NAME to define the length of cma name array

2020-08-21 Thread Barry Song
Cc: Roman Gushchin Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Will Deacon Cc: Robin Murphy Cc: Andrew Morton Signed-off-by: Barry Song --- this patch is fixing the magic number issue with respect to Will's comment here: https://lore.kernel.org/linux-iommu

[PATCH v7 1/3] dma-contiguous: provide the ability to reserve per-numa CMA

2020-08-21 Thread Barry Song
: Christoph Hellwig Cc: Marek Szyprowski Cc: Will Deacon Cc: Robin Murphy Cc: Ganapatrao Kulkarni Cc: Catalin Marinas Cc: Nicolas Saenz Julienne Cc: Steve Capper Cc: Andrew Morton Cc: Mike Rapoport Signed-off-by: Barry Song --- -v7: with respect to Will's comments * move to use

[PATCH v7 0/3] make dma_alloc_coherent NUMA-aware by per-NUMA CMA

2020-08-21 Thread Barry Song
e dma_pernuma_cma_reserve() after hugetlb_cma_reserve() to reuse the comment before hugetlb_cma_reserve() with respect to Robin's comment -v2: * fix some issues reported by kernel test robot * fallback to default cma while allocation fails in per-numa cma free memory properly Barry So

RE: [PATCH v6 1/2] dma-contiguous: provide the ability to reserve per-numa CMA

2020-08-21 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Will Deacon [mailto:w...@kernel.org] > Sent: Friday, August 21, 2020 9:27 PM > To: Song Bao Hua (Barry Song) > Cc: h...@lst.de; m.szyprow...@samsung.com; robin.mur...@arm.com; > ganapatrao.kulka...@cavium.com; catalin.mari...@arm.com; &

RE: [PATCH v6 1/2] dma-contiguous: provide the ability to reserve per-numa CMA

2020-08-21 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Will Deacon [mailto:w...@kernel.org] > Sent: Friday, August 21, 2020 8:47 PM > To: Song Bao Hua (Barry Song) > Cc: h...@lst.de; m.szyprow...@samsung.com; robin.mur...@arm.com; > ganapatrao.kulka...@cavium.com; catalin.mari...@arm.com; &

RE: [PATCH v6 1/2] dma-contiguous: provide the ability to reserve per-numa CMA

2020-08-21 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org > [mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of Randy Dunlap > Sent: Friday, August 21, 2020 2:50 PM > To: Song Bao Hua (Barry Song) ; h...@lst.de; > m.szyprow...@samsung.com; robin

[PATCH v6 1/2] dma-contiguous: provide the ability to reserve per-numa CMA

2020-08-20 Thread Barry Song
: Christoph Hellwig Cc: Marek Szyprowski Cc: Will Deacon Cc: Robin Murphy Cc: Ganapatrao Kulkarni Cc: Catalin Marinas Cc: Nicolas Saenz Julienne Cc: Steve Capper Cc: Andrew Morton Cc: Mike Rapoport Signed-off-by: Barry Song --- v6: rebase on top of 5.9-rc1; doc cleanup .../admin-guide

[PATCH v6 0/2] make dma_alloc_coherent NUMA-aware by per-NUMA CMA

2020-08-20 Thread Barry Song
serve() with respect to Robin's comment -v2: * fix some issues reported by kernel test robot * fallback to default cma while allocation fails in per-numa cma free memory properly Barry Song (2): dma-contiguous: provide the ability to reserve per-numa CMA arm64: mm: reserve per-numa CMA

[PATCH v6 2/2] arm64: mm: reserve per-numa CMA to localize coherent dma buffers

2020-08-20 Thread Barry Song
: Ganapatrao Kulkarni Cc: Catalin Marinas Cc: Nicolas Saenz Julienne Cc: Steve Capper Cc: Andrew Morton Cc: Mike Rapoport Signed-off-by: Barry Song --- -v6: rebase on top of 5.9-rc1 arch/arm64/mm/init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm

RE: [PATCH v4] iommu/arm-smmu-v3: permit users to disable msi polling

2020-08-18 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Robin Murphy [mailto:robin.mur...@arm.com] > Sent: Wednesday, August 19, 2020 2:31 AM > To: Song Bao Hua (Barry Song) ; w...@kernel.org; > j...@8bytes.org > Cc: Zengtao (B) ; > iommu@lists.linux-foundation.org; linux-arm-ker..

[PATCH v4 1/3] iommu/arm-smmu-v3: replace symbolic permissions by octal permissions for module parameter

2020-08-18 Thread Barry Song
module parameter of bypass_ * add ARM_SMMU_OPT_MSIPOLL flag with respect to Robin's comments Signed-off-by: Barry Song --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers

[PATCH v4 3/3] iommu/arm-smmu-v3: permit users to disable msi polling

2020-08-18 Thread Barry Song
a command line option so that users can decide to use MSI polling or not based on their tests. Signed-off-by: Barry Song --- -v4: add ARM_SMMU_OPT_MSIPOLL flag with respect to Robin's comment drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 17 - 1 file changed, 12 insertions(+), 5

[PATCH v4 0/3] iommu/arm-smmu-v3: permit users to disable msi polling

2020-08-18 Thread Barry Song
to check a bit in options rather than two bits in features Barry Song (3): iommu/arm-smmu-v3: replace symbolic permissions by octal permissions for module parameter iommu/arm-smmu-v3: replace module_param_named by module_param for disable_bypass iommu/arm-smmu-v3: permit users

[PATCH v4 2/3] iommu/arm-smmu-v3: replace module_param_named by module_param for disable_bypass

2020-08-18 Thread Barry Song
Just use module_param() - going out of the way to specify a "different" name that's identical to the variable name is silly. Signed-off-by: Barry Song --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/ar

[PATCH v4] iommu/arm-smmu-v3: permit users to disable msi polling

2020-08-18 Thread Barry Song
a command line option so that users can decide to use MSI polling or not based on their tests. Signed-off-by: Barry Song --- -v4: rebase on top of 5.9-rc1 refine changelog drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff

RE: [PATCH v3] iommu/arm-smmu-v3: permit users to disable MSI polling

2020-08-03 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: John Garry > Sent: Tuesday, August 4, 2020 3:34 AM > To: Song Bao Hua (Barry Song) ; w...@kernel.org; > robin.mur...@arm.com; j...@8bytes.org; iommu@lists.linux-foundation.org > Cc: Zengtao (B) ; > linux-arm-ker...@lists.infradead.org >

[PATCH v3] iommu/arm-smmu-v3: permit users to disable MSI polling

2020-08-01 Thread Barry Song
decide to use MSI polling or not based on their tests. Signed-off-by: Barry Song --- -v3: * rebase on top of linux-next as arm-smmu-v3.c has moved; * provide a command line option drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 18 ++ 1 file changed, 14 insertions(+), 4

[PATCH v5 2/2] arm64: mm: reserve per-numa CMA to localize coherent dma buffers

2020-07-31 Thread Barry Song
: Ganapatrao Kulkarni Cc: Catalin Marinas Cc: Nicolas Saenz Julienne Cc: Steve Capper Cc: Andrew Morton Cc: Mike Rapoport Signed-off-by: Barry Song --- arch/arm64/mm/init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index b6881d61b818

[PATCH v5 1/2] dma-contiguous: provide the ability to reserve per-numa CMA

2020-07-31 Thread Barry Song
: Christoph Hellwig Cc: Marek Szyprowski Cc: Will Deacon Cc: Robin Murphy Cc: Ganapatrao Kulkarni Cc: Catalin Marinas Cc: Nicolas Saenz Julienne Cc: Steve Capper Cc: Andrew Morton Cc: Mike Rapoport Signed-off-by: Barry Song --- -v5: refine code according to Christoph Hellwig's comments

[PATCH v5 0/2] make dma_alloc_coherent NUMA-aware by per-NUMA CMA

2020-07-31 Thread Barry Song
e dma_pernuma_cma_reserve() after hugetlb_cma_reserve() to reuse the comment before hugetlb_cma_reserve() with respect to Robin's comment -v2: * fix some issues reported by kernel test robot * fallback to default cma while allocation fails in per-numa cma free memory properly Barry So

RE: [PATCH v2] iommu/arm-smmu-v3: disable MSI polling if SEV polling is faster

2020-07-31 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Will Deacon [mailto:w...@kernel.org] > Sent: Saturday, August 1, 2020 12:22 AM > To: Song Bao Hua (Barry Song) > Cc: John Garry ; robin.mur...@arm.com; > j...@8bytes.org; iommu@lists.linux-foundation.org; Zengtao (B) > ; Linux

RE: [PATCH v2] iommu/arm-smmu-v3: disable MSI polling if SEV polling is faster

2020-07-31 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: John Garry > Sent: Friday, July 31, 2020 10:21 PM > To: Song Bao Hua (Barry Song) ; w...@kernel.org; > robin.mur...@arm.com; j...@8bytes.org; iommu@lists.linux-foundation.org > Cc: Zengtao (B) ; Linuxarm > ; linux-arm-ker...@lists.infrad

[PATCH v2] iommu/arm-smmu-v3: disable MSI polling if SEV polling is faster

2020-07-31 Thread Barry Song
to strict, TX throughput can improve from 25Gbps to 27Gbps by this patch. This patch adds a generic function to support implementation options based on IIDR and disables MSI polling if IIDR matches the specific implementation tested. Cc: Prime Zeng Signed-off-by: Barry Song --- -v2: rather than

  1   2   >