Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757318AbcJXHIi (ORCPT ); Mon, 24 Oct 2016 03:08:38 -0400 Received: from ec2-52-42-241-221.us-west-2.compute.amazonaws.com ([52.42.241.221]:54214 "EHLO gw.crowfest.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757151AbcJXHIa (ORCPT ); Mon, 24 Oct 2016 03:08:30 -0400 From: mzoran@crowfest.net To: gregkh@linuxfoundation.org Cc: mzoran@crowfest.net, daniels@collabora.com, eric@anholt.net, noralf@tronnes.org, popcornmix@gmail.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] Fix remaining arm64 build issues in vchiq Date: Sun, 23 Oct 2016 22:28:50 -0700 Message-Id: <20161024052850.28146-1-mzoran@crowfest.net> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2163 Lines: 50 From: Michael Zoran Hi, I implemented an alternative implementation of vchiq that uses dma_map_sg instead of dma_map_page. I've included some benchmarks. As you can see that for larger page sizes, the dma_map_sg implementation is faster then the original unportable dma_map_area implementation. So it's really a question of how important is portability and getting this driver checked into upstream vs. performance with small message sizes. (also included in patch 2/2) Test dmac_map_area dma_map_page dma_map_sg vchiq_test -b 4 10000 51us/iter 76us/iter 76us vchiq_test -b 8 10000 70us/iter 82us/iter 91us vchiq_test -b 16 10000 94us/iter 118us/iter 121us vchiq_test -b 32 10000 146us/iter 173us/iter 187us vchiq_test -b 64 10000 263us/iter 328us/iter 299us vchiq_test -b 128 10000 529us/iter 631us/iter 595us vchiq_test -b 256 10000 2285us/iter 2275us/iter 2001us vchiq_test -b 512 10000 4372us/iter 4616us/iter 4123us So for message sizes >= 64KB, dma_map_sg is faster then dma_map_page. For message size >= 256KB, the dma_map_sg is the fastest implementation. This removes all the errors and all the warnings except: In file included from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:34:0: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c: In function ‘parse_rx_slots’: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:1622:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] DEBUG_VALUE(PARSE_HEADER, (int)header); ^ drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h:189:33: note: in definition of macro ‘DEBUG_VALUE’ do { debug_ptr[DEBUG_ ## d] = (v); dsb(sy); } while (0) Thanks. Michael Zoran (2): staging: vc04_services: Fix unportable cast in vchiq_copy_from_user staging: vc04_services: Replace dmac_map_area with dmac_map_sg .../interface/vchiq_arm/vchiq_2835_arm.c | 155 ++++++++++++--------- 1 file changed, 92 insertions(+), 63 deletions(-) -- 2.9.3