Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932532AbcKGQkY (ORCPT ); Mon, 7 Nov 2016 11:40:24 -0500 Received: from anholt.net ([50.246.234.109]:59883 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752189AbcKGQkW (ORCPT ); Mon, 7 Nov 2016 11:40:22 -0500 From: Eric Anholt To: Michael Zoran , gregkh@linuxfoundation.org Cc: swarren@wwwdotorg.org, lee@kernel.org, mzoran@crowfest.net, daniels@collabora.com, noralf@tronnes.org, popcornmix@gmail.com, lstoakes@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: add vchiq_pagelist_info structure In-Reply-To: <20161107140603.14125-1-mzoran@crowfest.net> References: <20161107140603.14125-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: Mon, 07 Nov 2016 08:29:24 -0800 Message-ID: <8760nzz21n.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: 1939 Lines: 51 --=-=-= Content-Type: text/plain Michael Zoran writes: > The current dma_map_sg based implementation for bulk messages > computes many offsets into a single allocation multiple times in > both the create and free code paths. This is inefficient, > error prone and in fact still has a few lingering issues > with arm64. > > This change replaces a small portion of that inplementation with > new code that uses a new struct vchiq_pagelist_info to store the > needed information rather then complex offset calculations. > > This improved implementation should be more efficient and easier > to understand and maintain. > > Tests Run(Both Pass): > vchiq_test -p 1 > vchiq_test -f 10 Looks good, and it's a nice cleanup. Thanks! Reviewed-by: Eric Anholt I had one style note, which was that you're using an int and 0/1 for a boolean value, but we like to use proper bools and true/false instead. However, you're modifying code that was already using an int for related booleans, so that can be a separate cleanup. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJYIKvkAAoJELXWKTbR/J7o/cYP/1GtOkT4SYlHVUtHVr2veBel c/xWRmpgFnPThn9Ctr5WScmh4ghOqtuN4Tv8heoV0Pj6H26lKRFIfXwMKn3qDm6j fpqPh/e/2cU5a5fx24qMO3SiwHJfdbmHXNVnCzVMOpc5zTnDrMlLu1dw15AG/UMw yL8VN5CRpp9qHfC8sQw3hFkJUXnGl3X+cAKVqX65uWGHIbu1T2GDRneqATyOGLYx lO6z1SBUEfBVHKuhOICDJiXRuD/nYU4KGzb2hNsH5KfrI2KW2r0scLtYblajUVLM hqst9ie4tcNvFsxg+1wCiCE9ncWbiVTwiRv3jTxFZBjyDajBe71BAgyM/frESlkw 72+GcBd8+vLPnD8C65OzNoE1HAqSSWQqNo79fzeD74wJJVYeQsbFglsaUxLnQHi6 wUiRh2GJgMdiJeMVbBXkeIEk4CWojUy61bOfv7auIRPs6y1dk9Mm3WeiFNtmu5zG CUv4qUbWFLSMCfUoHejBLJYLQHnBycH0G3hWbq9xNSPM4kvtxH3PQ2zR4MXFafay 97ZXM/lQVH9iAQVbV61+20dcuPon9q8rpA23BVw08B7YuH4w8QxITab6rHvJ06P3 RKRu5YNLOwzKV9gBg16ZnSSonEn06IwhylnUyOvG5CEdJTJfL3nuK7bOMiMTK6vX aIT7EPGjh5NvakM+e6Uf =MnG3 -----END PGP SIGNATURE----- --=-=-=--