Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2218867imm; Mon, 3 Sep 2018 23:42:27 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ31sgdt8aVEpn9x+ASM8NvNCe04lqMPPeX+mQCPj1AeDmVkzZDeJXC2d2eQivhIwk1wfC/ X-Received: by 2002:a17:902:4001:: with SMTP id b1-v6mr717182pld.312.1536043347826; Mon, 03 Sep 2018 23:42:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536043347; cv=none; d=google.com; s=arc-20160816; b=n32OlARQMRubYoTUkVD941bLmSPrWIITSWvbpu52F47ZshpO/GP+nt329jGjG6n9MI 2AF/oz3gu3UfvvdGXqXxWJyXVCHN73gaWOUJZFqMi6RXjMs8dKLrHOo3RdylmYrHP5fL NSccFdJUraU3ilTEVfJ4lkv8N/fyWj2farxClJLUCi7/jVFT2qmtpXR1ZYkIEbXFF5I0 xoJVsVuvTNRSwY4Qw5E1v1pbq1JpqSUyp5C6vpuN3vFaNrtqzq1gA7Q7tUDvxUF1R8jr qJS9KETGRgCuAMofT+/Q8Ndl4bugj6XfEiuq5q9pg+9H+eOa/5iHgwLwyFiO+glzXe3I hdMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=cj9VLaUKKapKqxqBem0FjAgcTi1/1G7JcKaNvPzcibo=; b=XE6RBaldgOBDAEtFvRXssmICgxM0QZ50lgORRFDmNUaga+fn3LgcEuzIRV0O7CYk7F DKXVwzcklKXjpsGrK83xylzdnD2Fa0Ur2+eQfPOSUMpFZpmD1T1f521UYNCt53V4uJBe WIUz2FWURtDXeVM6cKFMGyjx2LU6jSUHPUYGxnMpB14o2VF877yYsps6Sguhgp6fDXWn 3KHlqrKJEdfv1QdAF+QKielQGr6Aiqwoj6o4MVgO1BfQSCfdZkoLaGKmNez1GzRkn5Oa ea+S+OONQC+QELYbrMjAEVqGy/bWEUfVOIa/dpzvfle1LWffl1OdDYEHbRuiau791Xr7 fQZQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x10-v6si20080946pgl.567.2018.09.03.23.42.13; Mon, 03 Sep 2018 23:42:27 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727627AbeIDLEG (ORCPT + 99 others); Tue, 4 Sep 2018 07:04:06 -0400 Received: from mx1.unisoc.com ([222.66.158.135]:21381 "EHLO SHSQR01.spreadtrum.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbeIDLEG (ORCPT ); Tue, 4 Sep 2018 07:04:06 -0400 Received: from ig2.spreadtrum.com (bjmbx02.spreadtrum.com [10.0.64.8]) by SHSQR01.spreadtrum.com with ESMTP id w846bKm1017817 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Sep 2018 14:37:20 +0800 (CST) (envelope-from Chunyan.Zhang@unisoc.com) Received: from localhost (10.0.93.106) by BJMBX02.spreadtrum.com (10.0.64.8) with Microsoft SMTP Server (TLS) id 15.0.847.32; Tue, 4 Sep 2018 14:37:55 +0800 From: Chunyan Zhang To: Daniel Lezcano , Zhang Rui , Eduardo Valentin CC: , , Jeson Gao , Orson Zhai , Chunyan Zhang , Chunyan Zhang Subject: [PATCH] thermal: core: using power_efficient_wq for thermal worker Date: Tue, 4 Sep 2018 14:37:48 +0800 Message-ID: <1536043068-11487-1-git-send-email-chunyan.zhang@unisoc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.0.93.106] X-ClientProxiedBy: SHCAS01.spreadtrum.com (10.0.1.201) To BJMBX02.spreadtrum.com (10.0.64.8) X-MAIL: SHSQR01.spreadtrum.com w846bKm1017817 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jeson Gao For SMP systems, thermal worker should use power_efficient_wq in power saving mode, that will make scheduler more flexible on switching cpu on/off for running work handler to avoid keeping work handler always running on a single core, that will same some power. Even if 'power_efficient_wq' relevant configs are disabled 'system_freezable_power_efficient_wq' is identical to system_freezable_wq, behavior is unchanged. Signed-off-by: Jeson Gao Signed-off-by: Chunyan Zhang --- drivers/thermal/thermal_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 6ab9823..99df89f 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -290,10 +290,12 @@ static void thermal_zone_device_set_polling(struct thermal_zone_device *tz, int delay) { if (delay > 1000) - mod_delayed_work(system_freezable_wq, &tz->poll_queue, + mod_delayed_work(system_freezable_power_efficient_wq, + &tz->poll_queue, round_jiffies(msecs_to_jiffies(delay))); else if (delay) - mod_delayed_work(system_freezable_wq, &tz->poll_queue, + mod_delayed_work(system_freezable_power_efficient_wq, + &tz->poll_queue, msecs_to_jiffies(delay)); else cancel_delayed_work(&tz->poll_queue); -- 2.7.4