From patchwork Fri Aug 31 11:03:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seraj Alijan X-Patchwork-Id: 10583611 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 6709B112B for ; Fri, 31 Aug 2018 11:04:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5437D2B486 for ; Fri, 31 Aug 2018 11:04:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 463C62B55E; Fri, 31 Aug 2018 11:04:23 +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 92A3E2B486 for ; Fri, 31 Aug 2018 11:04:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727739AbeHaPLS (ORCPT ); Fri, 31 Aug 2018 11:11:18 -0400 Received: from mail-eopbgr70079.outbound.protection.outlook.com ([40.107.7.79]:53464 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726990AbeHaPLS (ORCPT ); Fri, 31 Aug 2018 11:11:18 -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=H7x+bM4a3havTmfBhWKTjWCm4ace46kVb16R64lKuVk=; b=MOmnjQmfG6MJNlCwFfFsorJHGRNqqCWHqLgzEiJMUC8P3uJTzi90wiHxGrfvZ1go+U6UewHu0G61PAXfU1KDs6ZTSEUWnm49Y0E7ebRoftEU0jX7RM03mBZuuLqaVwbNrLKENyHnAnjjS/OVWocfET42vtBkozLxzzeTtvhyv2w= 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 AM4P191MB0243.EURP191.PROD.OUTLOOK.COM (2603:10a6:200:67::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.14; Fri, 31 Aug 2018 11:04:15 +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 V2 1/5] dmaengine: dmatest: Add support for multi channel testing Date: Fri, 31 Aug 2018 12:03:40 +0100 Message-Id: <1535713424-11322-2-git-send-email-seraj.alijan@sondrel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535713424-11322-1-git-send-email-seraj.alijan@sondrel.com> References: <1535713424-11322-1-git-send-email-seraj.alijan@sondrel.com> MIME-Version: 1.0 X-Originating-IP: [195.88.9.101] X-ClientProxiedBy: VI1P195CA0048.EURP195.PROD.OUTLOOK.COM (2603:10a6:802:5a::37) To AM4P191MB0243.EURP191.PROD.OUTLOOK.COM (2603:10a6:200:67::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 64a2e904-ef71-48ba-a35d-08d60f317dfc X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:AM4P191MB0243; X-Microso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ZTsfuCfEcKfQtXCylSl3XRSvsVg97nJGfmAcZAB+z4O+SwRSG564KQN+T3SVcxciGh0Fz8VN+xZaQFyTG8wruSI4Dz1eQz1Q/HKuhLZa/qj9I/tQQvL24rI6gJ2gmdpdHaBc4FZqUzNJCD4JvJwuW4y+oX+XtYjHwp5LM+UEeiKlzQh1HnLxt4BCRNHLMqq8n4PYH2jLG/Od6XoAyBlQT0u5IB/b0Qarb+DBORCBDYstUBg3Ly00HMXdT9QIyAKLMYQ2mCRHK1dRIOPOo2zvEwh1G00vr4ZwfiHPfO7mtBx1bxtdMbGaX+g7TFech3ftr0pxBe7O9gU0T47z5yNeEgHjOCzZV18zfMZCEui2SJD0C2jUBMwUb;4:GP9C340j9cwlBUI8EIJ7B2SKxgzMsyeNDw+vGx0+qstHQs3oZ5pKTsiz7UkJoNYRXMOaRU1xzej60tJCLPXWP9WFu89NeRD0n9ONSBUTTfIjUQuzV9mDAjBndVh93KNeeI5v3d/F+YLhGMe3wFx5sSJe8U9rc35SlZqynLwm3p+1B2Ztkrs9eOFRh+OON2kjPKGWnhcD4mm45ImpyxGlDESH6UpjIqdUrTMJbAjWkMBqc0Oaq5jXHKKwl5ymZBS1irDCT76KLTVL+P5sxaSJyA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201708071742011)(7699016);SRVR:AM4P191MB0243;BCL:0;PCL:0;RULEID:;SRVR:AM4P191MB0243; X-Forefront-PRVS: 07817FCC2D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(39840400004)(396003)(346002)(366004)(376002)(136003)(199004)(189003)(6916009)(6486002)(386003)(5660300001)(6666003)(53936002)(478600001)(6506007)(4326008)(16586007)(6512007)(25786009)(97736004)(14444005)(305945005)(107886003)(52116002)(51416003)(48376002)(76176011)(7736002)(50466002)(81166006)(36756003)(81156014)(8936002)(3846002)(16526019)(316002)(66066001)(26005)(2351001)(6116002)(50226002)(2906002)(106356001)(446003)(68736007)(11346002)(186003)(105586002)(2361001)(486006)(47776003)(8676002)(2616005)(956004)(476003)(44832011)(16060500001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM4P191MB0243;H:Seraj-pc.hh.imgtec.org;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: sondrel.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;AM4P191MB0243;23:HOyV3F1ST5gw5YrsN7/cYV5ULD504IL9hFDUbJDcbG/viyWbafMxLcBWIwGr0J31JlYLzcvdOKemhhhm3PmNTqnyYvNgLxC3Q7VUY7sajRVA8R5oEzvBpjDBe+mcQaEduL12uC91jUvYn1OMhU6RudBhQhEquKTRCoJjc3jPpyxbq2kyYtH/QE/O+GT+EpSAQExMlEmuxv1gvj0j0chnoenV/+qzaJrVqqHBBvoDYumqyWj9zEzVGirobCDjVhmkM6z9h19vyW03HV8Y8WS5ezAhN3bwW9m14RfUGeOpDHOA4gEuIjbdG40wfC5DH3aPqAubQeU3153nxtAvmN4B2EhzWIgLvZRxKiUYFGbJXwPSs8yQ/7g2pwrUZzRtmoeGrfnXU8/TKSsdQ/MzEIdAx5p4YXf2ISb6tVfcF7YMdNFPaQAcKUrFORpzwLAlTGdexvwg9FubjoWxTQmGO66jBVUjUwYoe66rJ1/PRfdrBaERC2B1v8Qf8FNzZPw7rJj3FS8JBmWEoPEeQU1iexw9IzVxZ/GSwVqbDlVa+88+W3BizUe5q1p6LiwhV/ABiRFNItLS8n2Vx/CTKvRINIOYaZYAKlVP+Q3UvBRTaNm9FZZDXMZRPxgnyfXmVJy3clcBM58xhOGELo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LR8aaLHGtm2PeDUQ7TUQgb1QOE5ak0E7Z05neIDcGaUhZqXVHbiDyU3BjE+CCJ4kTBKc5IW1L7QTnXDUiQnCeApQEsY6oXzds72IDDLHZpfTd9P05Yoh+pGZX1jiF0dpk3aPNKunH2lZ3c7BPHuJTGjDPqaLS3I+ZWrW76i4DSOtuC/Pu6/ngdE2/lbpIZU3IIE/iU1rP7ipIho4Zewt/TTrG1VEgLwhOEBRh/rva2/JLW+kNpTt6o8kB7bsoysoZo5grCgO5QZeaDVXzFy8tFrUkC+foJvXKq4+n0OXNeslYZAHUD6dXxi0qo8LVGO6OvsnwUbWEYNtNPL6nnCpgdWm6zNMNsxEwIHzTVuidPB4AKqxVzSeJhfJApf2XUCkovDoVHes/NoEsYTZ40gX7DZ40zez6lHMMKtXMYtS4VuqstIqQgBylKlqS/85sVzIvYMA==;5:5493X45CwecFpYQq4nlwVfuKRPNhPogVytw+cYRY/2uohA96pz4EPXByeMIF6jnp2T6qNMYIFK6vHIH2Rwo/IMMxv/tH4I0vGq8Y69wg065Ph7sei44ulrPi7Mi91kELno6yzzBMgYj5xjO0/EQlWuOVw1d+f6ydCym0xiWWI20=;7:IE+vfnEVcruMhaUp2KXqM5MGN8g+WDWTax/bJmUXHp6gZrpp3NRLOkAOMn2wgqsjL41RMJZZmPf8C0evP9uOxPZpNl0Va1UoUcvutgbZM2S00HnN+LIhArD1KVmYyxzQ2kim3jxrCDzdS8gKOfmc29WAVDaRZKmuK98dh/hFVMVYdSsnOPyDn7KAgzgSAJSE9JVFj4kXPrPqDncwYQso37Wc54r4L7qDu9P4aGICx4kOj+MjUoN5/reOy5tnMCdo SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sondrel.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 11:04:15.6339 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 64a2e904-ef71-48ba-a35d-08d60f317dfc X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4faa3872-698e-4896-80ec-148b916cb1ba X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4P191MB0243 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for running tests on multiple channels simultaneously as the driver currently limits to 1 channel per test run. This will add support for stress testing DMA controllers with multi channel capabilities. This is done by adding a callback function to the "channel" parameter that registers the requested channel prior to the "run" parameter being set to 1. Each time the "channel" parameter is populated with a new dma channel, a new test is appended to the thread queue. Once the "run" parameter is set to 1, the test will kick start all pending threads. Signed-off-by: Seraj Alijan --- drivers/dma/dmatest.c | 109 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 89 insertions(+), 20 deletions(-) diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index aa1712b..8ce3b06 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -27,11 +27,6 @@ static unsigned int test_buf_size = 16384; module_param(test_buf_size, uint, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(test_buf_size, "Size of the memcpy test buffer"); -static char test_channel[20]; -module_param_string(channel, test_channel, sizeof(test_channel), - S_IRUGO | S_IWUSR); -MODULE_PARM_DESC(channel, "Bus ID of the channel to test (default: any)"); - static char test_device[32]; module_param_string(device, test_device, sizeof(test_device), S_IRUGO | S_IWUSR); @@ -139,6 +134,21 @@ static bool dmatest_run; module_param_cb(run, &run_ops, &dmatest_run, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(run, "Run the test (default: false)"); +static int dmatest_chan_set(const char *val, const struct kernel_param *kp); +static int dmatest_chan_get(char *val, const struct kernel_param *kp); +static const struct kernel_param_ops multi_chan_ops = { + .set = dmatest_chan_set, + .get = dmatest_chan_get, +}; + +static char test_channel[20]; +static struct kparam_string newchan_kps = { + .string = test_channel, + .maxlen = 20, +}; +module_param_cb(channel, &multi_chan_ops, &newchan_kps, 0644); +MODULE_PARM_DESC(channel, "Bus ID of the channel to test (default: any)"); + /* Maximum amount of mismatched bytes in buffer to print */ #define MAX_ERROR_COUNT 32 @@ -179,6 +189,7 @@ struct dmatest_thread { wait_queue_head_t done_wait; struct dmatest_done test_done; bool done; + bool pending; }; struct dmatest_chan { @@ -206,6 +217,22 @@ static bool is_threaded_test_run(struct dmatest_info *info) return false; } +static bool is_threaded_test_pending(struct dmatest_info *info) +{ + struct dmatest_chan *dtc; + + list_for_each_entry(dtc, &info->channels, node) { + struct dmatest_thread *thread; + + list_for_each_entry(thread, &dtc->threads, node) { + if (thread->pending) + return true; + } + } + + return false; +} + static int dmatest_wait_get(char *val, const struct kernel_param *kp) { struct dmatest_info *info = &test_info; @@ -476,6 +503,7 @@ static int dmatest_func(void *data) ret = -ENOMEM; smp_rmb(); + thread->pending = false; info = thread->info; params = &info->params; chan = thread->chan; @@ -886,7 +914,7 @@ static int dmatest_add_threads(struct dmatest_info *info, /* srcbuf and dstbuf are allocated by the thread itself */ get_task_struct(thread->task); list_add_tail(&thread->node, &dtc->threads); - wake_up_process(thread->task); + thread->pending = true; } return i; @@ -932,7 +960,7 @@ static int dmatest_add_channel(struct dmatest_info *info, thread_count += cnt > 0 ? cnt : 0; } - pr_info("Started %u threads using %s\n", + pr_info("Added %u threads using %s\n", thread_count, dma_chan_name(chan)); list_add_tail(&dtc->node, &info->channels); @@ -977,7 +1005,7 @@ static void request_channels(struct dmatest_info *info, } } -static void run_threaded_test(struct dmatest_info *info) +static void add_threaded_test(struct dmatest_info *info) { struct dmatest_params *params = &info->params; @@ -1000,6 +1028,19 @@ static void run_threaded_test(struct dmatest_info *info) request_channels(info, DMA_PQ); } +static void run_pending_tests(struct dmatest_info *info) +{ + struct dmatest_chan *dtc; + + list_for_each_entry(dtc, &info->channels, node) { + struct dmatest_thread *thread; + + list_for_each_entry(thread, &dtc->threads, node) { + wake_up_process(thread->task); + } + } +} + static void stop_threaded_test(struct dmatest_info *info) { struct dmatest_chan *dtc, *_dtc; @@ -1016,7 +1057,7 @@ static void stop_threaded_test(struct dmatest_info *info) info->nr_channels = 0; } -static void restart_threaded_test(struct dmatest_info *info, bool run) +static void start_threaded_tests(struct dmatest_info *info) { /* we might be called early to set run=, defer running until all * parameters have been evaluated @@ -1024,11 +1065,7 @@ static void restart_threaded_test(struct dmatest_info *info, bool run) if (!info->did_init) return; - /* Stop any running test first */ - stop_threaded_test(info); - - /* Run test with new parameters */ - run_threaded_test(info); + run_pending_tests(info); } static int dmatest_run_get(char *val, const struct kernel_param *kp) @@ -1039,7 +1076,8 @@ static int dmatest_run_get(char *val, const struct kernel_param *kp) if (is_threaded_test_run(info)) { dmatest_run = true; } else { - stop_threaded_test(info); + if (!is_threaded_test_pending(info)) + stop_threaded_test(info); dmatest_run = false; } mutex_unlock(&info->lock); @@ -1057,18 +1095,48 @@ static int dmatest_run_set(const char *val, const struct kernel_param *kp) if (ret) { mutex_unlock(&info->lock); return ret; + } else if (dmatest_run && is_threaded_test_pending(info)) { + start_threaded_tests(info); } - if (is_threaded_test_run(info)) - ret = -EBUSY; - else if (dmatest_run) - restart_threaded_test(info, dmatest_run); + mutex_unlock(&info->lock); + + return ret; +} + +static int dmatest_chan_set(const char *val, const struct kernel_param *kp) +{ + struct dmatest_info *info = &test_info; + int ret; + mutex_lock(&info->lock); + ret = param_set_copystring(val, kp); + if (ret) { + mutex_unlock(&info->lock); + return ret; + } + if (!is_threaded_test_run(info) && !is_threaded_test_pending(info)) + stop_threaded_test(info); + add_threaded_test(info); mutex_unlock(&info->lock); return ret; } +static int dmatest_chan_get(char *val, const struct kernel_param *kp) +{ + struct dmatest_info *info = &test_info; + + mutex_lock(&info->lock); + if (!is_threaded_test_run(info) && !is_threaded_test_pending(info)) { + stop_threaded_test(info); + strlcpy(test_channel, "", sizeof(test_channel)); + } + mutex_unlock(&info->lock); + + return param_get_string(val, kp); +} + static int __init dmatest_init(void) { struct dmatest_info *info = &test_info; @@ -1076,7 +1144,8 @@ static int __init dmatest_init(void) if (dmatest_run) { mutex_lock(&info->lock); - run_threaded_test(info); + add_threaded_test(info); + run_pending_tests(info); mutex_unlock(&info->lock); }