Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5091502ybl; Mon, 9 Dec 2019 23:47:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwi6MbJdhvLZdAytRGrfDhzn0270AYgV4ig/6wDhPZ/PGyaUAwMDjnt4DOKjLB0O65Afhvb X-Received: by 2002:aca:c7cb:: with SMTP id x194mr2893596oif.157.1575964076182; Mon, 09 Dec 2019 23:47:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575964076; cv=none; d=google.com; s=arc-20160816; b=uoZDnNi+KS/PyXPSO0HAge+Fo91/ygESAty4VL8bFIrQEeKvPgdUHwysfZcM2k3+dm sSAF63RYPw1EnD7tW5zwQr8T/f1aDXJLFmy09o7/GMg2Ora19YknItlhTFZm+InSwY/R U9BLdul2CtKH/0jR3walWycbEz95Am4ROmwMCqQV6ztwvw3viDU5c3n48AmLnl3nPAxq UMNuSe9uLx+d4HhK/z7Mlh/Eek6KEZ/yNB+rYV7DZQazeWcayecJgsRfCmacnUKqG0LP YDpuizSYhip620pVK+/kvPJb1XnjLLdmyotQibN4SZmvko76rDDRlYNGA+0m4bvi1ink 1E4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:cc:to:subject :dkim-signature:dkim-filter; bh=ai8509VNNNtg7PGRnPyCmwNZWYdJnA3gZTpwHNd5lps=; b=pCLFeXZhRetNXgAj4AO4r056m+HuXs3L1Cfxv6biRcCtZoGXxT301FmSJotO9DhN0y 0THTC5ldbyS29M+V6ZroO3c65LhNcuvbRisVDXScXIPhhR7A08HZkamV7dAbRiEn6h+I Jj3rpqH7p46LJ1XtJ2hy/exo5pO4pdAWad7/EpSssXleVcxb2kYsgnH0AsOPzI8tqeHV 8F99qStluEJV2qKiy5Iu4fsfQuLUwYkVlzsSOOL0nDhEQcbwk4iWg0f5C1CZhBdylO0E yoAGcVzjesCHOuAPrkZQHBe58NNuCn8MjxsU1Zowl/2ilNYM7TADuvt/mFfzI0F/rMWi KzRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=qAyRZKwW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si1455585otg.90.2019.12.09.23.47.43; Mon, 09 Dec 2019 23:47:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=qAyRZKwW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727310AbfLJHrB (ORCPT + 99 others); Tue, 10 Dec 2019 02:47:01 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:12786 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727143AbfLJHrB (ORCPT ); Tue, 10 Dec 2019 02:47:01 -0500 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20191210074656epoutp042872043f52651f808314c6e8a11e15d3~e8uxEqQjX0307303073epoutp047 for ; Tue, 10 Dec 2019 07:46:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20191210074656epoutp042872043f52651f808314c6e8a11e15d3~e8uxEqQjX0307303073epoutp047 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1575964016; bh=ai8509VNNNtg7PGRnPyCmwNZWYdJnA3gZTpwHNd5lps=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=qAyRZKwWEBlvZ/McDot32HUDVmY+bYtQ3kE7gefhugoVHN8FiJ1610vgzraw+K6TV JiJVZJSLFh7ggywev9cSU4IZ+gatjqhNgq921gJnxOh0ZikQsXbo/Jdj3/B5t/5+Ef KxbttGHfcRf38Cvzq4eKWK/pBayOGevBJreN4jMM= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20191210074655epcas1p13b9d26ccfbc8479be65da2b76c65eb9c~e8uwypRfr2849828498epcas1p1k; Tue, 10 Dec 2019 07:46:55 +0000 (GMT) Received: from epsmges1p4.samsung.com (unknown [182.195.40.158]) by epsnrtp1.localdomain (Postfix) with ESMTP id 47XBwD19bgzMqYm3; Tue, 10 Dec 2019 07:46:52 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 60.53.48019.A6D4FED5; Tue, 10 Dec 2019 16:46:50 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p2.samsung.com (KnoxPortal) with ESMTPA id 20191210074649epcas1p2a8c7a93753c45988558fe7e949758a70~e8uq3W_6X2887328873epcas1p2B; Tue, 10 Dec 2019 07:46:49 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20191210074649epsmtrp1f117c9a11cc132cc00183cff65148b8a~e8uq2pLnT2121421214epsmtrp1p; Tue, 10 Dec 2019 07:46:49 +0000 (GMT) X-AuditID: b6c32a38-23fff7000001bb93-73-5def4d6a1565 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 35.68.10238.96D4FED5; Tue, 10 Dec 2019 16:46:49 +0900 (KST) Received: from [10.113.221.102] (unknown [10.113.221.102]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20191210074649epsmtip25dbe9c54d08beaf9b6c93e0d189400a2~e8uqmtnDd2402124021epsmtip2m; Tue, 10 Dec 2019 07:46:49 +0000 (GMT) Subject: Re: [PATCH 1/4] PM / devfreq: reuse system workqueue machanism To: Kamil Konieczny Cc: Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Kyungmin Park , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Marek Szyprowski , MyungJoo Ham From: Chanwoo Choi Organization: Samsung Electronics Message-ID: <9926005a-c030-a823-fd65-6b8578e39218@samsung.com> Date: Tue, 10 Dec 2019 16:53:15 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: <6ead2998-ebe1-704b-7d89-3b0cf8beca70@samsung.com> Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA01Se0hTcRTut7vdXZfLX/N1WlDrRoTG0quurpXLnjOyEgKDyOziLrrci90Z WREV5rP3SxtagyjLHpZZLSsEG4VSWViRlVBkZOUDzB4SPXa9i/zv+33nO3znO79DERovqaUs djfvsnNWmlTJr9+N0es3rhjIivdVhrJXquoVrHewSsG2t19Wsg939SrZjqZqkv2y14/Yi/4u Jftq51kylUprqCsj0/Y11qG0Lw2TMoi1+fPyeM7Mu3S8PcdhtthzU+jlq7MXZRtmxTN6Jpmd TevsnI1PoRenZ+iXWqyBCWjdJs5aEKAyOEGg44zzXI4CN6/LcwjuFJp3mq3OZOdMgbMJBfbc mTkO2xwmPj7BEBBuyM/7tbtd5hyK3rzvQR/agZ6Fl6MQCnASfC37hsqRitJgH4J3f9qU0mMQ wfDz1mDlGwLvb7+8HFEjLSWeUIm/g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vEpQtLnHryXwmCFteYvvbOcwT GIVnIWmfhaRlFpKWWUhaFjCyrGKUTC0ozk3PLTYsMMxLLdcrTswtLs1L10vOz93ECI4hLc0d jJeXxB9iFOBgVOLhXeDwLlaINbGsuDL3EKMEB7OSCO/xNqAQb0piZVVqUX58UWlOavEhRmkO FiVx3qd5xyKFBNITS1KzU1MLUotgskwcnFINjLMXdUSvef8/41329ojlSy8b7Cwrzv4bovRP /9ckoe/hX/41vL6kf8d17lobvh3Pn9x6cJpzis3ei/2Bz/P/8qlPeu/Gdks3YdGZwuzjyZ17 W3Nm2Yhae2zhb8r6r/FDkyfk1pyi9Sl7mlKfn5QK7ki7KlkfMK03sWXDHq+At8st18hODJmg EKrEUpyRaKjFXFScCADfdg1UnQIAAA== X-CMS-MailID: 20191210074649epcas1p2a8c7a93753c45988558fe7e949758a70 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20191209144441eucas1p16945780c1a1ff3302a233414ae6aace2 References: <20191209144425.13321-1-k.konieczny@samsung.com> <20191209144425.13321-2-k.konieczny@samsung.com> <2eab8a20-1701-94dc-410a-bb072a5f5b4e@samsung.com> <6ead2998-ebe1-704b-7d89-3b0cf8beca70@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/10/19 4:28 PM, Kamil Konieczny wrote: > On 10.12.2019 02:41, Chanwoo Choi wrote: >> On 12/9/19 11:44 PM, Kamil Konieczny wrote: >>> There is no need for creating another workqueue, it is enough >>> to reuse system_freezable_power_efficient one. >>> >>> Signed-off-by: Kamil Konieczny >>> --- >>> drivers/devfreq/devfreq.c | 6 +++--- >>> 1 file changed, 3 insertions(+), 3 deletions(-) >>> >>> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c >>> index 46a7ff7c2994..955949c6fc1f 100644 >>> --- a/drivers/devfreq/devfreq.c >>> +++ b/drivers/devfreq/devfreq.c >>> @@ -1532,11 +1532,11 @@ static int __init devfreq_init(void) >>> return PTR_ERR(devfreq_class); >>> } >>> >>> - devfreq_wq = create_freezable_workqueue("devfreq_wq"); >>> + devfreq_wq = system_freezable_power_efficient_wq; >> >> It affect the behaviors of whole device drivers using devfreq subsystem. >> It is not good to change the workqueue type without any reasonable >> data like experiment result, power-consumption result and performance >> result for almost device drivers using devfreq subsystem. >> >> Are there any problem or any benefit to change workqueue type? > > The workqueue is freezable with additional capability of 'power_efficient', > it is already developed by linux community so why not reuse it ? As you agreed below, why don't you suggest the any reasonable test result with this patch? As I commented, it affects the all device drivers. It is necessary to suggest the test result on multiple scenarios in order to prevent the any power-consumption and performance regression. It is not easy to change them without any data. Frankly, if you test almost scenarios and suggest the reasonable result that anyone can understand, like there are never difference between "create_freezable_workqueue("devfreq_wq");" and system_freezable_power_efficient_wq. But you don't suggest any data. - The original devfreq_wq include the only work related to devfreq. - system_freezable_power_efficient_wq include the all works registered from both other subsystem and device drivers in linux kernel. > >> Actually, it is not simple to change the like just one device driver >> because devfreq subsytem is very important for both performance >> and power-consumption. > > I agree. The name of this wq promises what you want, both freezable > and power efficiency. > >> If you hope to change the feature related to both performance >> and power-consumption, please suggest the reasonable data >> with fundamental reason. >> >> So, I can't agree it. >> >> >>> if (!devfreq_wq) { >>> class_destroy(devfreq_class); >>> - pr_err("%s: couldn't create workqueue\n", __FILE__); >>> - return -ENOMEM; >>> + pr_err("%s: system_freezable_power_efficient_wq isn't initialized\n", __FILE__); >>> + return -EINVAL; >>> } >>> devfreq_class->dev_groups = devfreq_groups; >>> >>> >> >> > -- Best Regards, Chanwoo Choi Samsung Electronics