Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1164730imj; Thu, 14 Feb 2019 02:15:06 -0800 (PST) X-Google-Smtp-Source: AHgI3IaUYEZW1HGh4UYPZc5mor6juwu9pQC/XeiABoAP0ac38yc41khXipcSKciU93SxIRFC9h+r X-Received: by 2002:a65:6215:: with SMTP id d21mr2992120pgv.289.1550139306671; Thu, 14 Feb 2019 02:15:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550139306; cv=none; d=google.com; s=arc-20160816; b=k3g3z1OFx3b4hlu6nrSAaKbP6WayO36dE8sW4njFUlCsnZfzqcxOYu3yBqHdX8H5BD u84d2elmZdbM695Vfv9ZkExi3Za8bSrzKDycjdytClvx2+FhQZm+CdjZIDbUTV7jwwrM tU5p++EGCgCdON2R9jK/P6MSLQcthKqZhp+SgNCi78TiQPZ2oBsOy6FxINtIPqLW8TR1 6J7mOetKoRuiPrFsfSAyrieKx3BhtSO+v6VIshUdM4RGN7qBscaZrJTe5LqtCdnDuOZ9 ab5iZw4LjF5m35xvkkNU5YeP0DcorcA8JEKdiD4E/fZVq0i8U/mjuFenommnT881CwxO TOOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=oKV2+FrnhAHG8HfwAGfe/E7DaHLqiHL+qRM6QpM+8gE=; b=inQRKFhZ1tRf+OUj+u240Vupdeu5eAAANHYyJnA2WOXu8ndk7umWygQgtCA/Pw9ubv oV36WxvfKW0QxjErMr2iWtk/Q2KDiRwsQNlUR4+XmYoRwYuML7B3jWqtz0tOKKTiXUvq kcUWMAGNQSJR8o2hSSSpYjNvyeNp94QEbViU8VTAGLDaYIu+FjomTH5RcLKslzCvyEvG KAG9QoH61wAQ6mku7873mquwPeimuQuaBTcZHEf5BOQF9wD+SjPaglRKBPTyQgabNP7t dkOV2y9P4w9DRZ30OHqYquUebo4brNDX6LFtkj1RUrYy2PTElxSaIba8PpZa0Vfz/op+ 824A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FBL3q63Q; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay11si1987045plb.368.2019.02.14.02.14.50; Thu, 14 Feb 2019 02:15:06 -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=@chromium.org header.s=google header.b=FBL3q63Q; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731410AbfBNBay (ORCPT + 99 others); Wed, 13 Feb 2019 20:30:54 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:40078 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729558AbfBNBay (ORCPT ); Wed, 13 Feb 2019 20:30:54 -0500 Received: by mail-pl1-f193.google.com with SMTP id bj4so2180158plb.7 for ; Wed, 13 Feb 2019 17:30:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oKV2+FrnhAHG8HfwAGfe/E7DaHLqiHL+qRM6QpM+8gE=; b=FBL3q63QX18QiYlcwkSrZVHEtt8kEQjnz1+ae05xjPlio+P/956cf7nAVzsr5C1R43 ZDFbO92Ck4BzCqk+ERDY+RySjDdXFEgHJEP9UzjOqMwxZnoKGHid1iUukW65kXZkk6xi Ep+QOh3Of6EHzFBjfZYp1Q3+1pTbQ/Z/4oXnc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oKV2+FrnhAHG8HfwAGfe/E7DaHLqiHL+qRM6QpM+8gE=; b=KUCJL+4PSqyJ5+IsVhS9XDgm5Or8cGBsllkRUTj/2pbOUhNdi0U8KjhPp1PQXL9dk7 BIr8xnRzs+B0zX8MoVPu1REH05jYoRsQ2mu+pmtU5AaYPYd3T2dK9EiwOk/q4KNN6WI4 9KeZXXHxa5nnifvJ2P6in3aBCkCB9a1mDPhzPv/P+SAcoxN6ym2gZpxKzwj91G1RNTep eiAOuyZ1wt4ifPihTbfjQaGrmfImZM9lBe1UptDj73lE0k7HXaNHLzcOLZJTaEsKOMrW I5kTDU6xCZ863yZzd9v37S9digqEW33BnR8UC3f+HEN0ljXFg3mn50sXjYDmyXs9eG15 aPdQ== X-Gm-Message-State: AHQUAuZrAbaw16b6PIa+Tmu841fTnE7W+/oEPrhxCdss/dMrd3l1Bfpy 7F6zmpHZ7F6PtZG8qNv7sjhjhA== X-Received: by 2002:a17:902:209:: with SMTP id 9mr1339679plc.288.1550107853302; Wed, 13 Feb 2019 17:30:53 -0800 (PST) Received: from mka.mtv.corp.google.com ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id p64sm811072pfi.56.2019.02.13.17.30.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 17:30:52 -0800 (PST) From: Matthias Kaehlcke To: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Thierry Reding , Jonathan Hunter , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, Lukasz Luba Cc: Matthias Kaehlcke Subject: [PATCH 0/4] PM / devfreq: Refactor load monitoring Date: Wed, 13 Feb 2019 17:30:38 -0800 Message-Id: <20190214013042.254790-1-mka@chromium.org> X-Mailer: git-send-email 2.20.1.791.gb4d0f1c61a-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The devfreq core currently expects governors to call specific load monitor functions on certain DEVFREQ_GOV_ events. Since the devfreq core itself invokes the event handler it can as well call the corresponding load monitor functions itself. This series refactors the code to do this for DEVFREQ_GOV_START/STOP/SUSPEND and RESUME. In the process it also moves some repeated code involved in starting and stopping the governor into helper functions. Unfortunately I could only do limited testing of this series with a 4.19 kernel and few rather inactive devfreq devices. In this sense additional testing would be appreciated. Thanks Matthias Matthias Kaehlcke (4): PM / devfreq: Track overall load monitor state instead of 'stop_polling' PM / devfreq: Handle monitor suspend/resume in the devfreq core PM / devfreq: Add devfreq_governor_start/stop() PM / devfreq: Handle monitor start/stop in the devfreq core drivers/devfreq/devfreq.c | 185 +++++++++++++--------- drivers/devfreq/governor.h | 4 - drivers/devfreq/governor_simpleondemand.c | 16 -- drivers/devfreq/tegra-devfreq.c | 4 - include/linux/devfreq.h | 4 +- 5 files changed, 111 insertions(+), 102 deletions(-) -- 2.20.1.791.gb4d0f1c61a-goog