All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kamil Konieczny <k.konieczny@samsung.com>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	MyungJoo Ham <myungjoo.ham@samsung.com>
Subject: Re: [PATCH 1/4] PM / devfreq: reuse system workqueue machanism
Date: Tue, 10 Dec 2019 10:28:28 +0100	[thread overview]
Message-ID: <1e6f7bcd-78ef-17e2-c470-a546d58c70fa@samsung.com> (raw)
In-Reply-To: <9926005a-c030-a823-fd65-6b8578e39218@samsung.com>

Hi Chanwoo,

On 10.12.2019 08:53, Chanwoo Choi wrote:
> 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 <k.konieczny@samsung.com>
>>>> ---
>>>>  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.

I agree about tests data needed for deciding about change. As I already wrote in other
letter, I do not have such tests procedures, so if you have them and you may share
them with me or Marek, I can run them and gather tests results.

> - 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.

I do not know that good system wq, devfreq_wq have only one work item so
imho it is not beneficial to use separate wq. Seperate wq can be good
during debugging problems with wq.

>>> 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,
Kamil Konieczny
Samsung R&D Institute Poland


  reply	other threads:[~2019-12-10  9:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20191209144440eucas1p10fc74a8cbc07df72bf1bcd52a7260c42@eucas1p1.samsung.com>
2019-12-09 14:44 ` [PATCH 0/4] PM / devfreq: add possibility for delayed work Kamil Konieczny
     [not found]   ` <CGME20191209144441eucas1p16945780c1a1ff3302a233414ae6aace2@eucas1p1.samsung.com>
2019-12-09 14:44     ` [PATCH 1/4] PM / devfreq: reuse system workqueue machanism Kamil Konieczny
2019-12-10  1:41       ` Chanwoo Choi
2019-12-10  7:28         ` Kamil Konieczny
2019-12-10  7:53           ` Chanwoo Choi
2019-12-10  9:28             ` Kamil Konieczny [this message]
2019-12-10  9:42               ` Chanwoo Choi
     [not found]   ` <CGME20191209144441eucas1p2ccd371e5861e8c0a3948cdc6640ad0d5@eucas1p2.samsung.com>
2019-12-09 14:44     ` [PATCH 2/4] PM / devfreq: add possibility for delayed work Kamil Konieczny
2019-12-09 19:27       ` Matthias Kaehlcke
2019-12-10 10:15         ` Kamil Konieczny
2019-12-10  1:47       ` Chanwoo Choi
2019-12-10  9:03         ` Kamil Konieczny
2019-12-10  9:25           ` Chanwoo Choi
2020-01-20 14:20           ` Kamil Konieczny
     [not found]   ` <CGME20191209144442eucas1p1e4f5cf4a1716262e2b6715fb41876f91@eucas1p1.samsung.com>
2019-12-09 14:44     ` [PATCH 3/4] PM / devfreq: Kconfig: add DEVFREQ_DELAYED_TIMER option Kamil Konieczny
2019-12-09 19:34       ` Matthias Kaehlcke
2019-12-10  9:39         ` Kamil Konieczny
2019-12-10  1:54       ` Chanwoo Choi
     [not found]   ` <CGME20191209144442eucas1p214c553519b7a9d3d005802984bc6fb31@eucas1p2.samsung.com>
2019-12-09 14:44     ` [PATCH 4/4] PM / devfreq: use delayed work if DEVFREQ_DELAYED_TIMER set Kamil Konieczny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e6f7bcd-78ef-17e2-c470-a546d58c70fa@samsung.com \
    --to=k.konieczny@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=myungjoo.ham@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.