From patchwork Fri Sep 21 09:38:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10609443 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 D06C91390 for ; Fri, 21 Sep 2018 09:39:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF3952D8AA for ; Fri, 21 Sep 2018 09:39:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B38302D8B0; Fri, 21 Sep 2018 09:39:41 +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 89CE12D8AA for ; Fri, 21 Sep 2018 09:39:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389489AbeIUP1k (ORCPT ); Fri, 21 Sep 2018 11:27:40 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:56743 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389264AbeIUP1k (ORCPT ); Fri, 21 Sep 2018 11:27:40 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180921093938euoutp01c41c3bd36efd217cb6988be7428c1036~WYNITJrJh1348413484euoutp014 for ; Fri, 21 Sep 2018 09:39:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180921093938euoutp01c41c3bd36efd217cb6988be7428c1036~WYNITJrJh1348413484euoutp014 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1537522778; bh=WWpw09KAj2k3mQafA66FxodafzjyHyFTfkD/9aYiyUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iwBYqWhjf2mpCNuTRWPEeVwp13lgm24Osj1xjcV2R2IWCzkAcvjicSu7hp1ZaT9Ek e6N6TxsFxkYtuyg8L7PwWo0ilBCtEvR1bFMc609wMe0Hb5ObZBWziV1xMIJvNqDASj VOPhfPaqjqeoN74CXQrLmaAnk/Ibv+HjJcMFmCWo= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180921093937eucas1p1a7620d9d53280d9a807d0a0fdecf97e1~WYNHw_TMw1333613336eucas1p1n; Fri, 21 Sep 2018 09:39:37 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id DB.D7.04294.95CB4AB5; Fri, 21 Sep 2018 10:39:37 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20180921093936eucas1p284746b1b112e5684fb6e8554956b04a9~WYNG9eXWE3128031280eucas1p25; Fri, 21 Sep 2018 09:39:36 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20180921093936eusmtrp1d6227803b884d1b91cd9575fe3f7463f~WYNGst3Uw1303713037eusmtrp1E; Fri, 21 Sep 2018 09:39:36 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-74-5ba4bc5956fe Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id EB.E4.04284.85CB4AB5; Fri, 21 Sep 2018 10:39:36 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20180921093936eusmtip15423af43c61a8a22d52a3c703a8ba463~WYNGai13S1156911569eusmtip1R; Fri, 21 Sep 2018 09:39:36 +0000 (GMT) From: Lukasz Luba To: linux-pm@vger.kernel.org, eas-dev@lists.linaro.org Cc: mark.rutland@arm.com, will.deacon@arm.com, Lukasz Luba Subject: [RFC][PATCH 1/3] drivers: base: add test module hackbench speedup Date: Fri, 21 Sep 2018 11:38:52 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537522734-21109-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEIsWRmVeSWpSXmKPExsWy7djPc7qRe5ZEG/z4JGSx4kScxa0GGYvP vUcYLZZev8hk8fLjCRYHVo8189Ywetz+95jZ4+C7PUwenzfJBbBEcdmkpOZklqUW6dslcGUc fjuNtWC9VsXHxRYNjFuVuxg5OSQETCQuL2th6mLk4hASWMEose7Zf0YI5wujxL+mOewgVUIC nxkl3j3whun4cOgVC0R8OaPE6yfOcA2nLu8GSnBwsAnoSexYVQhiigiYSTzaGw5SziwQKbFp 7mKwVmEBL4kFS2+wgZSwCKhKXN/NDjFdTuLmuU5mkDCngLfErC+aIMMlBC6zSZx+0M8IUsMr UCbRePkXE0iNhICLxMwuYYhWYYlXx7dAjZGROD25hwXCLpY427GKDcKukWg/uQOqxlri8PGL rCBjmAU0Jdbv0ocIO0ps+bMGajqfxI23ghC380lM2jadGSLMK9HRJgRRrSGxpecCE4QtJrF8 zTSo4R4Ss+7/YYeEzDxGiZf3zzJPYJSfhbBsASPjKkbx1NLi3PTUYqO81HK94sTc4tK8dL3k /NxNjMCYP/3v+JcdjLv+JB1iFOBgVOLhNVi8OFqINbGsuDL3EKMEB7OSCO++riXRQrwpiZVV qUX58UWlOanFhxilOViUxHn5tNKihQTSE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956b04a9~WYNG9eXWE3128031280eucas1p25@eucas1p2.samsung.com> X-CMS-MailID: 20180921093936eucas1p284746b1b112e5684fb6e8554956b04a9 X-Msg-Generator: CA X-RootMTR: 20180921093936eucas1p284746b1b112e5684fb6e8554956b04a9 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180921093936eucas1p284746b1b112e5684fb6e8554956b04a9 References: <1537522734-21109-1-git-send-email-l.luba@partner.samsung.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is an odd module which speeds up hackbench test. It tries to behave like /drivers/thermal subsystem with a container thermal zone looping over normal thermal zones. Test description: - run hackbench on ARM64 with big.LITTLE: $ ./hackbench 100 process 100 - then load this module $ insmod ./hackbench_speedup.ko - then run hackbench once again $ ./hackbench 100 process 100 - unload the module, you can run the hackbench after that and the result will be the same (shorter time) $ rmmod hackbench_speedup Some results captured on my ARM64 (4big + 4LITTLE) machine: root@draco:~# /root/devlib-target/hackbench 100 process 100 Running with 100*40 (== 4000) tasks. Time: 11.207 root@draco:~# /root/devlib-target/hackbench 100 process 100 Running with 100*40 (== 4000) tasks. Time: 11.029 root@draco:~# /root/devlib-target/hackbench 100 process 100 Running with 100*40 (== 4000) tasks. Time: 11.452 root@draco:~# /root/devlib-target/hackbench 100 process 100 Running with 100*40 (== 4000) tasks. Time: 10.522 root@draco:~# /root/devlib-target/hackbench 100 process 100 Running with 100*40 (== 4000) tasks. Time: 12.044 root@draco:~# /root/devlib-target/hackbench 100 process 100 Running with 100*40 (== 4000) tasks. Time: 11.532 root@draco:~# root@draco:~# insmod ./hackbench_speedup.ko root@draco:~# root@draco:~# /root/devlib-target/hackbench 100 process 100 Running with 100*40 (== 4000) tasks. Time: 6.474 root@draco:~# /root/devlib-target/hackbench 100 process 100 Running with 100*40 (== 4000) tasks. Time: 6.477 root@draco:~# /root/devlib-target/hackbench 100 process 100 Running with 100*40 (== 4000) tasks. Time: 6.294 root@draco:~# /root/devlib-target/hackbench 100 process 100 Running with 100*40 (== 4000) tasks. Time: 6.237 Signed-off-by: Lukasz Luba --- drivers/base/hackbench_speedup.c | 148 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 drivers/base/hackbench_speedup.c diff --git a/drivers/base/hackbench_speedup.c b/drivers/base/hackbench_speedup.c new file mode 100644 index 0000000..952df47 --- /dev/null +++ b/drivers/base/hackbench_speedup.c @@ -0,0 +1,148 @@ + + +#define pr_fmt(fmt) "HACKBENCH: " fmt + +#include +#include +#include +#include + +#define POLLING_DELAY 1000 + +struct task_data { + int id; + struct delayed_work wq; + struct mutex lock; + int polling_delay; + struct list_head node; + struct list_head subtasks; + bool container; + int (*get_status)(struct task_data *td); +}; + + +static LIST_HEAD(tasks_list); +static DEFINE_MUTEX(tasks_list_lock); + + +static int task_container_status(struct task_data *master) +{ + struct task_data *td; + + pr_info("container task status\n"); + + if (!master || !master->container) + return -EINVAL; + + if (list_empty(&master->subtasks)) + return -EINVAL; + + list_for_each_entry(td, &master->subtasks, subtasks) { + mutex_lock(&td->lock); + /* get status */ + mutex_unlock(&td->lock); + } + + + return 0; +} + +static int task_status(struct task_data *td) +{ + pr_info("single task status\n"); + + return 0; +} + +static void task_status_check(struct work_struct *work) +{ + int ret; + struct task_data *td = container_of(work, struct task_data, wq.work); + + if (!td->get_status) + return; + + mutex_lock(&td->lock); + ret = td->get_status(td); + mutex_unlock(&td->lock); + + mod_delayed_work(system_freezable_wq, &td->wq, + msecs_to_jiffies(POLLING_DELAY)); +} + +static int __init task_status_init(void) +{ + int i; + struct task_data *task; + struct task_data *master; + int total_tasks = 4; + + task = kzalloc(sizeof(struct task_data), GFP_KERNEL); + if (!task) + return -ENOMEM; + + INIT_LIST_HEAD(&task->subtasks); + task->container = true; + + mutex_lock(&tasks_list_lock); + list_add_tail(&task->node, &tasks_list); + mutex_unlock(&tasks_list_lock); + + INIT_DELAYED_WORK(&task->wq, task_status_check); + + master = task; + master->get_status = task_container_status; + + for (i = 1; i < total_tasks; i++) { + + task = kzalloc(sizeof(struct task_data), GFP_KERNEL); + if (!task) + goto clean; + + mutex_lock(&tasks_list_lock); + list_add_tail(&task->node, &tasks_list); + mutex_unlock(&tasks_list_lock); + + INIT_DELAYED_WORK(&task->wq, task_status_check); + + list_add_tail(&task->subtasks, &master->subtasks); + + task->get_status = task_status; + + mod_delayed_work(system_freezable_wq, &task->wq, + msecs_to_jiffies(POLLING_DELAY)); + } + + mod_delayed_work(system_freezable_wq, &master->wq, + msecs_to_jiffies(POLLING_DELAY)); + + return 0; + +clean: + return -ENOMEM; +} + + +static void __exit task_exit(void) +{ + struct task_data *td, *tmp; + + list_for_each_entry_safe(td, tmp, &tasks_list, node) { + mutex_lock(&td->lock); + cancel_delayed_work(&td->wq); + mutex_unlock(&td->lock); + + list_del(&td->node); + kfree(td); + } + + mutex_destroy(&tasks_list_lock); +} + +module_init(task_status_init); +module_exit(task_exit); + +MODULE_AUTHOR("Lukasz Luba "); +MODULE_DESCRIPTION("Test module which shows speed up in hackbench"); +MODULE_VERSION("1.0"); +MODULE_LICENSE("GPL"); From patchwork Fri Sep 21 09:38:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10609445 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 DD6F01390 for ; Fri, 21 Sep 2018 09:39:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD90F2D8AA for ; Fri, 21 Sep 2018 09:39:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1AE52D8B0; Fri, 21 Sep 2018 09:39:43 +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 5106D2D8AA for ; Fri, 21 Sep 2018 09:39:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389542AbeIUP1n (ORCPT ); Fri, 21 Sep 2018 11:27:43 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:50887 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389264AbeIUP1n (ORCPT ); Fri, 21 Sep 2018 11:27:43 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180921093940euoutp0203d51e68650ba6711bf9744ffee8dc61~WYNK5mW900095000950euoutp02I for ; Fri, 21 Sep 2018 09:39:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180921093940euoutp0203d51e68650ba6711bf9744ffee8dc61~WYNK5mW900095000950euoutp02I DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1537522781; bh=DwoWt/8HDS7RYG1rzzKsmj+aMcFO9O5uFv21NVq+RVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qQ+bbABA89KkujLXJB7FfUYUo7NhazMtKe0GBYoaHkTzVq77flKgpZJrtUkrUWlCv FmxKgM297NjF/xg1Wzg5HzTp9A0bakZiu139CSC+lI6MgurtyWOCPn4exAJp1oPU9o BkR6t36KVyHGtDmpigbPv0HvvJqgQkBc5wN2rUnw= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180921093940eucas1p1236b792d055567cfe8e43ac16fb66121~WYNKYc2K01334713347eucas1p1x; Fri, 21 Sep 2018 09:39:40 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id F5.DA.04441.C5CB4AB5; Fri, 21 Sep 2018 10:39:40 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20180921093939eucas1p27806b2e49806049b1a1543da43cebc90~WYNJm16qO2748827488eucas1p2J; Fri, 21 Sep 2018 09:39:39 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20180921093939eusmtrp2edd24d1f196fcc4a7680cc77a7fe2f21~WYNJWKzdb3245832458eusmtrp2l; Fri, 21 Sep 2018 09:39:39 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-ed-5ba4bc5ca65f Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 10.82.04128.B5CB4AB5; Fri, 21 Sep 2018 10:39:39 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20180921093938eusmtip1865141442c9b9a2ba538a81a1b09e0b4~WYNJC1htH1109711097eusmtip1B; Fri, 21 Sep 2018 09:39:38 +0000 (GMT) From: Lukasz Luba To: linux-pm@vger.kernel.org, eas-dev@lists.linaro.org Cc: mark.rutland@arm.com, will.deacon@arm.com, Lukasz Luba Subject: [RFC][PATCH 2/3] drivers: base: add hackbench_speedup as a module Date: Fri, 21 Sep 2018 11:38:53 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537522734-21109-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCIsWRmVeSWpSXmKP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y1KL9O0S9DJO7b7MVnCNueJryxq2BsYm5i5G Tg4JAROJHQsPAdlcHEICSxklGr4tYIJIiElM2redHcIWlvhzrYsNougTo8SWjtlACQ4ONgE9 iR2rCkFqRAQsJKYcesoGYjMLREtc33sabIGwgJfE0uV7mUDKWQRUJaZOqwcxeYHCW5doQkyX k7h5rpMZJMwp4C0x64smiCkEVHF6vekERr4FjAyrGEVSS4tz03OLjfSKE3OLS/PS9ZLzczcx AgNx27GfW3Ywdr0LPsQowMGoxMNrsHhxtBBrYllxZe4hRgkOZiUR3n1dS6KFeFMSK6tSi/Lj i0pzUosPMZoCHTSRWUo0OR8YJXkl8YamhuYWlobmxubGZhZK4rznDSqjhATSE0tSs1NTC1KL YPqYODilGhgP2rJ/zbj/VJGPq+x+tPXFo4a/uNkM9lcvdxPd+cnksGPUwksst19db5/4L0is ccrR8DVdN8I7bnQuTFuxunxu18eanZv/atQ2xOxIua8z+b/+xMb9mjx+TydkzJ6xjEsuoP67 lfub48oPNxZIqh9L0rLxivis0Lgyetrev4Kar1y011gdsNirxFKckWioxVxUnAgA9GTBgVoC AAA= Message-Id: <20180921093939eucas1p27806b2e49806049b1a1543da43cebc90~WYNJm16qO2748827488eucas1p2J@eucas1p2.samsung.com> X-CMS-MailID: 20180921093939eucas1p27806b2e49806049b1a1543da43cebc90 X-Msg-Generator: CA X-RootMTR: 20180921093939eucas1p27806b2e49806049b1a1543da43cebc90 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180921093939eucas1p27806b2e49806049b1a1543da43cebc90 References: <1537522734-21109-1-git-send-email-l.luba@partner.samsung.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch is only for testing odd behavior of hackbench. Signed-off-by: Lukasz Luba --- drivers/base/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/base/Makefile b/drivers/base/Makefile index e32a524..d25afa5 100644 --- a/drivers/base/Makefile +++ b/drivers/base/Makefile @@ -30,3 +30,4 @@ obj-y += test/ ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG +obj-m += hackbench_speedup.o From patchwork Fri Sep 21 09:38:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10609447 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 5B15A1390 for ; Fri, 21 Sep 2018 09:39:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BAD02D8AC for ; Fri, 21 Sep 2018 09:39:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 403D62D8CA; Fri, 21 Sep 2018 09:39:45 +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 D953A2D8AC for ; Fri, 21 Sep 2018 09:39:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389517AbeIUP1p (ORCPT ); Fri, 21 Sep 2018 11:27:45 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:50898 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389264AbeIUP1o (ORCPT ); Fri, 21 Sep 2018 11:27:44 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180921093943euoutp02fc54c452e96b4936007660184e7a7aa5~WYNM3Pe040105501055euoutp025 for ; Fri, 21 Sep 2018 09:39:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180921093943euoutp02fc54c452e96b4936007660184e7a7aa5~WYNM3Pe040105501055euoutp025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1537522783; bh=HTMjZyYn7hod5lm8cDKym5dlHjfBQwKrFFgF5UZ31GA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lzNMOTZxYv03Wn8FTCubwDPWLfnrXtlctmNAFxyWFjDjqXa1VYVdu/x/XaewWTftG I0uNbeg51QE8yZOqJ0VRwo9bHeRv+kyizacZ2PteMH7l+OdgnT1N3zlNKAARSegfiC sj6IH+Jix47Nlr7KWkdXg4l4dJ4Ct5ZPs+tW5FZ0= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180921093942eucas1p1ba9846b2db3f42c36706c3c799919635~WYNMZ19u41335813358eucas1p1l; Fri, 21 Sep 2018 09:39:42 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 5B.DA.04441.E5CB4AB5; Fri, 21 Sep 2018 10:39:42 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20180921093941eucas1p2601c2a7792d2b62d96ca540ba88c31e6~WYNLiXOM53128031280eucas1p2E; Fri, 21 Sep 2018 09:39:41 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20180921093941eusmtrp17077902c16afeeb2cdf1aa64bb91ac60~WYNLRrNBF1303713037eusmtrp1O; Fri, 21 Sep 2018 09:39:41 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-f1-5ba4bc5eac77 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 00.F4.04284.D5CB4AB5; Fri, 21 Sep 2018 10:39:41 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20180921093941eusmtip19674ce24f8769e0d8825b231a2ccf2c0~WYNK87CT-1156311563eusmtip1U; Fri, 21 Sep 2018 09:39:40 +0000 (GMT) From: Lukasz Luba To: linux-pm@vger.kernel.org, eas-dev@lists.linaro.org Cc: mark.rutland@arm.com, will.deacon@arm.com, Lukasz Luba Subject: [RFC][PATCH 3/3] drivers: hackbench_speedup: remove locking Date: Fri, 21 Sep 2018 11:38:54 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537522734-21109-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGIsWRmVeSWpSXmKPExsWy7djPc7pxe5ZEG8z9Imix4kScxa0GGYvP vUcYLZZev8hk8fLjCRYHVo8189Ywetz+95jZ4+C7PUwenzfJBbBEcdmkpOZklqUW6dslcGW0 Xp7PXnCZo2LDngbGBsbZ7F2MnBwSAiYSTauagWwuDiGBFYwSN57OYANJCAl8YZR4sVkVIvGZ UeLCnh0sMB2tNz6wQiSWM0rs234bqh2oY+nK3UBVHBxsAnoSO1YVgpgiAmYSj/aGg/QyC0RK bJq7GGyOsICLxKuOp2DLWARUJb5t2sIIMV9O4ua5TmaQVk4Bb4lZXzRBpksIXGaTeHJnK1g9 r0CZxO6ln5kg6l0k3i7YANUrLPHq+Baoz2QkTk/ugbq5WOJsxyo2CLtGov3kDqgaa4nDxy+y guxiFtCUWL9LHyLsKLH300EmkLCEAJ/EjbeCENfzSUzaNp0ZIswr0dEmBFGtIbGl5wLUMWIS y9dMgxruIXH51Vo2SNjMY5S4t2kuywRG+VkIyxY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MyEMoNWlqRz/zfLxRbe 47r3+p+qvq9Hr4x0376rs/R26cpruV8xfa2skNoWFVF156GqphJLcUaioRZzUXEiAKWfHSZc AgAA Message-Id: <20180921093941eucas1p2601c2a7792d2b62d96ca540ba88c31e6~WYNLiXOM53128031280eucas1p2E@eucas1p2.samsung.com> X-CMS-MailID: 20180921093941eucas1p2601c2a7792d2b62d96ca540ba88c31e6 X-Msg-Generator: CA X-RootMTR: 20180921093941eucas1p2601c2a7792d2b62d96ca540ba88c31e6 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180921093941eucas1p2601c2a7792d2b62d96ca540ba88c31e6 References: <1537522734-21109-1-git-send-email-l.luba@partner.samsung.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When there is no call to mutex_unlock(), there is not speed-up. Signed-off-by: Lukasz Luba --- drivers/base/hackbench_speedup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/base/hackbench_speedup.c b/drivers/base/hackbench_speedup.c index 952df47..f8b3c40 100644 --- a/drivers/base/hackbench_speedup.c +++ b/drivers/base/hackbench_speedup.c @@ -38,9 +38,9 @@ static int task_container_status(struct task_data *master) return -EINVAL; list_for_each_entry(td, &master->subtasks, subtasks) { - mutex_lock(&td->lock); + /* mutex_lock(&td->lock); */ /* get status */ - mutex_unlock(&td->lock); + /* mutex_unlock(&td->lock); */ } @@ -62,9 +62,9 @@ static void task_status_check(struct work_struct *work) if (!td->get_status) return; - mutex_lock(&td->lock); + /* mutex_lock(&td->lock); */ ret = td->get_status(td); - mutex_unlock(&td->lock); + /* mutex_unlock(&td->lock); */ mod_delayed_work(system_freezable_wq, &td->wq, msecs_to_jiffies(POLLING_DELAY));