From patchwork Fri Aug 24 12:15:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seraj Alijan X-Patchwork-Id: 10575293 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 10BF5112E for ; Fri, 24 Aug 2018 12:16:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01BFE2A9EB for ; Fri, 24 Aug 2018 12:16:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E77BB2B8AD; Fri, 24 Aug 2018 12:16:15 +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 405F12A9EB for ; Fri, 24 Aug 2018 12:16:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726802AbeHXPui (ORCPT ); Fri, 24 Aug 2018 11:50:38 -0400 Received: from mail-eopbgr30058.outbound.protection.outlook.com ([40.107.3.58]:20832 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726513AbeHXPui (ORCPT ); Fri, 24 Aug 2018 11:50:38 -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=1KVVqfrT6/Hg/a7EEXgVEKG4QkNXlLspOJ4FHEmdW/q4MMP9VM4F83/og2C/mBYM/Ie0I5r9T6DS3cRMu8JvBrWejCdXnKmDP32lqr2M4Iypa8uCu0F1UiXcVC+xdIyNVQkRl/v8SiVpZ+1dmwcnMwWSlppWuctRf/wMa7y2sAw= 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 DB6P191MB0248.EURP191.PROD.OUTLOOK.COM (2603:10a6:4:8e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.14; Fri, 24 Aug 2018 12:16:09 +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 1/5] dmaengine: dmatest: Add support for multi channel testing Date: Fri, 24 Aug 2018 13:15:37 +0100 Message-Id: <1535112941-7169-2-git-send-email-seraj.alijan@sondrel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535112941-7169-1-git-send-email-seraj.alijan@sondrel.com> References: <1535112941-7169-1-git-send-email-seraj.alijan@sondrel.com> MIME-Version: 1.0 X-Originating-IP: [195.88.9.101] X-ClientProxiedBy: MR2P264CA0045.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500::33) To DB6P191MB0248.EURP191.PROD.OUTLOOK.COM (2603:10a6:4:8e::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c939e7ce-df64-43ff-b33e-08d609bb606d X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(5600074)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020);SRVR:DB6P191MB0248; X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gvzFG8hElCsC9DWTwRGKsLuPvXIXjY69J1Ncf76mP51nUruJhRmgUN4aCjboaf3HMBsPiYtpl4p164DtUuAOEGiYjEPBu6t5PVbPdoThf2QcB/Q6u1MoceKzeNv6/fOKn54IYgli9wrkKkZzTCVZbQTG0kpkNTNeB66z4ArwKyxPo+PoDPCS9jBMYxH9epz7jGmq+9GVZOGQHPyYeDb6pmIvsBFodgDYo2qy0tUw+dvBGoEFj15YWa7oFqCl6bJOP8HstYMOD1ZFxKkw5mujS6DL/HSsB2dA0DA+0HC1BCg292/4letAMzR9gCf7W6hOHyA7EfFPe0DlmNHmHt5RO9tbEpibp3u37/1GiC2X7vxkje7Zu9VCz4gJBESn1v6rJRY;4:Ci0HqxvU4GSCUwFK841NMvfzvftU2a5R8ajODk5uSlavNsAcH7sRBL1wYBSbYuDIfMjECXdScJEdnc+zw6Ms1hIF9HbJUSl4JrxqMwJlTXzba+kXh5rD7AMVSat0n357eepukr7dhZ/7A8Avhul0Wwp9wGV3IG/xoqcSHSn9u3bnfgwidPbLnY5phuJQRAVhXBQ/wd1flgxft5VqxhWblsDEIqmjJsTiB9TnVkTOz+a9vOVIOmurWjam3T0K0BroDVn5BGpOXwunLU5cYRO0wA== 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)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699016);SRVR:DB6P191MB0248;BCL:0;PCL:0;RULEID:;SRVR:DB6P191MB0248; X-Forefront-PRVS: 07749F8C42 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(346002)(396003)(376002)(136003)(366004)(39840400004)(189003)(199004)(6486002)(386003)(476003)(956004)(11346002)(52116002)(50466002)(51416003)(2906002)(36756003)(2616005)(5660300001)(48376002)(446003)(186003)(16526019)(44832011)(26005)(6506007)(76176011)(2361001)(68736007)(14444005)(107886003)(106356001)(25786009)(47776003)(66066001)(8936002)(486006)(53936002)(16586007)(105586002)(478600001)(6512007)(50226002)(6666003)(4326008)(316002)(305945005)(7736002)(81156014)(97736004)(8676002)(2351001)(6116002)(3846002)(6916009)(81166006)(16060500001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6P191MB0248;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;DB6P191MB0248;23:sjkT+1jLF9wQ1Ydw+ZfOzDZcgNshsXtc8ZHZZpeb0VeNp6iVPBZEXMQvGFLIFEEYW3tA68+yJk5d0rlYq1dAe4z3sdap4aUqwPCNV3xb7rDwev/GJjZnuBDVzXJKgQlp4+JB7+wM/KWbPqOOliDl1U+jNi9uzKU+mG0bAj45IlJHNrulEt0/z8eoezcZDELRZ7t44vTpl+jewGNPzoSApn3o/wWspOY2FQYm//zTQsFHmr/I+MeEMKA8cBAnBIh1dvXD9bSKo9yxxEasi9ADmH7EyI1c+Yt2TrQ8CnRQpUhCoTI8x+r5wWMpj2S2nxw7SfnaMRz1uYVmW67u7l6uMHjINWHDVuKZyAdAOKuDMcun9Oz1pdArdJevGxYZf3ZeFo2v2aT6jDKgNy3n7XrszxGFCgpz1vWXblW/rqiZ8qxuZJQrPaxFZcH6KTF4MWKddJKgVxwUw9XiX6gSYHdoh/+H7ZbcJ4+D0oUSIHCYGOczs7opHo4uYa4kk/z+NGlVJN51IPViRFTutWnnhF7uI86/Lja6E8HgZ0fdvtlNMoxr3xpcEyQTNFihy5Esv5n6x7yN6Ch7E3DhLXZ/dIqhFtd1lTbiv3uLeBungfM8bLveSCquUsbVGrdfRhzQUOxzmR2AX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ZodTq0WGGzOuweyqtRGSIHX+OjYarK7w5Q8lD2jtOp2+DBatXsBb9pUoQ26TQdjFIFohwSJezVr+sYtTLC8hxcWNcE74cBm0+4COFLBbhq/EcO/aaB6iRg4htCsKZZpHnjmYTQ8fuVJ+hSb26Y4NQf8SIS89D73YBRHDm4hcZBgMBdS2X4JBq31aHTT2Z+HmBkf5axmvqZ9FqWszt3nMr4dWopEoVnNqxWlEgwBslyQgL6ogkbGK3aWCDOLd0XiEAh4P8WOapCZ6ZZmX50Nlb54cMmJokuhZgHfyPFs79Xr95mRG7x+HScQtjUg6catj1/69xLNw3NvBq/9mHo1hsKfPkpTcho04Aabhnut16rErGFKyQ6/bHJKEowl4uSdWHktaO4/S4qXYb/MGN9MS67x+5ZVmhsIemdU9UGmiUQPm8Sd/FnEwyL8kMDV97BA==;5:arFSp/dl20VkRKE9mZY56RT+vq8SICSKKCJ7vzZMij+C/c8HoeQmw/qQcOZ+g76RaEg6qqAM2i8ktY+gVeoaO14rmLhn6+CRxF2/1L7/KiOMLpfCIvgCSf7jcPSbLkjI/LV5mfTZJ0V4kZSnkDIw85CK5vHDXWL/huazec9QNws=;7:UOpz4aZShW6yu2sUPlJa3tZK5pHRgZjAXgJUE/UNCwU2DVcY8II+BpAlkm5tSqBJ6eJ1WBXDC5j34GN8wOTLQclotUzr94JWhk1ObGjFQNIBJvW38ulLnENcr+sZJfrHAAeZH+zLFr3eXBLzT1Z7S9zvmn36qMEqgo1oe3SIRRkm9IMCw/SHveQD0Ixd0NoTRRhnoIOZGKBARMRgzOBSx88j0nQ8RjUpzszY4lAVJZioDRk5zdq+kjMAyeury2tf SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sondrel.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2018 12:16:09.4705 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c939e7ce-df64-43ff-b33e-08d609bb606d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4faa3872-698e-4896-80ec-148b916cb1ba X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6P191MB0248 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); }