Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933830AbcJ0A5b (ORCPT ); Wed, 26 Oct 2016 20:57:31 -0400 Received: from anholt.net ([50.246.234.109]:33331 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932388AbcJ0A52 (ORCPT ); Wed, 26 Oct 2016 20:57:28 -0400 From: Eric Anholt To: Michael Zoran , gregkh@linuxfoundation.org Cc: swarren@wwwdotorg.org, lee@kernel.org, daniels@collabora.com, noralf@tronnes.org, mzoran@crowfest.net, popcornmix@gmail.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: vc04_services: Replace dmac_map_area with dmac_map_sg In-Reply-To: <20161026022327.19055-1-mzoran@crowfest.net> References: <20161026022327.19055-1-mzoran@crowfest.net> User-Agent: Notmuch/0.22.2+1~gb0bcfaa (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Wed, 26 Oct 2016 17:57:24 -0700 Message-ID: <87pommwqvf.fsf@eliezer.anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2142 Lines: 51 --=-=-= Content-Type: text/plain Michael Zoran writes: > The original arm implementation uses dmac_map_area which is not > portable. Replace it with an architecture neutral version > which uses dma_map_sg. > > As you can see that for larger page sizes, the dma_map_sg > implementation is faster then the original unportable dma_map_area > implementation. > > 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 Reviewed-by: Eric Anholt Nice work! More portability and better performance at the same time. A possible future improvement would be to track the pagelist, num_pages, and pagelist_size in a struct in the bulk->remote_data so we didn't need to recalculate them at free time. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJYEVD0AAoJELXWKTbR/J7oHQIP/R0SXgY0c/UR5EVmYQ/AgNMT /8w53B0lbIFDe00CL1PY+QQVEaLjJH86iiroJOy9UMM/fPC+BZ8RsHDrEGwttBJm C0ZX2PGfWiyijMSZL36uLSO/t1WH8rHD9jYDpptMJcj2od1yVnLF84PbzZEWsBwR 3A05t3OeSXTdE4oCbY4F+qErKFM2BXVY9bZC0k2ZJZOQkesewvN/yZfWn3F1fWwA 9tdHUZ4ty5sK4nWtKaAG/XjqGuSqjWkRXZ7swpbXTgAaHz1ED5i2ayKq7giHFCWz dPEQ3cSpQt+Z6wQ1Mm1tVMM+BqGNPFsw7GnhSh5Vv7SZJauw8j+AxPn9dowmc5L9 NfdJyaROKKnX3yEQQh9ZRiLezi4VIKsm8TQUrPGbr+KYmBPAggN1AnhRQW0ZjT3x siuDG/AMPlC8ufzZR+P9+neCYA1psBntSQkmCQmDmwOeqrWWMETWoWVeYSVUeduB eX4/J7J25TUP8/iyliCa/Fbz+5DdbU5itd0hISo+uUeZf0onDlQg5VPkI8v3IWoH X+6C5yGJxwH64qNKmYl4kVLnePp8wHSO2M0F3VY7SOPM0DCo5ucvvFFa+AsE5jG3 eBcP/ef9JQMh02blQpKKkHlrL68xOhFu+4CP2FtWv1D8sKPx8Jg0vq7XkVXxotbE n4t2dv7Q7/MWZtsvFWc9 =Fjs5 -----END PGP SIGNATURE----- --=-=-=--