From: Juri Lelli <juri.lelli@arm.com>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
peterz@infradead.org, vincent.guittot@linaro.org,
robh+dt@kernel.org, mark.rutland@arm.com, linux@arm.linux.org.uk,
sudeep.holla@arm.com, lorenzo.pieralisi@arm.com,
catalin.marinas@arm.com, will.deacon@arm.com,
morten.rasmussen@arm.com, broonie@kernel.org,
gregkh@linuxfoundation.org, Russell King <linux@armlinux.org.uk>
Subject: Re: [PATCH 6/7] arm, arm64: factorize common cpu capacity default code
Date: Fri, 20 Jan 2017 10:42:40 +0000 [thread overview]
Message-ID: <20170120104240.GO30747@e106622-lin> (raw)
In-Reply-To: <e5b902a0-8c2b-a682-0f67-0b0d9ee4ef5c@arm.com>
Hi Dietmar,
On 19/01/17 16:00, Dietmar Eggemann wrote:
> On 19/01/17 14:37, Juri Lelli wrote:
> > arm and arm64 share lot of code relative to parsing CPU capacity
> > information from DT, using that information for appropriate scaling and
> > exposing a sysfs interface for chaging such values at runtime.
> >
> > Factorize such code in a common place (driver/base/arch_topology.c) in
> > preparation for further additions.
> >
> > Suggested-by: Will Deacon <will.deacon@arm.com>
> > Suggested-by: Mark Rutland <mark.rutland@arm.com>
> > Suggested-by: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: Russell King <linux@armlinux.org.uk>
> > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: Will Deacon <will.deacon@arm.com>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Signed-off-by: Juri Lelli <juri.lelli@arm.com>
> > ---
> > arch/arm/Kconfig | 1 +
> > arch/arm/kernel/topology.c | 213 ++------------------------------------
> > arch/arm64/Kconfig | 1 +
> > arch/arm64/kernel/topology.c | 213 +-------------------------------------
> > drivers/base/Kconfig | 8 ++
> > drivers/base/Makefile | 1 +
> > drivers/base/arch_topology.c | 240 +++++++++++++++++++++++++++++++++++++++++++
> > 7 files changed, 260 insertions(+), 417 deletions(-)
> > create mode 100644 drivers/base/arch_topology.c
>
> [...]
>
> > +extern unsigned long
> > +arch_scale_cpu_capacity(struct sched_domain *sd, int cpu);
>
> How about adding a driver specific prefix 'foo_' to all driver interfaces?
>
> I'm asking because I would rather like to do a
>
> #define arch_scale_cpu_capacity foo_scale_cpu_capacity
>
> then a
>
> #define arch_scale_cpu_capacity arch_scale_cpu_capacity
>
> in arch/arm64/include/asm/topology.h
>
> later to wire cpu-invariant load-tracking support up to the task
> scheduler for ARM64.
>
> That's probably true too for all the 'driver' interfaces which get used
> in arch/arm{,64}/kernel/topology.c.
>
Looks like a good way to improve clarity to me. I'll add a patch for the
next version doing this and we see what people think.
Best,
- Juri
next prev parent reply other threads:[~2017-01-20 10:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 14:37 [PATCH 0/7] Fix issues and factorize arm/arm64 capacity information code Juri Lelli
2017-01-19 14:37 ` [PATCH 1/7] Documentation: arm: fix wrong reference number in DT definition Juri Lelli
2017-01-21 20:55 ` Rob Herring
2017-01-19 14:37 ` [PATCH 2/7] Documentation/ABI: add information about cpu_capacity Juri Lelli
2017-01-19 14:37 ` [PATCH 3/7] arm: fix return value of parse_cpu_capacity Juri Lelli
2017-01-19 14:37 ` [PATCH 4/7] arm: remove wrong CONFIG_PROC_SYSCTL ifdef Juri Lelli
2017-01-19 14:37 ` [PATCH 5/7] arm64: " Juri Lelli
2017-01-19 14:37 ` [PATCH 6/7] arm, arm64: factorize common cpu capacity default code Juri Lelli
2017-01-19 14:53 ` Russell King - ARM Linux
2017-01-19 15:51 ` Juri Lelli
2017-01-19 16:00 ` Dietmar Eggemann
2017-01-20 10:42 ` Juri Lelli [this message]
2017-01-19 14:37 ` [PATCH 7/7] arm,arm64,drivers: reduce scope of cap_parsing_failed Juri Lelli
2017-01-30 12:29 ` [PATCH 0/7] Fix issues and factorize arm/arm64 capacity information code Juri Lelli
2017-01-30 17:51 ` Catalin Marinas
2017-01-30 18:21 ` Juri Lelli
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=20170120104240.GO30747@e106622-lin \
--to=juri.lelli@arm.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=linux@armlinux.org.uk \
--cc=lorenzo.pieralisi@arm.com \
--cc=mark.rutland@arm.com \
--cc=morten.rasmussen@arm.com \
--cc=peterz@infradead.org \
--cc=robh+dt@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=vincent.guittot@linaro.org \
--cc=will.deacon@arm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).