From patchwork Tue Jan 23 15:34:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 125536 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1826874ljf; Tue, 23 Jan 2018 07:35:28 -0800 (PST) X-Google-Smtp-Source: AH8x227QVZAs8BUlVnGuK/uHgF2Hjqkj4PVAlnu66rM0ttd5rkXcRfSFvBYMV05pltx/dWpyg0Ec X-Received: by 10.36.122.79 with SMTP id a76mr4265194itc.36.1516721728151; Tue, 23 Jan 2018 07:35:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516721728; cv=none; d=google.com; s=arc-20160816; b=lc6WNbTaiJxh9IWCYw+sQM6Smo/IEE/59uw+cz59wbg/wq2PmWAS5ZCkRlGlfD+il1 red1VchpJTVPCSoED+j2VxOjNi6sA/HQl+wkCfaiSsZ8qhFNjzaf7GKb0mjgdKu7VGhN Coy+wAojUOu5U/tfjIwRMFa5wNkbIUUrm0vO6qJrk111419TuMvIwHxZA8uEOfVRNpRr iG+cV5YxlTgC9QGAS587Q1HR5zMvcWpEdC9rr7tgFa2+RI6f5iK4a9IWDLnf4el8Odfd qaNTnlOKAIiCX/URLlxiN8BVTus3f+LpIggERoOzZ4aVwL8XXnZtjk5kcPmcGPy32TSZ QM1Q== 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 :arc-authentication-results; bh=XcDDyOZRUq7a8CvS6pPEDpJAoYPyj5DjgIL7Ya36BRo=; b=G3JhkAglEaDvPl2xp9KqYXqQEryKCB8g1DVlGGDJjD+LJPuh4WKPPNtiVu8n93SCYB Rz1spUV5obGANTGBB66OTQG/0mpiIv4hZcqBECXgYQjLFyKrEG6GChHrSowmtbS1+KfV /09EMyEDrovrVaN9HorXbKShT4nIy1wt9gp/GmLCiJ1KNZTHMN6HT9O+bk4SBjMfNDN2 e5Rqd3KWgCSBpDdq1K9IqrzkHy5Xb+QEyRjecgLL//0CLrvRymnQhQHAuAMs7tCE5ZcZ +/26MelapBg8X81u3kNrORqheItKnHiyoFuk2xnTFoPBzXD5XB5QFu0k0qeEr0mqdsvW f2Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FTCKdk/9; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k66si8386576ita.171.2018.01.23.07.35.27; Tue, 23 Jan 2018 07:35:28 -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=@linaro.org header.s=google header.b=FTCKdk/9; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751903AbeAWPfZ (ORCPT + 28 others); Tue, 23 Jan 2018 10:35:25 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:41812 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbeAWPfW (ORCPT ); Tue, 23 Jan 2018 10:35:22 -0500 Received: by mail-wm0-f65.google.com with SMTP id f71so2672818wmf.0 for ; Tue, 23 Jan 2018 07:35:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XcDDyOZRUq7a8CvS6pPEDpJAoYPyj5DjgIL7Ya36BRo=; b=FTCKdk/9Rjh+nGI4M3g262zyMZLI10DF33A70kaI49ktEE37I6AjcjSrJR9wEvgdq0 GXenj9A94ZPlMLO7YAiIPj41c+vnds8IoPZP37S+Av19tuQzwDwvgn65hb5HSPRE7lBP 6GmAhqdc9xmWm7Qyi2895A00VIXU5PdqQzBXQ= 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=XcDDyOZRUq7a8CvS6pPEDpJAoYPyj5DjgIL7Ya36BRo=; b=TIlq/wCAmqqMeqzilr30z5K3uAOXyD8JGz1hyqZ5i/S17CV38+yR3eTi25Ezlu9Tr4 3wKa3zNKsMuW9VxFtmCuHgSLUyk77hC4kqgRTVt3apVmrYxBVEy/skMxBsj869MwMROo u8rdGw8pzgCGNpDjSo3/VQNjLP1ruzdMEk+aCnhkOBYVNWgRZbEV2sR7HiV5s6Bt3V64 W2Jj0W8EIv4EE9MaQ2tvCMcTx6GOS5ZD+CerBXQVkoMrofiIQ3hPw5BVYTJN0tU4ZeYb Fol+jXDAf+AHIU0Zs9+5KlCKwNeSbrwcS3pLY4PpROt5fVX/9+keTMGf9rsPKu6Q6ItC 5pdg== X-Gm-Message-State: AKwxytew2xQdHBudC7C2gX8hDZoyifu+ywFXeTUMF0Fhg037onHSvofl WoetVQhO+lCaNX5uMmmUhBppdR6SBL4= X-Received: by 10.28.155.66 with SMTP id d63mr2072915wme.7.1516721721070; Tue, 23 Jan 2018 07:35:21 -0800 (PST) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:8138:f09d:5869:1250]) by smtp.gmail.com with ESMTPSA id o98sm915624wrb.19.2018.01.23.07.35.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Jan 2018 07:35:20 -0800 (PST) From: Daniel Lezcano To: edubezval@gmail.com Cc: kevin.wangtao@linaro.org, leo.yan@linaro.org, vincent.guittot@linaro.org, amit.kachhap@gmail.com, viresh.kumar@linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/8] CPU cooling device new strategies Date: Tue, 23 Jan 2018 16:34:23 +0100 Message-Id: <1516721671-16360-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following series provides a new way to cool down a SoC by reducing the dissipated power on the CPUs. Based on the initial work from Kevin Wangtao, the series implements a CPU cooling device based on idle injection, relying on the cpuidle framework and a combo CPU cooling device combining the cooling effect of the cpufreq and the cpuidle cooling device with the objective of getting the advantages of both. The patchset is designed to have the current DT binding for the cpufreq cooling device to be compatible with the new cooling devices. Different cpu cooling devices can not co-exist on the system, the cpu cooling device is enabled or not, and one cooling strategy is selected (cpufreq, cpuidle or both with the combo). It is not possible to have all of them available at the same time. This series is divided into three parts. The first part just provides trivial changes for the copyright and removes an unused field in the cpu freq cooling device structure. The second part provides the idle injection cooling device, allowing a SoC without a cpufreq driver to use this cooling device as an alternative. The third part provides the combo idle injection and frequency cooling device. The preliminary benchmarks show the following changes: On the hikey6220, dhrystone shows a throughtput increase of 40% for an increase of the latency of 16% while sysbench shows a latency increase of 5%. On a hikey3660, the combo cooling device shows an improvement in term of throughput for the little cluster of 5% and a decrease of 5% on the big cluster. However, the hikey3660 support in mainline is still experimental and there is no guarantee the numberis provided in the DT are accurate enough. Daniel Lezcano (9): thermal/drivers/cpu_cooling: Fixup the header and copyright thermal/drivers/cpu_cooling: Add Software Package Data Exchange (SPDX) thermal/drivers/cpu_cooling: Remove pointless field thermal/drivers/Kconfig: Convert the CPU cooling device to a choice thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver thermal/drivers/cpu_cooling: Add idle cooling device documentation cpuidle/drivers/cpuidle-arm: Register the cooling device thermal/drivers/cpu_cooling: Add the combo cpu cooling device Documentation/thermal/cpu-idle-cooling.txt | 165 ++++++ drivers/cpuidle/cpuidle-arm.c | 5 + drivers/thermal/Kconfig | 37 +- drivers/thermal/cpu_cooling.c | 869 ++++++++++++++++++++++++++++- include/linux/cpu_cooling.h | 15 +- 6 files changed, 1068 insertions(+), 31 deletions(-) create mode 100644 Documentation/thermal/cpu-idle-cooling.txt -- 2.7.4