Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp446245ybt; Wed, 8 Jul 2020 03:55:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzi36iqDoxpzQUPYotknvfo2wvxUj6Ei9QN9Dw8EYgyFVLSvbmhfG+zF8WxLRksiQHVneFC X-Received: by 2002:a17:907:20f8:: with SMTP id rh24mr30580120ejb.309.1594205719994; Wed, 08 Jul 2020 03:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594205719; cv=none; d=google.com; s=arc-20160816; b=tb1VQF12+/V6HZQdNo3cez0ri891Ih1QJxkeQb9oYSOhqRxDlwMaE+zDvy2pBxVE35 YDzGOKTS02KMWKtLdubIN9YatRFFVQvUmRhooVEnPtTDsNl881OkX14M1Ign/RcuiLH7 +gh6NP6t5IgnCjDLmckaQ7DiejaCYBgVcr++ApX/MkAEoPUeQYWaHnTdEvfdTeiJVivg 9/sJ78nG0+KHmK5Dmp3MpK86VQPb2z8Bu+m9IfUT2iaIv2dOceuIH8dJUEJCB7UpBOrq aGfuddiIyIZKAq8Z9DoWxdlR5CKaIf8HlAOrR4wregtf+MVKXXjDnWerorXn5p8XIkmy YDjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:cc:to:subject:dkim-signature :dkim-filter; bh=8cv3BY8rhZiowdOYtWgygGS3Rx7HHvw149D4xWAek5I=; b=NQG1FAK54O+cz/D7jro1cyDPs5h/lVHYpu8Ez6cZ0lxOnz/3tilfT6iwrN8+37P0rr zHmtyk0UGb55filkrEzVK1qPsLXv7JFtgmOCIU40mjniXTU0JhOqktg7cFcXuM2wr1xL LkhYwnybYuzA+tHEE8aCMh1zwrY8nMkHOK4pzbbI3AtwpsaMCu9RyTbeV/myehbwZeP6 RGSCy9NXmocU1Etx1GdSlqafBm8K9laXCGsS0hiscW/Fo+mL0vj7g6+00bg4n/QNsLaG emxbpKesGIq/k7L9WbxpnP2RgRHs+mskEcroSAxD9Wl0F0qffF44xep0G4fykSh6T0pQ xAqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=IOgkAyBe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id s19si16918033ejq.719.2020.07.08.03.54.54; Wed, 08 Jul 2020 03:55:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=IOgkAyBe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728521AbgGHKw6 (ORCPT + 99 others); Wed, 8 Jul 2020 06:52:58 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:54365 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725972AbgGHKw5 (ORCPT ); Wed, 8 Jul 2020 06:52:57 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200708105256euoutp01d8f6f8b293da2f4ff859265de6c4ffb4~fwYZoPl3J1678216782euoutp01L for ; Wed, 8 Jul 2020 10:52:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200708105256euoutp01d8f6f8b293da2f4ff859265de6c4ffb4~fwYZoPl3J1678216782euoutp01L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1594205576; bh=8cv3BY8rhZiowdOYtWgygGS3Rx7HHvw149D4xWAek5I=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=IOgkAyBe9rai7kVAAu2QAZFlsXPPukhVQgHPkbFJzDcf6uJ+Djcl0dZL/hQax0ATm rW5KZTWo2yzXYgotabHBzNM+P4blYvn5/fCMRXLHZSmI+KRQ9byDgV1LKg2Gotrkzt 8mdstTMz1Rd+0FN8ettgstiPwqxuO4hB9sQhYFeU= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200708105255eucas1p2548e027b63151ddbc3930e14a909af0f~fwYZKwzd51536015360eucas1p2V; Wed, 8 Jul 2020 10:52:55 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 3B.1C.06456.785A50F5; Wed, 8 Jul 2020 11:52:55 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200708105255eucas1p229180d35b47e4a350fbb72ea5e2df2a9~fwYY45EE11334013340eucas1p2W; Wed, 8 Jul 2020 10:52:55 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200708105255eusmtrp1930ecde1efb1a571e8a06dc715f2a286~fwYY4Lw011950319503eusmtrp1o; Wed, 8 Jul 2020 10:52:55 +0000 (GMT) X-AuditID: cbfec7f2-809ff70000001938-ea-5f05a587f0e1 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 5B.6B.06017.785A50F5; Wed, 8 Jul 2020 11:52:55 +0100 (BST) Received: from [106.120.51.71] (unknown [106.120.51.71]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200708105254eusmtip233ca8aacc24a7fc9b0dafeafbd0a6fc0~fwYYRV4Cb0877408774eusmtip2J; Wed, 8 Jul 2020 10:52:54 +0000 (GMT) Subject: Re: [RFC PATCH 0/2] PM / devfreq: Add delayed timer for polling To: Chanwoo Choi Cc: lukasz.luba@arm.com, k.konieczny@samsung.com, krzk@kernel.org, kgene@kernel.org, s.nawrocki@samsung.com, willy.mh.wolff.ml@gmail.com, chanwoo@kernel.org, myungjoo.ham@samsung.com, kyungmin.park@samsung.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org From: Bartlomiej Zolnierkiewicz Message-ID: Date: Wed, 8 Jul 2020 12:52:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20200703062622.11773-1-cw00.choi@samsung.com> Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMKsWRmVeSWpSXmKPExsWy7djP87rtS1njDY7NUrWYeOMKi8X1L89Z LRZ8msFq0f/4NbPF+fMb2C3ONr1ht9j0+BqrxeVdc9gsPvceYbSYcX4fk8XCphZ2i9uNK9gs Dr9pZ7X4duIRowOfx5p5axg9ds66y+6xaVUnm8fmJfUefVtWMXp83iQXwBbFZZOSmpNZllqk b5fAlfH3yU7Wgm/CFWsW/GFuYJwt0MXIySEhYCJxbeVSxi5GLg4hgRWMEntmr2KBcL4wSsx/ d58JwvnMKHFg+Sd2mJaTbz5DtSxnlFja8wzKecsoMf3HCmaQKmEBD4m797vBOkQENCRm/r0C VsQscItJ4tThG4wgCTYBK4mJ7avAbF4BO4mFV26CNbMIqEj8P3CVCcQWFYiQ+PTgMCtEjaDE yZlPWEBsTgFriTs999hAbGYBcYlbT+YzQdjyEtvfzmEGWSYh8JZd4veNu8wQ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+cwT2AUmoWkfRaSlllIWmYhaVnAyLKKUSS1tDg3PbfYSK84Mbe4NC9d Lzk/dxMjMH63Hfu5ZQdj17vgQ4wCHIxKPLwZiSzxQqyJZcWVuYcYJTiYlUR4nc6ejhPiTUms rEotyo8vKs1JLT7EaAr03ERmKdHkfGBqySuJNzQ1NLewNDQ3Njc2s1AS5+0QOBgjJJCeWJKa nZpakFoE08fEwSnVwJhqd0DUlXGCz9YDIYH1E6eYyzzMPq23TvBdxddJt7OPC0+5bXGhilXM K8hHJeuVRMgsH1/9NPEv5VVp/IaOuyYb/nnx/a2w9AuPn29Xdfv4f7/yksHgJLNAjYdarTz7 78P6rS+k/lwQbl2xs0nh2CyFFVHv07aIHZQ7PVEi/FSrILdo+S3PiUosxRmJhlrMRcWJACZW R3/1AgAA X-CMS-MailID: 20200708105255eucas1p229180d35b47e4a350fbb72ea5e2df2a9 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200703061508epcas1p171aa3c0ab832b77e5837d8bd1e563742 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200703061508epcas1p171aa3c0ab832b77e5837d8bd1e563742 References: <20200703062622.11773-1-cw00.choi@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chanwoo, On 7/3/20 8:26 AM, Chanwoo Choi wrote: > Add the delayed timer to devfreq framework in order to support > the periodical polling mode without stop caused by CPU idle state. Thank you, this patchset looks fine to me and is a step in the right direction: Reviewed-by: Bartlomiej Zolnierkiewicz > Some Non-CPU device must need to monitor the device status like > utilization regardless of CPU state. This is probably true for all devfreq devices using simple_ondemand governor by default: drivers/devfreq/exynos-bus.c drivers/devfreq/rk3399_dmc.c drivers/devfreq/tegra20-devfreq.c drivers/gpu/drm/lima/lima_devfreq.c drivers/gpu/drm/msm/msm_gpu.c drivers/gpu/drm/panfrost/panfrost_devfreq.c drivers/memory/samsung/exynos5422-dmc.c drivers/scsi/ufs/ufshcd.c With devfreq device polling being "coupled" to CPU idle state the devfreq subsystem behavior is completely unpredictable and unreliable. It affects both performance (device opp change up happening too late) and power consumption (device opp change down happening too late). It also causes hardware usage counters support to report too high values (because of CPU idle "coupling" the real polling period becomes larger than maximum period supported by the counter and the counter becomes fully "saturated") which negatively affects power consumption (as has been observed when using Odroid XU3/4). [ The only upside of using such "coupling" is lowered CPU power usage (in some situations) but at the (unacceptable IMHO) cost of the correctness of operations of devfreq subsystem. ] Unfortunately this patchset currently fixes only exynos5422-dmc devfreq driver. To fix problems for Exynos platforms we need to also fix exynos-bus devfreq driver. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics > - patch1 explains the detailed reason why the delayed timer is required. > - patch2 initializes that exynos5422-dmc device use delayed timer as default > instead of deferrable timer. > > Chanwoo Choi (2): > PM / devfreq: Add support delayed timer for polling mode > memory: samsung: exynos5422-dmc: Use delayed timer as default > > Documentation/ABI/testing/sysfs-class-devfreq | 12 +++ > drivers/devfreq/devfreq.c | 83 ++++++++++++++++++- > drivers/memory/samsung/exynos5422-dmc.c | 1 + > include/linux/devfreq.h | 9 ++ > 4 files changed, 104 insertions(+), 1 deletion(-)