Message ID | 834ecd507071ad88aff039352dbc7e063dd996a7.1370948150.git.viresh.kumar@linaro.org |
---|---|
State | Accepted |
Headers | show
Return-Path: <patchwork-forward+bncBCRIZROPVQPBBK4I3SGQKGQEZLFMDFQ@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f198.google.com (mail-ye0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D734025E1A for <linaro@patches.linaro.org>; Tue, 11 Jun 2013 11:04:11 +0000 (UTC) Received: by mail-ye0-f198.google.com with SMTP id m13sf7329151yen.9 for <linaro@patches.linaro.org>; Tue, 11 Jun 2013 04:04:11 -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=3kQf4YE0ZjWOcHI2erpgu5m1DqX+BnvpIbSTbKjcRmk=; b=cq8oTWcxuREufv4rELFixf7hjzTjf88kHfbav8VWrYDQBlpjJkcQzebCSbkMknTAPv ZvGp21k7JgPHnOGFldIBDgeH+kA+pUju54nhBiwrPOrBTtU2eMv94xV/Fgx9KV7jqLyF apX7tdznK0HZwhWucM9qJOI/0lTXT7MnyuTRPIp0eEBp07bqMY1TkzkSBecY7w/rr8wW fGK6WmEc8FkuoPYmn7gGuCQdfzUy1BZ45LVdWOTSag7qvgW0kbxHgmpL8HX296Xyrv2x wKcbmkIfHtLmFNXLTLtfhgA+9HSfvfrP+y52dtDb5qHXyZKbHJ+hUyQjeMcHtk/6IDOX pqsw== X-Received: by 10.224.59.205 with SMTP id m13mr10659982qah.7.1370948651389; Tue, 11 Jun 2013 04:04:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.86.232 with SMTP id s8ls3139512qez.94.gmail; Tue, 11 Jun 2013 04:04:11 -0700 (PDT) X-Received: by 10.220.252.66 with SMTP id mv2mr7889290vcb.22.1370948651210; Tue, 11 Jun 2013 04:04:11 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id sz6si6704026vdc.36.2013.06.11.04.04.11 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Jun 2013 04:04:11 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.171 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.171; Received: by mail-vc0-f171.google.com with SMTP id gd11so2340197vcb.16 for <patchwork-forward@linaro.org>; Tue, 11 Jun 2013 04:04:11 -0700 (PDT) X-Received: by 10.52.170.148 with SMTP id am20mr6634312vdc.75.1370948651060; Tue, 11 Jun 2013 04:04:11 -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 pb14csp103937vcb; Tue, 11 Jun 2013 04:04:10 -0700 (PDT) X-Received: by 10.68.244.73 with SMTP id xe9mr13288885pbc.119.1370948650083; Tue, 11 Jun 2013 04:04:10 -0700 (PDT) Received: from mail-pa0-x22e.google.com (mail-pa0-x22e.google.com [2607:f8b0:400e:c03::22e]) by mx.google.com with ESMTPS id tr9si6732599pbc.313.2013.06.11.04.04.09 for <patches@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Jun 2013 04:04:10 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c03::22e is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=2607:f8b0:400e:c03::22e; Received: by mail-pa0-f46.google.com with SMTP id fa11so5384273pad.19 for <patches@linaro.org>; Tue, 11 Jun 2013 04:04:09 -0700 (PDT) X-Received: by 10.66.230.199 with SMTP id ta7mr18586073pac.153.1370948649598; Tue, 11 Jun 2013 04:04:09 -0700 (PDT) Received: from localhost ([223.228.219.75]) by mx.google.com with ESMTPSA id ra4sm19642022pab.9.2013.06.11.04.03.56 for <multiple recipients> (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 11 Jun 2013 04:04:08 -0700 (PDT) From: Viresh Kumar <viresh.kumar@linaro.org> 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 <viresh.kumar@linaro.org> Subject: [PATCH 1/3] sched: Use cached value of span instead of calling sched_domain_span() Date: Tue, 11 Jun 2013 16:32:43 +0530 Message-Id: <834ecd507071ad88aff039352dbc7e063dd996a7.1370948150.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: <cover.1370948150.git.viresh.kumar@linaro.org> References: <cover.1370948150.git.viresh.kumar@linaro.org> In-Reply-To: <cover.1370948150.git.viresh.kumar@linaro.org> References: <cover.1370948150.git.viresh.kumar@linaro.org> X-Gm-Message-State: ALoCoQm8O32L5TYef/3TVFgJLJUgtzyeMSGo/eOvcbAnrDhiY012+nO2DY/owL/Oi41xSi9EAks5 X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.171 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: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post?hl=en-US>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?hl=en-US&topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/?hl=en-US> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe?hl=en-US>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> |
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index e585e10..4abc743 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5334,7 +5334,7 @@ build_sched_groups(struct sched_domain *sd, int cpu) get_group(cpu, sdd, &sd->groups); atomic_inc(&sd->groups->ref); - if (cpu != cpumask_first(sched_domain_span(sd))) + if (cpu != cpumask_first(span)) return 0; lockdep_assert_held(&sched_domains_mutex);
In the beginning of build_sched_groups() we called sched_domain_span() and cached its return value in span. Few statements later we are calling it again to get the same pointer. Lets use the cached value instead as it hasn't changed in between. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)