From patchwork Mon Dec 10 08:52:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seraj Alijan X-Patchwork-Id: 10720835 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2A0661751 for ; Mon, 10 Dec 2018 08:52:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19B4C29CBB for ; Mon, 10 Dec 2018 08:52:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DB2129CCD; Mon, 10 Dec 2018 08:52:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC85829CBB for ; Mon, 10 Dec 2018 08:52:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726530AbeLJIwc (ORCPT ); Mon, 10 Dec 2018 03:52:32 -0500 Received: from mail-eopbgr50056.outbound.protection.outlook.com ([40.107.5.56]:36164 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726519AbeLJIwc (ORCPT ); Mon, 10 Dec 2018 03:52:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sondrel.onmicrosoft.com; s=selector1-sondrel-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XFTP7hrwFWvIq2RBgV4cCMoU1gZEZHUcnftlXhCx89w=; b=gsEO+0P8S19FC6iaoRL17vznClJo9IuQ4VNhm8cFoo0mwRxjUf6CCdgSkNMaYyjDyCIYlzurLvZJCjbWx0hyE2T5bCJ2avvAFrJS5NtHeJc5/njKYeY3LcnTHKRasz3tfath1veoBJ36On4HuQ0RhwNy3r13VVAmv+YHqfL2cyM= Received: from VI1P191MB0255.EURP191.PROD.OUTLOOK.COM (10.172.82.20) by VI1P191MB0191.EURP191.PROD.OUTLOOK.COM (10.172.81.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.22; Mon, 10 Dec 2018 08:52:28 +0000 Received: from VI1P191MB0255.EURP191.PROD.OUTLOOK.COM ([fe80::cc1:80a8:5ce5:9674]) by VI1P191MB0255.EURP191.PROD.OUTLOOK.COM ([fe80::cc1:80a8:5ce5:9674%2]) with mapi id 15.20.1404.025; Mon, 10 Dec 2018 08:52:28 +0000 From: Seraj Alijan To: "vkoul@kernel.org" CC: "dmaengine@vger.kernel.org" , "dan.j.williams@intel.com" , James Hartley , Sifan Naeem , Ed Blake , Seraj Mohammed Subject: [PATCH V4 0/5] dmaengine: dmatest: Add multi chan and new params Thread-Topic: [PATCH V4 0/5] dmaengine: dmatest: Add multi chan and new params Thread-Index: AQHUkGWte1K05z6o6Ey003PnCk/1Jw== Date: Mon, 10 Dec 2018 08:52:28 +0000 Message-ID: <1544431926-8662-1-git-send-email-seraj.alijan@sondrel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LNXP265CA0077.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:76::17) To VI1P191MB0255.EURP191.PROD.OUTLOOK.COM (2603:10a6:800:a7::20) authentication-results: spf=none (sender IP is ) smtp.mailfrom=seraj.mohammed@sondrel.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [195.88.9.101] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1P191MB0191;6:w2ampd9EiLLnWE4ivQQtOKnTMPcNPowVXwqZZ9mZpyL7vaja2y9xWX15+eQ8b/VeARCJOssFauM90p5m2szIEcyMDe/TDudLq8Mf0Sk3huHTtpMYL4eZZuteSRFd0IUaj2gk6GfbTmAetZlA4uniiSrBpE6b2dbej4q5J1+7eHrMACgEVbmubBQ0NDYXNqgOeiKX0KI+xsJT8N7CmDDEXy/bHjrlzd59p6WsNXWV0wGsr0dnDusCNBLWJ0Au2wUSkZjjmBev/qF9Zfuug2x74q6itZIAZsIA7qPS3vjljj5fcv4+NZwDjoO09owApAVrrVuBNcNb2r8INqzTkGB+lcdOGUQijjJgkp9JqMG1mc2DBD4MbxBi8diLYnkDs9YWjDZburNPW9bl9VOG8ho/MJbLEcMWb8qTaBAo1Xuiqq7+X8c73tQ19jXNIJ/D2QJbxvwFIFKEjRYeAJn1CBNtow==;5:qjaBF/AWgCpc0QXvDXY1yQgo2FUmcVyeJkKt31KqyAAdnTA8uT56ORJSunBw9K9cxz1o3clVKmDt6nBCqu96no89KxGel7AbeH188iAergcx0wVpov9VRx6G5gOzTirESWkcQQEgv28WL9UAHJDHz3ZE426VDxQmtgiUeMmkBEs=;7:L8Xno3sPYpBzSOILKVVuVRLChhAPPVBNl4D2Oi1hKUIlsqSipYXFRpmvJwFQTYJ5ghm96xgv9PX5z9aNQ7hs4ZYO3THStdoO66Xga8mjLpIc56oeC6nJPXg0+J1a9fxd+2r9RxIf75QwbEnfQL0hqg== x-ms-office365-filtering-correlation-id: bd41670b-4b35-4650-7eb6-08d65e7ccfb5 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:VI1P191MB0191; x-ms-traffictypediagnostic: VI1P191MB0191: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(3230017)(999002)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231472)(944501520)(52105112)(10201501046)(93006095)(93001095)(148016)(149066)(150057)(6041310)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:VI1P191MB0191;BCL:0;PCL:0;RULEID:;SRVR:VI1P191MB0191; x-forefront-prvs: 08828D20BC x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(346002)(39840400004)(136003)(396003)(376002)(189003)(199004)(5660300001)(5640700003)(6506007)(386003)(6436002)(6512007)(1730700003)(3846002)(8676002)(2906002)(81156014)(81166006)(53936002)(6486002)(52116002)(486006)(68736007)(107886003)(66066001)(2616005)(4326008)(476003)(99286004)(6116002)(36756003)(2501003)(186003)(26005)(6916009)(478600001)(256004)(25786009)(97736004)(2351001)(14454004)(54906003)(8936002)(316002)(71190400001)(71200400001)(102836004)(106356001)(105586002)(7736002)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1P191MB0191;H:VI1P191MB0255.EURP191.PROD.OUTLOOK.COM;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: sondrel.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: h1nT03pls/BjIRInlPryVCd/5054ji7iOqJmBKRLOaDloGjWCqgLP57bdHA/sWdaSK+BJGpyuFztb4W9GUGBOkePN2un/WDXn3GdPCumcik1ZD7NyHN1tzy7UrLcgJ7E31z5tAFDrNe1dJ/yqE6OHxy7iqnFsswarj5xJddxm/CUA21s2p++vXkpKvAd/wS4zOtAfv+3J14edWkvBatShZeHErHYlV0HIOzwVx6S3D4vHunGGE9KzgIMvAAHPp6rLxGqqOOwnx8FgijvM7SZq6v6hqlynI/NK6SsRzj3IJ/C9JEKS0hahuZgdVmzgdYw spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: sondrel.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd41670b-4b35-4650-7eb6-08d65e7ccfb5 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Dec 2018 08:52:28.2174 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4faa3872-698e-4896-80ec-148b916cb1ba X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1P191MB0191 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch set improves the dmatest module by adding multi channel testing capabilities and new parameters to allow more explicit control of the test functionality. Multi channel testing is added by the first patch to improve the process of testing DMA devices with multiple channels as the current driver limits testing to one specified channel per test run. The second patch improves iops results reported by the test for operations that last for more than one second as the test currently reports an incorrect 0 iops for long operations. The third patch adds a new property that allows configuration of address alignment from user space, and the fourth patch adds the ability to specify test transfer size without relying on a randomly generated transfer size. The fifth patch updates the API documentation to reflect the new changes. V4: - Fixed comment typo. - Rebase on topic/dmatest. V3: - Improved dmatest_chan_set to avoid adding channels that are already requested and generate an error if a channel allocation failed. - Added the ability to manually clear test list. - Added more verbose test info to print thread info for each thread successfully started. - Modify dmatest_run_set to print message if the user started a test without configuring channels indicating failed test attempt. - Add dmatest_test_list_get to allow querying test list during configuration. - Added new section in the documentation to explain how Channels are allocated/freed. V2: Use do_div() instead of DIV_ROUND_CLOSEST for division, otherwise the module will reference __udivdi3 which is not present in 32-bit kernel and cause the following error: drivers/dma/dmatest.o: In function `dmatest_persec': >> drivers/dma/dmatest.c:457: undefined reference to `__udivdi3' >> drivers/dma/dmatest.c:457: undefined reference to `__udivdi3' >> drivers/dma/dmatest.c:457: undefined reference to `__udivdi3' Seraj Alijan (5): dmaengine: dmatest: Add support for multi channel testing dmaengine: dmatest: Use fixed point div to calculate iops dmaengine: dmatest: Add alignment parameter dmaengine: dmatest: Add transfer_size parameter dmaengine: Documentation: Add documentation for multi chan testing Documentation/driver-api/dmaengine/dmatest.rst | 109 ++++++++++- drivers/dma/dmatest.c | 259 ++++++++++++++++++++++--- 2 files changed, 330 insertions(+), 38 deletions(-)