From patchwork Fri Jan 31 19:18:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoran Markovic X-Patchwork-Id: 23990 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4AA46202FA for ; Fri, 31 Jan 2014 19:18:48 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id j5sf10517195qaq.2 for ; Fri, 31 Jan 2014 11:18:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=B3nnmFGd76ObkzWIXiM7phlqHBSeWtXDILQQn+lv3Ps=; b=j3TfUiBhgmrGM6BfUuiQDRwwq4U/lsNWD61uK7ny/TUzGytBFNJ+POVyv9dvfttWsg dzTy4XmDdjiZpJJXg76VqNy7g5+yXjkkRxerCkhHMC/VB+7bnZjd65rjSElPdp/63SyX wmaiLlceZTm4UUrywfwjkxvTmaMuPv3jM+vC4ilbeN5N5HhV2cEuSJgq5UFkezisDq54 1OCgki6xVgkoW4NREwUn9HT/DCGX7PxZLe5r+sC3PmDhRrcwD3rRvcA+QnpXS33YJgl6 gpNq9r76Ez7oJeuS9bjo0NdAYPOys95oT1LTG6XRWJ90tB88xt1PMMbPYYK2YvyLgKnP qGVg== X-Gm-Message-State: ALoCoQlkjyZCdapsRx7WtVdBQsl+IjJbYb8C6zcCAcmByK/MvMcaLChzrZIlYVEe7rSYk4RHmJs/ X-Received: by 10.236.121.4 with SMTP id q4mr7674089yhh.34.1391195927292; Fri, 31 Jan 2014 11:18:47 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.50.5 with SMTP id r5ls1119589qga.22.gmail; Fri, 31 Jan 2014 11:18:47 -0800 (PST) X-Received: by 10.52.76.105 with SMTP id j9mr375121vdw.52.1391195927140; Fri, 31 Jan 2014 11:18:47 -0800 (PST) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id dp3si3835771vcb.96.2014.01.31.11.18.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 11:18:47 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id im17so3215283vcb.5 for ; Fri, 31 Jan 2014 11:18:47 -0800 (PST) X-Received: by 10.220.139.136 with SMTP id e8mr853452vcu.34.1391195927028; Fri, 31 Jan 2014 11:18:47 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp119769vcz; Fri, 31 Jan 2014 11:18:46 -0800 (PST) X-Received: by 10.66.16.162 with SMTP id h2mr22353692pad.129.1391195924526; Fri, 31 Jan 2014 11:18:44 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sd3si11585923pbb.12.2014.01.31.11.18.43; Fri, 31 Jan 2014 11:18:43 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932702AbaAaTSi (ORCPT + 27 others); Fri, 31 Jan 2014 14:18:38 -0500 Received: from mail-pd0-f181.google.com ([209.85.192.181]:46604 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932271AbaAaTSh (ORCPT ); Fri, 31 Jan 2014 14:18:37 -0500 Received: by mail-pd0-f181.google.com with SMTP id y10so4612877pdj.40 for ; Fri, 31 Jan 2014 11:18:37 -0800 (PST) X-Received: by 10.68.204.161 with SMTP id kz1mr22749644pbc.156.1391195915588; Fri, 31 Jan 2014 11:18:35 -0800 (PST) Received: from vb-linaro.ric.broadcom.com ([216.31.219.19]) by mx.google.com with ESMTPSA id z10sm73942724pas.6.2014.01.31.11.18.34 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 11:18:34 -0800 (PST) From: Zoran Markovic To: linux-kernel@vger.kernel.org Cc: Shaibal Dutta , John Stultz , Thomas Gleixner , Shaibal Dutta , Zoran Markovic Subject: [RFC PATCH] timekeeping: move clock sync work to power efficient workqueue Date: Fri, 31 Jan 2014 11:18:24 -0800 Message-Id: <1391195904-12497-1-git-send-email-zoran.markovic@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zoran.markovic@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Shaibal Dutta For better use of CPU idle time, allow the scheduler to select the CPU on which the CMOS clock sync work would be scheduled. This improves idle residency time and conserver power. This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected. Cc: John Stultz Cc: Thomas Gleixner Signed-off-by: Shaibal Dutta [zoran.markovic@linaro.org: Added commit message. Aligned code.] Signed-off-by: Zoran Markovic --- kernel/time/ntp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index af8d1d4..419a52c 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -514,12 +514,13 @@ static void sync_cmos_clock(struct work_struct *work) next.tv_sec++; next.tv_nsec -= NSEC_PER_SEC; } - schedule_delayed_work(&sync_cmos_work, timespec_to_jiffies(&next)); + queue_delayed_work(system_power_efficient_wq, + &sync_cmos_work, timespec_to_jiffies(&next)); } void ntp_notify_cmos_timer(void) { - schedule_delayed_work(&sync_cmos_work, 0); + queue_delayed_work(system_power_efficient_wq, &sync_cmos_work, 0); } #else