Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2235878imm; Tue, 4 Sep 2018 00:17:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYDhCGBJB7nEki+HquJPoaflTH2WUOmz9xGL4WySWlCaXcRKY8w4/kZLyzSlxrYkq42BWq4 X-Received: by 2002:a62:5d89:: with SMTP id n9-v6mr33738866pfj.102.1536045450592; Tue, 04 Sep 2018 00:17:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536045450; cv=none; d=google.com; s=arc-20160816; b=x4QWTeFs59rXDVHslMGPvgAfH87dBIXXBBdw8ttz5uGfkj3cLa9pLMXqLlWQi0FsIQ /cCzu8qzMjVdEfvk0wcI6kb6LckKaj4svQ3jESZiRj1oJnJ/DczkmlznrSyNGW1vpjFu 7KsqrCZFIyuoxMoMOxJsj+n4a+aXKcWSwbg2aopctqzpunv8nlVALBhkbwTDuNJ5ARB5 cVUo944xD3VNGS8R42ii6iyQ9z3J0O2YVYsggrMhjnfl74+AKr8EeIFuUXP3OXU9Ts76 ZzA5FiItlsXKRuJZe5SB2hYRl2kkMG/GWA9urlhsrwfnKFjHXh6x3p2qNkpO4mg7fEeA 3zig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=2yG+090MNHQMI6W5MjvJSnbjB+anZgoEd2TB/q3uu9w=; b=QXoCgSQgADMX++uWGUyjwgSnjxUQWT2BsZFX09kZnj4fPAFYijqpcKtq2v4Rm/5/ku qNP7rL+hXrACxlwGSXHHpUPuoRoXtx66hCwh2lI19tx/aTSAPZro5nLkzmD+WJHEkDVy 7kkpcCjnY52UW0UjYLs7/OsgaFA/axAl/gNCXsuwLLVbHkJVAHfJvH6mvax+o7kMMzS6 RncnI0RueYR4OxZIHt+yTR+XONzQixul3voDCtJiJ/CSQwGCVUhTj4qRKVOMbxMwBVH1 05YcTUfavZYSUK+rUSmcNZ+jU6xdA298LgXjvuUlK/ONSnlIvc7qe2D4VVJmKrJXBOg8 5c3A== 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 r18-v6si15748766pgb.578.2018.09.04.00.17.15; Tue, 04 Sep 2018 00:17:30 -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 S1726347AbeIDLjz (ORCPT + 99 others); Tue, 4 Sep 2018 07:39:55 -0400 Received: from mx1.unisoc.com ([222.66.158.135]:62159 "EHLO SHSQR01.spreadtrum.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725977AbeIDLjz (ORCPT ); Tue, 4 Sep 2018 07:39:55 -0400 Received: from ig2.spreadtrum.com (bjmbx02.spreadtrum.com [10.0.64.8]) by SHSQR01.spreadtrum.com with ESMTP id w847DRj5008557 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Sep 2018 15:13:27 +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 15:14:20 +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 15:14:08 +0800 Message-ID: <1536045248-11677-1-git-send-email-chunyan.zhang@unisoc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536043068-11487-1-git-send-email-chunyan.zhang@unisoc.com> References: <1536043068-11487-1-git-send-email-chunyan.zhang@unisoc.com> 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 w847DRj5008557 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 selecting an active core for running work handler to avoid keeping work handler always running on a single core, that will save 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