From patchwork Fri Jan 31 19:53:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoran Markovic X-Patchwork-Id: 23991 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9F768202FA for ; Fri, 31 Jan 2014 19:53:40 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id gq1sf17371655obb.0 for ; Fri, 31 Jan 2014 11:53:39 -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=bxbZs14O9KaPWQ00Y0o2CAQTKfImfeMo1o7PLD7VFcM=; b=RChkKcHXjRGpoasYbRJQ08DR0KnVbxUFV6VOgaqfO1ytwXMubFr2Yexl5jskOnJ/Qv 7drCfHENwtFur9RDtHDtltFgyWDUp+CrJN5qW8pD1a3IPMYBps2zTU0OG1YouvekUG0T CkEFx9LXPYVVwqy9JZJ/8a/CELzHFh1CP+aLlcmSpzNjM/UPlNlzP0dQ+Mq6CMyJMWki Mw3YxMw4BLaaDI83JCpt/dfm2sFwXoyKzsEhWGKUzfIJ4gwdoVzQixV0U4EhdEzZe6qn TXL4PnGP5j/Azxx9dKMCpdjkkROfFb5a4tCy8DYsMbh++ZDrAntVVv5inTZvnaP1RhDG /DNg== X-Gm-Message-State: ALoCoQl7OWJ8fRbcxpLonxNqf6xK8/dpW96AvDokFTx5+MCVb+/RPW+2/30rZF/tREAQ/lf5SrFm X-Received: by 10.182.186.73 with SMTP id fi9mr1042814obc.48.1391198019709; Fri, 31 Jan 2014 11:53:39 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.87.202 with SMTP id r68ls1137496qgd.50.gmail; Fri, 31 Jan 2014 11:53:39 -0800 (PST) X-Received: by 10.52.108.232 with SMTP id hn8mr6236182vdb.29.1391198019628; Fri, 31 Jan 2014 11:53:39 -0800 (PST) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id er6si3852864vdc.127.2014.01.31.11.53.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 11:53:39 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id oz11so3383382veb.21 for ; Fri, 31 Jan 2014 11:53:39 -0800 (PST) X-Received: by 10.52.171.39 with SMTP id ar7mr10883856vdc.5.1391198019492; Fri, 31 Jan 2014 11:53:39 -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 u4csp121901vcz; Fri, 31 Jan 2014 11:53:39 -0800 (PST) X-Received: by 10.66.187.11 with SMTP id fo11mr22783391pac.47.1391198018635; Fri, 31 Jan 2014 11:53:38 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ui8si11644550pac.119.2014.01.31.11.53.37; Fri, 31 Jan 2014 11:53:37 -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 S932796AbaAaTxc (ORCPT + 27 others); Fri, 31 Jan 2014 14:53:32 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:43425 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932489AbaAaTxb (ORCPT ); Fri, 31 Jan 2014 14:53:31 -0500 Received: by mail-pa0-f51.google.com with SMTP id ld10so4835482pab.38 for ; Fri, 31 Jan 2014 11:53:30 -0800 (PST) X-Received: by 10.68.244.103 with SMTP id xf7mr22763253pbc.50.1391198010498; Fri, 31 Jan 2014 11:53:30 -0800 (PST) Received: from vb-linaro.ric.broadcom.com ([216.31.219.19]) by mx.google.com with ESMTPSA id cz3sm30353328pbc.9.2014.01.31.11.53.29 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Jan 2014 11:53:29 -0800 (PST) From: Zoran Markovic To: linux-kernel@vger.kernel.org Cc: Shaibal Dutta , Lai Jiangshan , "Paul E. McKenney" , Dipankar Sarma Subject: [RFC PATCH] rcu: move SRCU grace period work to power efficient workqueue Date: Fri, 31 Jan 2014 11:53:06 -0800 Message-Id: <1391197986-12774-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.128.176 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 SRCU grace period work would be scheduled. This improves idle residency time and conserves power. This functionality is enabled when CONFIG_WQ_POWER_EFFICIENT is selected. Cc: Lai Jiangshan Cc: "Paul E. McKenney" Cc: Dipankar Sarma Signed-off-by: Shaibal Dutta [zoran.markovic@linaro.org: Rebased to latest kernel version. Added commit message. Fixed code alignment.] Signed-off-by: Zoran Markovic --- kernel/rcu/srcu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/srcu.c b/kernel/rcu/srcu.c index 3318d82..a1ebe6d 100644 --- a/kernel/rcu/srcu.c +++ b/kernel/rcu/srcu.c @@ -398,7 +398,7 @@ void call_srcu(struct srcu_struct *sp, struct rcu_head *head, rcu_batch_queue(&sp->batch_queue, head); if (!sp->running) { sp->running = true; - schedule_delayed_work(&sp->work, 0); + queue_delayed_work(system_power_efficient_wq, &sp->work, 0); } spin_unlock_irqrestore(&sp->queue_lock, flags); } @@ -674,7 +674,8 @@ static void srcu_reschedule(struct srcu_struct *sp) } if (pending) - schedule_delayed_work(&sp->work, SRCU_INTERVAL); + queue_delayed_work(system_power_efficient_wq, + &sp->work, SRCU_INTERVAL); } /*