From patchwork Tue Jun 11 11:02:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 17795 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-fa0-f71.google.com (mail-fa0-f71.google.com [209.85.161.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3D53E25E1A for ; Tue, 11 Jun 2013 11:05:39 +0000 (UTC) Received: by mail-fa0-f71.google.com with SMTP id v1sf2133972fav.6 for ; Tue, 11 Jun 2013 04:05:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe; bh=EeSr6YnvmX8I6sDJwxXZQi9i95f8TXfg3FjAOt84GCA=; b=lZ/EGQBw267KrNEEnY++qxGVZ9cdn+vCnzXQu8oEfsqmAjSfKdgfWhQpt3reDMzltp ptXeKoaeLCErUZtrCzkR/vDx/e/1tFZYXBmOwTFLnEFBc5GVlhOXIlVEtc7uMDB4unL+ 5a4HxO+gv8l7zIfqOVHRPSAAXmTtOHqXfxfNOj1GI89NzyAMRdL5u8fJlPD1jy47hXK8 OsETaTrwz2kTcJEhYOIDF9gVJcBy6r0UNJjxSCm0JjOKz8ic7x69xHXCY6cZw6L/T/GB G39T9p1o5L8suEfmmdQ3Wbc7TaqB2D2aQDID09q/hSxTGnXEQ9cypbdLkbOrpf45Ryqt we8g== X-Received: by 10.180.207.44 with SMTP id lt12mr647441wic.5.1370948737611; Tue, 11 Jun 2013 04:05:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.74.171 with SMTP id u11ls449096wiv.17.gmail; Tue, 11 Jun 2013 04:05:37 -0700 (PDT) X-Received: by 10.194.235.99 with SMTP id ul3mr8335540wjc.6.1370948737502; Tue, 11 Jun 2013 04:05:37 -0700 (PDT) Received: from mail-ve0-x231.google.com (mail-ve0-x231.google.com [2607:f8b0:400c:c01::231]) by mx.google.com with ESMTPS id as8si3658529wjc.174.2013.06.11.04.05.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Jun 2013 04:05:37 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::231; Received: by mail-ve0-f177.google.com with SMTP id cz10so5570412veb.8 for ; Tue, 11 Jun 2013 04:05:36 -0700 (PDT) X-Received: by 10.52.155.67 with SMTP id vu3mr6642738vdb.94.1370948736195; Tue, 11 Jun 2013 04:05:36 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.10.206 with SMTP id pb14csp103992vcb; Tue, 11 Jun 2013 04:05:35 -0700 (PDT) X-Received: by 10.66.4.106 with SMTP id j10mr18357777paj.218.1370948735275; Tue, 11 Jun 2013 04:05:35 -0700 (PDT) Received: from mail-pb0-x229.google.com (mail-pb0-x229.google.com [2607:f8b0:400e:c01::229]) by mx.google.com with ESMTPS id mr7si6753880pbb.197.2013.06.11.04.05.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Jun 2013 04:05:35 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c01::229 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=2607:f8b0:400e:c01::229; Received: by mail-pb0-f41.google.com with SMTP id rp16so4840004pbb.14 for ; Tue, 11 Jun 2013 04:05:34 -0700 (PDT) X-Received: by 10.68.111.33 with SMTP id if1mr13966632pbb.31.1370948734788; Tue, 11 Jun 2013 04:05:34 -0700 (PDT) Received: from localhost ([223.228.219.75]) by mx.google.com with ESMTPSA id v7sm14234905pbq.32.2013.06.11.04.05.01 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 11 Jun 2013 04:05:34 -0700 (PDT) From: Viresh Kumar To: mingo@redhat.com, peterz@infradead.org Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, linux-kernel@vger.kernel.org, robin.randhawa@arm.com, Steve.Bannister@arm.com, Liviu.Dudau@arm.com, charles.garcia-tobin@arm.com, arvind.chauhan@arm.com, Viresh Kumar Subject: [PATCH 2/3] sched: don't call get_group() for covered cpus Date: Tue, 11 Jun 2013 16:32:44 +0530 Message-Id: <7a61e955abdcbb1dfa9fe493f11a5ec53a11ddd3.1370948150.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQkHnTLdUzBYB1g7zbXcGCj/XK3zblpgSvGnZw25iefdyqlhb9Oh55C8koEeZJJyALYrc5TF X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::231 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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In build_sched_groups() we don't need to call get_group() for cpus which are already covered in previous iterations. So, call get_group() after checking if cpu is covered or not. Signed-off-by: Viresh Kumar Signed-off-by: Viresh Kumar --- kernel/sched/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 4abc743..27842f5 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5344,12 +5344,12 @@ build_sched_groups(struct sched_domain *sd, int cpu) for_each_cpu(i, span) { struct sched_group *sg; - int group = get_group(i, sdd, &sg); - int j; + int group, j; if (cpumask_test_cpu(i, covered)) continue; + group = get_group(i, sdd, &sg); cpumask_clear(sched_group_cpus(sg)); sg->sgp->power = 0; cpumask_setall(sched_group_mask(sg));