All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gautham R Shenoy <ego@linux.vnet.ibm.com>
To: Balbir Singh <bsingharora@gmail.com>
Cc: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>,
	linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org,
	rjw@rjwysocki.net, viresh.kumar@linaro.org,
	linux-pm@vger.kernel.org, pc@us.ibm.com, anton@samba.org,
	ego@linux.vnet.ibm.com, shreyas@linux.vnet.ibm.com
Subject: Re: [PATCH v6 2/5] cpufreq: powernv: Remove cpu_to_chip_id() from hot-path
Date: Mon, 25 Jan 2016 11:08:05 +0530	[thread overview]
Message-ID: <20160125053804.GA5599@in.ibm.com> (raw)
In-Reply-To: <20160123195920.552990ed@cotter.ozlabs.ibm.com>

Hello Balbir,

On Sat, Jan 23, 2016 at 07:59:20PM +1100, Balbir Singh wrote:
> On Fri, 22 Jan 2016 12:49:02 +0530
> Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> wrote:
> 
> > cpu_to_chip_id() does a DT walk through to find out the chip id by
> > taking a contended device tree lock. This adds an unnecessary overhead
> > in a hot path. So instead of calling cpu_to_chip_id() everytime cache
> > the chip ids for all cores in the array 'core_to_chip_map' and use it
> > in the hotpath.
> > 
> > Reported-by: Anton Blanchard <anton@samba.org>
> > Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
> > Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> 
> snip
> 
> Does the core_to_chip_map need to be updated/refreshed on/after/ a
> cpu (core) hotplug? I presume id's don't change

No, the id's don't change on cpu/core hotplug. The core_to_chip_map is
initialized in init_chip_info() where we use for_each_possible_cpu().

Thanks for the review!
> 
> Balbir
> 
--
Thanks and Regards
gautham.

  reply	other threads:[~2016-01-25  5:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22  7:19 [PATCH v6 0/5] cpufreq: powernv: Redesign the presentation of throttle notification and solve bug-fixes in the driver Shilpasri G Bhat
2016-01-22  7:19 ` [PATCH v6 1/5] cpufreq: powernv: Hot-plug safe the kworker thread Shilpasri G Bhat
2016-01-25  5:49   ` Viresh Kumar
2016-01-22  7:19 ` [PATCH v6 2/5] cpufreq: powernv: Remove cpu_to_chip_id() from hot-path Shilpasri G Bhat
2016-01-23  8:59   ` Balbir Singh
2016-01-25  5:38     ` Gautham R Shenoy [this message]
2016-01-25  5:53   ` Viresh Kumar
2016-01-22  7:19 ` [PATCH v6 3/5] cpufreq: powernv/tracing: Add powernv_throttle tracepoint Shilpasri G Bhat
2016-01-22  7:19 ` [PATCH v6 4/5] cpufreq: powernv: Replace pr_info with trace print for throttle event Shilpasri G Bhat
2016-01-25  5:58   ` Viresh Kumar
2016-01-22  7:19 ` [PATCH v6 5/5] cpufreq: powernv: Add sysfs attributes to show throttle stats Shilpasri G Bhat
2016-01-23  8:40   ` Balbir Singh
2016-01-25  6:46     ` Shilpasri G Bhat
2016-01-25  5:43   ` [v6, " Michael Ellerman
2016-01-25  5:43     ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160125053804.GA5599@in.ibm.com \
    --to=ego@linux.vnet.ibm.com \
    --cc=anton@samba.org \
    --cc=bsingharora@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=pc@us.ibm.com \
    --cc=rjw@rjwysocki.net \
    --cc=shilpa.bhat@linux.vnet.ibm.com \
    --cc=shreyas@linux.vnet.ibm.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.