From patchwork Wed Apr 16 11:34:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 28456 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 82CF3206A6 for ; Wed, 16 Apr 2014 11:34:50 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id x10sf36838088pdj.2 for ; Wed, 16 Apr 2014 04:34:49 -0700 (PDT) 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=kZ7jUlt4xSCC3vBD5OqVSdeOPYQMB5qV48ZAta9fSfQ=; b=k0qsLi6zAsFijr6P0q1BHULuJWFgINZeVY/ck+EchNrcffa8aWAr27V/zvuuYahFdy SYq08Ny80BFqLIXR45GIxxeGEQit7p8Da4rIZ23SCE6br18HHET3BCl3gBGBmzxfEOmT iQZB57U+DgrMfxg24BLKTmRP9USIz6+k5Bg0/VzBu7BS+2NQ+hvtzR3bMK/NJjhHemQH Ei5J9DoLUmjGRomolCsj7JPHFbhqlwc923OSigxU/iAu+1sm6WGBUbCBYQs9vcevcqT/ 7uQqYNrv8m+Hgj42sJg4D98hT166BinOzG3eeEo5Ms8TURike5K/0vR60eqOYLb0bcQ9 vnIw== X-Gm-Message-State: ALoCoQnVLppZbIh+6TMltlnGrArUToMNin+8NiVdKeWHJz0hFwR0TxhAqZW1ENjGWsdmTgHZaL1d X-Received: by 10.66.252.198 with SMTP id zu6mr3563964pac.25.1397648089691; Wed, 16 Apr 2014 04:34:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.163 with SMTP id a32ls576947qgf.73.gmail; Wed, 16 Apr 2014 04:34:49 -0700 (PDT) X-Received: by 10.220.69.72 with SMTP id y8mr1699581vci.21.1397648089557; Wed, 16 Apr 2014 04:34:49 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id fa16si3832520veb.190.2014.04.16.04.34.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Apr 2014 04:34:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.175 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.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so10651277veb.34 for ; Wed, 16 Apr 2014 04:34:49 -0700 (PDT) X-Received: by 10.220.69.72 with SMTP id y8mr1699572vci.21.1397648089470; Wed, 16 Apr 2014 04:34:49 -0700 (PDT) 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.221.72 with SMTP id ib8csp304723vcb; Wed, 16 Apr 2014 04:34:49 -0700 (PDT) X-Received: by 10.68.134.198 with SMTP id pm6mr7973991pbb.9.1397648088722; Wed, 16 Apr 2014 04:34:48 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pu6si10456940pac.143.2014.04.16.04.34.48; Wed, 16 Apr 2014 04:34:48 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756030AbaDPLek (ORCPT + 26 others); Wed, 16 Apr 2014 07:34:40 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:64291 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755372AbaDPLei (ORCPT ); Wed, 16 Apr 2014 07:34:38 -0400 Received: by mail-pd0-f181.google.com with SMTP id p10so10520189pdj.26 for ; Wed, 16 Apr 2014 04:34:38 -0700 (PDT) X-Received: by 10.66.147.130 with SMTP id tk2mr7817681pab.125.1397648078087; Wed, 16 Apr 2014 04:34:38 -0700 (PDT) Received: from alex-shi.Home ([101.228.0.90]) by mx.google.com with ESMTPSA id pb7sm110045967pac.10.2014.04.16.04.34.34 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Apr 2014 04:34:37 -0700 (PDT) From: Alex Shi To: mingo@redhat.com, peterz@infradead.org, morten.rasmussen@arm.com, vincent.guittot@linaro.org, daniel.lezcano@linaro.org, efault@gmx.de, chris.redpath@arm.com Cc: wangyun@linux.vnet.ibm.com, linux-kernel@vger.kernel.org Subject: [RFC PATCH] sched: let task migration destination cpu do active balance Date: Wed, 16 Apr 2014 19:34:29 +0800 Message-Id: <1397648069-6462-1-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 1.8.3.2 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: alex.shi@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 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: , Chris Redpath found an issue on active balance: We let the task source cpu, the busiest cpu, do the active balance, while the destination cpu maybe idle. thus we take the busiest cpu time, but left the idlest cpu wait. That is not good for performance. This patch let the destination cpu do active balance. It will give tasks more running time. Signed-off-by: Alex Shi --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 9b4c4f3..cccee76 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6308,7 +6308,7 @@ more_balance: raw_spin_unlock_irqrestore(&busiest->lock, flags); if (active_balance) { - stop_one_cpu_nowait(cpu_of(busiest), + stop_one_cpu_nowait(busiest->push_cpu, active_load_balance_cpu_stop, busiest, &busiest->active_balance_work); }