From patchwork Wed Sep 19 19:52:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seraj Alijan X-Patchwork-Id: 10606425 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 D6520112B for ; Wed, 19 Sep 2018 19:53:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C596828708 for ; Wed, 19 Sep 2018 19:53:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B8BE428BFF; Wed, 19 Sep 2018 19:53:18 +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 14BF528708 for ; Wed, 19 Sep 2018 19:53:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731908AbeITBcn (ORCPT ); Wed, 19 Sep 2018 21:32:43 -0400 Received: from mail-eopbgr60089.outbound.protection.outlook.com ([40.107.6.89]:50144 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731869AbeITBcn (ORCPT ); Wed, 19 Sep 2018 21:32:43 -0400 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=VecRw9PeBw27ULccnoL5R/kYhFdPx40SunfJBgvWbdQ=; b=LBhq3iD6BBcxrmrFr4rIbdHdqeLtCc+dOjdDWY8//xaQniX0bFDA3p3vzsKAjEr9MLXd+BiydxSUgBMeOQN9wk7BfiM22B3FI3uBerpkxotRSZbjm3OakfdcHAk4sXzTyPhozIwxb88A9hfPN8vjqwmgimi39hgkGfHLSwd+j+E= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=seraj.mohammed@sondrel.com; Received: from Seraj-pc.hh.imgtec.org (195.88.9.101) by DB6P191MB0245.EURP191.PROD.OUTLOOK.COM (2603:10a6:4:8e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.15; Wed, 19 Sep 2018 19:53:10 +0000 From: Seraj Alijan To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, dan.j.williams@intel.com, james.hartley@sondrel.com, sifan.naeem@sondrel.com, ed.blake@sondrel.com, Seraj Alijan Subject: [PATCH V3 0/5] dmaengine: dmatest: Add multi chan and new params Date: Wed, 19 Sep 2018 20:52:49 +0100 Message-Id: <1537386774-20749-1-git-send-email-seraj.alijan@sondrel.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [195.88.9.101] X-ClientProxiedBy: CWLP265CA0040.GBRP265.PROD.OUTLOOK.COM (2603:10a6:401:11::28) To DB6P191MB0245.EURP191.PROD.OUTLOOK.COM (2603:10a6:4:8e::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6b1d22f4-7274-4e51-5351-08d61e698723 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DB6P191MB0245; X-Microsoft-Exchange-Diagnostics: 1;DB6P191MB0245;3:b5g2Wylp/NYCnJ7SRgQtrTOyjqS3q9SumZpR1C3J828vxE/Tb0Z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teIk3WMx0iSVFws9UO9hc07ly4qeb5DzD9JtEwPoOsYc4UcfK9/QDHrm22R95sNxxS7+X0phVX6doCTQ/e728tupNd+7qr0nnvr15aMQsfiInvPjXuywZZIgzQQ+lV88sVWfFDszPbxRVASh0j04mYzaK/e1rDrP6FpxV3aF7O3agR5jwsdPcZUldAc7lvvurDEAjzUWefQm9iLCNzYl6y/eeA60PyHpJo7qrkeyaOBw+7iFJpByA0YcFOLv2tOnAxXt1n/FjYy7eGDDgmdLjCZwv0LG83QeBOyamN;4:tTMZ3gsiyMkfeQQAu+/cFAPDfy4u33Q5/cXsK+wEzAw3SiO654lZQTyWOauAepiwyd2cKkeGHchcV0y+l4rDOFZix+aGyDukzScweod1+uhwYpDUKTDquOnJV+Mpq6MxerCQf7maIP6lpBX2rBRSgzqmunpQhmcb6DPGXAamXWiFr0P7D7q2NQaFujXS+psnnJkj9MJhPbgrQsgMhfrKrj3pkmd+J7hXCn874MfffhJDl5c8uIMpgAGz43vw73BbcNyBGtyaVglvSo+uZTjb/Cz7FneqWgUivfpIhDUFw+fiblnjj7gHztO6X/shUZFN X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(20558992708506); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231355)(944501410)(52105095)(10201501046)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123564045)(201708071742011)(7699051);SRVR:DB6P191MB0245;BCL:0;PCL:0;RULEID:;SRVR:DB6P191MB0245; X-Forefront-PRVS: 0800C0C167 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(39840400004)(366004)(396003)(136003)(376002)(346002)(189003)(199004)(316002)(16586007)(53936002)(25786009)(5660300001)(2351001)(81166006)(50466002)(52116002)(51416003)(2906002)(36756003)(6916009)(6116002)(3846002)(48376002)(8936002)(386003)(478600001)(81156014)(6506007)(66066001)(97736004)(486006)(107886003)(2361001)(105586002)(106356001)(6666003)(6486002)(7736002)(6512007)(4326008)(47776003)(50226002)(956004)(16526019)(476003)(186003)(2616005)(26005)(44832011)(68736007)(305945005)(8676002)(16060500001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6P191MB0245;H:Seraj-pc.hh.imgtec.org;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-Exchange-Diagnostics: 1;DB6P191MB0245;23:VgNiR15YalaQS6uiBFNltl2Zgu9Nj69XKt3jnN3PvSIe6KyOcytqdr6tSEVSZr1Re7IJmdO7oODWdRpQmnACMXGZn2KEWz4K5lz+rOMDVHiqeo7v58NYES0XcURUXVoc3eZ10NjpWoUfQLs9yHsVHkt488zl4KH8p50Cf5x73xgzjPPEW30vwvvmYGC22UFB/JRhwgdyjZ6ruCZu6kBq8X1S8FXbMO4yUx96T5bFhUHQ1tNcgLx2jEMbdgSfoj3WkiOk2PuGYGRPEj6ZdqsQZ1p8xch5ELDeIn9gs3afsc3cznKjaSUYUJPH9PsBgs6PZm4OQxZ6c/+U5acxtbZPeEqZAFQy2aAMIBLSD8IUB1zbodH+4bK466n6mdOjqN5fS3yKjIZd0EW8nmlCagrDbtx7lqagQgPD33YRvJx52b6MGeHqYCXzRYMUpoEu4c9xSQT+loMV2flL2Ipxd4WRYMm+b4IElAgX/q9I0DORdYV0qvbGOeRBDxR0NaqlzlhmWNDTo1T8NpSvcgLHo43L79CBxbtUwXOffqSI79ibBS1YC7O8n3AONunl+6BHOHBiktUWQSJawfKn2b55urWQGWXlouOVDH0838os1gzPBl04jrZxLJ8VIy0FO2MqAwg2W3R+bxr11/rZyFRsa7l44u8sFuxj0WdPZmMuaAuyyU7IHDnP4cF3qyFqj5z2FukCyy8ibK6Fd6k/1u7fyxADNxbJARMVNzfbm/I+iabc+OQB3hSA+wQqvXOQ3+1bagwdofCfyNpKBEtaNpvLxRfjWxvPS0fslWOp47cKBA0PTw6fbz8jLhFAxEW1UDn2uGGFmjFJH4+vFe/lqnur8Ji1jqtbtp9cdH1miDLan7IycA0rRg9L2AvUXXe3DhAQe6qit8VRlXavc8xjWmOwxNUzyRan/58tZLNuNILBLMhxEa3AoD1ji8gBvWd+rSMr0aomKZ6ag4Izp5vJSWjHLm6bOTXar9/1UBo1rBHnei/FImya2qynv9IOvEaXGKXRopq2G9Ek2lk+D7AYu6JH8UAf34aT4pDrqjq3FqYiFjxpGpSwfopKwt0Ya6jibUmpC2Bc+x69NzTrDT8PGKHjWLi2C3bcVGSZ2mjJH2d09ksMxrn2FvKMo37PhcW9jCzRwDLxyTtkszdqqJP6meV21zE0SGcow+kGnODY+S691wkHmsQ6UiZi6WpMo7ho5jIlG96l X-Microsoft-Antispam-Message-Info: CTZr660OVtx5BZHOnX78U/odZfYZpux37uyJftomCUdHjz1IVs1XWzxGkcpjIDoSWuLhiPkohmLBTfQkTxMNKELASrpN6toNXU2V+hsIOq65AyClzlvaoZwp2I16xfDkEXJpEaQdWClzJlRKbNM/xZAXdLeV5ry1AKPqfRJOYycTi8xNCSUXXtfrY7Pe1IPWPXJ8ymWtOLETfEkQP+gG33pMdaT06/E2UqcEN3bWbFyC0IowotCFrw1GlgSMMzhavYsJmljKWzsrep9tjIRbICdDLQq0iaThAQ66hNPzge0oSS/EMo32oBi/lDPt6nr1zI12xV9TV+FgDpzJ+Vx9acmB3q9eN/0GbJN8zPukWLA= X-Microsoft-Exchange-Diagnostics: 1;DB6P191MB0245;6:tF2UgAWbLHfKr51e1yr/Y3Vop26sVYbqt0wJWG0Bag9/uQcCitZfMQlJ7gXOXv5F5cSyy7kR591JZtbJ/Sm5spJwSp85Lv/gauaSW0kartq4vc580DevwniTPKtliQh1nzFxdcHttoJljS86NdrBhteF3I0OjPqeVTC2VZ62m5d9+MUSqAyk5Med6BRvztR6g5vtiTXwQFvznGX4XT1L7uGs6sDLeTWfLY5EZA6Okn8kGreKWGYQF/jC6r8CNlz6icX0KHlWuWozXMqwgpJWoo6/pvnGerlGWd2Q3zJWLJbORExdck3QwPTEUJDyddzYbChiO3H9MfWYOSNQxNu3QuVFVR6okUyzTXAWDylx/NgYZmuaEmsjW0oc9Jv72Bcml7U5R6MAtGo5VT6JrRlc7blGhF1IGDqikPZWYDGo48I+sxHc6Sm74inso+ZcVWxpCdMuyyL/riS5STWnTQ9k2A==;5:m5VQ9MsB6leZOWm81ETGYHbbL/KDxrn1RoMfp5F9Etec02oA3dSlHR3YaUazDkFXV+oXKT7vOUZkQQ70/WYFynZ5bWZcr6QbnOAjt1i9h+xrXuPREbffyVbwkXaAAK0k2BPxZrZXSMiTrI2Nep4WwzEFKJm7j19iy0JUx+CqGkM=;7:6VDeB/wNVjpaOmjguou0hL3U9yppT9t1Jhp1KwZJiv+P454l9i/9AK5PTCg8n+08VMVy6OvEHXXhiNa5hFBloNq2d5bE3ZwvyNepnggbWkofbuq9JraDXAnv2CqnKo6phh93FneB8z3jBPqRnpcHNqIzXXVWnot6ZNRiK+hi7eI4+Gb26WoC9IRqsvVZDIIMj7CeUAM33CF7pUg0E9qUZvNX/q8Q9TXuMMCQ02ZnrInM6abDXbFILv1lhy8bixEH SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sondrel.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2018 19:53:10.4760 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b1d22f4-7274-4e51-5351-08d61e698723 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4faa3872-698e-4896-80ec-148b916cb1ba X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6P191MB0245 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. 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(-)