Re: [RFD PATCH 3/5] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE

2017-03-27 Thread Juri Lelli
On 27/03/17 19:05, Rafael J. Wysocki wrote: > On Monday, March 27, 2017 06:01:34 PM Juri Lelli wrote: > > On 27/03/17 18:50, Peter Zijlstra wrote: > > > On Fri, Mar 24, 2017 at 02:08:58PM +, Juri Lelli wrote: > > > > Worker kthread needs to be able to

Re: [RFD PATCH 3/5] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE

2017-03-27 Thread Juri Lelli
On 27/03/17 19:05, Rafael J. Wysocki wrote: > On Monday, March 27, 2017 06:01:34 PM Juri Lelli wrote: > > On 27/03/17 18:50, Peter Zijlstra wrote: > > > On Fri, Mar 24, 2017 at 02:08:58PM +, Juri Lelli wrote: > > > > Worker kthread needs to be able to

Re: [RFD PATCH 3/5] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE

2017-03-27 Thread Juri Lelli
On 27/03/17 18:50, Peter Zijlstra wrote: > On Fri, Mar 24, 2017 at 02:08:58PM +0000, Juri Lelli wrote: > > Worker kthread needs to be able to change frequency for all other > > threads. > > > > Make it special, just under STOP class. > > *yuck* ;-) > Eh,

Re: [RFD PATCH 3/5] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE

2017-03-27 Thread Juri Lelli
On 27/03/17 18:50, Peter Zijlstra wrote: > On Fri, Mar 24, 2017 at 02:08:58PM +0000, Juri Lelli wrote: > > Worker kthread needs to be able to change frequency for all other > > threads. > > > > Make it special, just under STOP class. > > *yuck* ;-) > Eh,

Re: [PATCH v3 1/3] sched/deadline: Make find_later_rq() choose a closer cpu in topology

2017-03-27 Thread Juri Lelli
Hi, On 23/03/17 11:12, Byungchul Park wrote: > When cpudl_find() returns any among free_cpus, the cpu might not be > closer than others, considering sched domain. For example: > >this_cpu: 15 >free_cpus: 0, 1,..., 14 (== later_mask) >best_cpu: 0 > >topology: > >0 --+ >

Re: [PATCH v3 1/3] sched/deadline: Make find_later_rq() choose a closer cpu in topology

2017-03-27 Thread Juri Lelli
Hi, On 23/03/17 11:12, Byungchul Park wrote: > When cpudl_find() returns any among free_cpus, the cpu might not be > closer than others, considering sched domain. For example: > >this_cpu: 15 >free_cpus: 0, 1,..., 14 (== later_mask) >best_cpu: 0 > >topology: > >0 --+ >

[PATCH v3 5/9] arm, arm64: factorize common cpu capacity default code

2017-03-27 Thread Juri Lelli
<will.dea...@arm.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Juri Lelli <juri.le...@arm.com> --- Changes from v2: - make capacity_scale and raw_capacity static - added SPDX header - improved indent - misc. whitespaces/newlines fixes Changes from v1:

[PATCH v3 5/9] arm, arm64: factorize common cpu capacity default code

2017-03-27 Thread Juri Lelli
additions. Suggested-by: Will Deacon Suggested-by: Mark Rutland Suggested-by: Catalin Marinas Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Greg Kroah-Hartman Signed-off-by: Juri Lelli --- Changes from v2: - make capacity_scale and raw_capacity static - added SPDX header

Re: [PATCH 0/8] sched/deadline: Return the best satisfying affinity and dl in cpudl_find

2017-03-27 Thread Juri Lelli
Hi, On 23/03/17 19:32, Byungchul Park wrote: > cpudl_find() is used to find a cpu having the latest dl. The function > should return the latest cpu among ones satisfying task's affinity and > dl constraint, but current code gives up immediately and just return > fail when it fails at the test

Re: [PATCH 0/8] sched/deadline: Return the best satisfying affinity and dl in cpudl_find

2017-03-27 Thread Juri Lelli
Hi, On 23/03/17 19:32, Byungchul Park wrote: > cpudl_find() is used to find a cpu having the latest dl. The function > should return the latest cpu among ones satisfying task's affinity and > dl constraint, but current code gives up immediately and just return > fail when it fails at the test

[PATCH v3 8/9] arm,arm64,drivers: move externs in a new header file

2017-03-27 Thread Juri Lelli
Create a new header file (include/linux/arch_topology.h) and put there declarations of interfaces used by arm, arm64 and drivers code. Signed-off-by: Juri Lelli <juri.le...@arm.com> --- arch/arm/kernel/topology.c| 7 +-- arch/arm64/kernel/topology.c | 4 +--- driver

[PATCH v3 8/9] arm,arm64,drivers: move externs in a new header file

2017-03-27 Thread Juri Lelli
Create a new header file (include/linux/arch_topology.h) and put there declarations of interfaces used by arm, arm64 and drivers code. Signed-off-by: Juri Lelli --- arch/arm/kernel/topology.c| 7 +-- arch/arm64/kernel/topology.c | 4 +--- drivers/base/arch_topology.c | 1 + include

[PATCH v3 3/9] arm: fix return value of parse_cpu_capacity

2017-03-27 Thread Juri Lelli
e26775 ('ARM: 8621/3: parse cpu capacity-dmips-mhz from DT') Signed-off-by: Juri Lelli <juri.le...@arm.com> --- arch/arm/kernel/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index f8a3ab82e77f..4e4af809606a

[PATCH v3 9/9] arm,arm64,drivers: add a prefix to drivers arch_topology interfaces

2017-03-27 Thread Juri Lelli
interfaces. Signed-off-by: Juri Lelli <juri.le...@arm.com> --- arch/arm/kernel/topology.c| 8 arch/arm64/kernel/topology.c | 4 ++-- drivers/base/arch_topology.c | 20 ++-- include/linux/arch_topology.h | 8 4 files changed, 20 insertions(

[PATCH v3 3/9] arm: fix return value of parse_cpu_capacity

2017-03-27 Thread Juri Lelli
') Signed-off-by: Juri Lelli --- arch/arm/kernel/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index f8a3ab82e77f..4e4af809606a 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -166,7

[PATCH v3 9/9] arm,arm64,drivers: add a prefix to drivers arch_topology interfaces

2017-03-27 Thread Juri Lelli
interfaces. Signed-off-by: Juri Lelli --- arch/arm/kernel/topology.c| 8 arch/arm64/kernel/topology.c | 4 ++-- drivers/base/arch_topology.c | 20 ++-- include/linux/arch_topology.h | 8 4 files changed, 20 insertions(+), 20 deletions(-) diff --git

[PATCH v3 6/9] drivers: remove useless comment from base/arch_topology.c

2017-03-27 Thread Juri Lelli
Printing out an error message when we failed to get the cpu device is not helping anyone. Remove it. Signed-off-by: Juri Lelli <juri.le...@arm.com> --- drivers/base/arch_topology.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/base/arch_topology.c b/d

[PATCH v3 6/9] drivers: remove useless comment from base/arch_topology.c

2017-03-27 Thread Juri Lelli
Printing out an error message when we failed to get the cpu device is not helping anyone. Remove it. Signed-off-by: Juri Lelli --- drivers/base/arch_topology.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c

[PATCH v3 2/9] Documentation/ABI: add information about cpu_capacity

2017-03-27 Thread Juri Lelli
/sys/devices/system/cpu/cpu#/cpu_capacity describe information about CPUs heterogeneity (ref. to Documentation/devicetree/bindings/arm/ cpu-capacity.txt). Add such description. Signed-off-by: Juri Lelli <juri.le...@arm.com> --- Documentation/ABI/testing/sysfs-devices-system-cpu | 7

[PATCH v3 4/9] arm: remove wrong CONFIG_PROC_SYSCTL ifdef

2017-03-27 Thread Juri Lelli
ty attribute') Signed-off-by: Juri Lelli <juri.le...@arm.com> --- arch/arm/kernel/topology.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 4e4af809606a..162c82aeed96 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm

[PATCH v3 7/9] arm,arm64,drivers: reduce scope of cap_parsing_failed

2017-03-27 Thread Juri Lelli
) means cap_from _dt is set to false. For arm64 we can simply check if raw_capacity points to something, which is not if capacity parsing has failed. Suggested-by: Morten Rasmussen <morten.rasmus...@arm.com> Signed-off-by: Juri Lelli <juri.le...@arm.com> --- arch/arm/kernel/topology.c |

[PATCH v3 2/9] Documentation/ABI: add information about cpu_capacity

2017-03-27 Thread Juri Lelli
/sys/devices/system/cpu/cpu#/cpu_capacity describe information about CPUs heterogeneity (ref. to Documentation/devicetree/bindings/arm/ cpu-capacity.txt). Add such description. Signed-off-by: Juri Lelli --- Documentation/ABI/testing/sysfs-devices-system-cpu | 7 +++ 1 file changed, 7

[PATCH v3 4/9] arm: remove wrong CONFIG_PROC_SYSCTL ifdef

2017-03-27 Thread Juri Lelli
The sysfs cpu_capacity entry for each CPU has nothing to do with PROC_FS, nor it's in /proc/sys path. Remove such ifdef. Cc: Russell King Reported-and-suggested-by: Sudeep Holla Fixes: 7e5930aaef5d ('ARM: 8622/3: add sysfs cpu_capacity attribute') Signed-off-by: Juri Lelli --- arch/arm

[PATCH v3 7/9] arm,arm64,drivers: reduce scope of cap_parsing_failed

2017-03-27 Thread Juri Lelli
) means cap_from _dt is set to false. For arm64 we can simply check if raw_capacity points to something, which is not if capacity parsing has failed. Suggested-by: Morten Rasmussen Signed-off-by: Juri Lelli --- arch/arm/kernel/topology.c | 3 +-- arch/arm64/kernel/topology.c | 5 + drivers

[PATCH v3 1/9] Documentation: arm: fix wrong reference number in DT definition

2017-03-27 Thread Juri Lelli
Reference to cpu capacity binding has a wrong number. Fix it. Reported-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Signed-off-by: Juri Lelli <juri.le...@arm.com> Acked-by: Rob Herring <r...@kernel.org> --- Documentation/devicetree/bindings/arm/cpus.txt | 4 ++--

[PATCH v3 0/9] Fix issues and factorize arm/arm64 capacity information code

2017-03-27 Thread Juri Lelli
://linux-arm.org/linux-jl.git upstream/default_caps_factorize-v3 Best, - Juri [1] v1 - https://marc.info/?l=linux-kernel=148483680119355=2 v2 - https://marc.info/?l=linux-kernel=148663344018205=2 Juri Lelli (9): Documentation: arm: fix wrong reference number in DT definition Documentation/ABI

[PATCH v3 1/9] Documentation: arm: fix wrong reference number in DT definition

2017-03-27 Thread Juri Lelli
Reference to cpu capacity binding has a wrong number. Fix it. Reported-by: Lorenzo Pieralisi Signed-off-by: Juri Lelli Acked-by: Rob Herring --- Documentation/devicetree/bindings/arm/cpus.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree

[PATCH v3 0/9] Fix issues and factorize arm/arm64 capacity information code

2017-03-27 Thread Juri Lelli
://linux-arm.org/linux-jl.git upstream/default_caps_factorize-v3 Best, - Juri [1] v1 - https://marc.info/?l=linux-kernel=148483680119355=2 v2 - https://marc.info/?l=linux-kernel=148663344018205=2 Juri Lelli (9): Documentation: arm: fix wrong reference number in DT definition Documentation/ABI

Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization

2017-03-27 Thread Juri Lelli
On 27/03/17 09:43, Luca Abeni wrote: > Hi Juri, > > On Mon, 27 Mar 2017 08:17:45 +0100 > Juri Lelli <juri.le...@arm.com> wrote: > [...] > > > > In general I feel it would be nice to have a state diagram > > > > included somewhere near these two fu

Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization

2017-03-27 Thread Juri Lelli
On 27/03/17 09:43, Luca Abeni wrote: > Hi Juri, > > On Mon, 27 Mar 2017 08:17:45 +0100 > Juri Lelli wrote: > [...] > > > > In general I feel it would be nice to have a state diagram > > > > included somewhere near these two functions. It would be nice to &g

Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization

2017-03-27 Thread Juri Lelli
On 24/03/17 22:47, Luca Abeni wrote: > Hi Peter, > > On Fri, 24 Mar 2017 14:20:41 +0100 > Peter Zijlstra wrote: > > > On Fri, Mar 24, 2017 at 04:52:55AM +0100, luca abeni wrote: > > [...] > > > > In general I feel it would be nice to have a state diagram included > >

Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization

2017-03-27 Thread Juri Lelli
On 24/03/17 22:47, Luca Abeni wrote: > Hi Peter, > > On Fri, 24 Mar 2017 14:20:41 +0100 > Peter Zijlstra wrote: > > > On Fri, Mar 24, 2017 at 04:52:55AM +0100, luca abeni wrote: > > [...] > > > > In general I feel it would be nice to have a state diagram included > > somewhere near these

[RFD PATCH 3/5] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE

2017-03-24 Thread Juri Lelli
Worker kthread needs to be able to change frequency for all other threads. Make it special, just under STOP class. Signed-off-by: Juri Lelli <juri.le...@arm.com> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Ingo Molnar <mi...@kernel.org> Cc: Rafael J. Wysocki <rafael.j.

[RFD PATCH 4/5] sched/cpufreq_schedutil: always consider all CPUs when deciding next freq

2017-03-24 Thread Juri Lelli
No assumption can be made upon the rate at which frequency updates get triggered, as there are scheduling policies (like SCHED_DEADLINE) which don't trigger them so frequently. Remove such assumption from the code. Signed-off-by: Juri Lelli <juri.le...@arm.com> Cc: Peter Zijlstr

[RFD PATCH 3/5] sched/cpufreq_schedutil: make worker kthread be SCHED_DEADLINE

2017-03-24 Thread Juri Lelli
Worker kthread needs to be able to change frequency for all other threads. Make it special, just under STOP class. Signed-off-by: Juri Lelli Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Rafael J. Wysocki Cc: Viresh Kumar Cc: Luca Abeni Cc: Claudio Scordino --- include/linux/sched.h

[RFD PATCH 4/5] sched/cpufreq_schedutil: always consider all CPUs when deciding next freq

2017-03-24 Thread Juri Lelli
No assumption can be made upon the rate at which frequency updates get triggered, as there are scheduling policies (like SCHED_DEADLINE) which don't trigger them so frequently. Remove such assumption from the code. Signed-off-by: Juri Lelli Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Rafael J

[RFD PATCH 5/5] sched/deadline: make bandwidth enforcement scale-invariant

2017-03-24 Thread Juri Lelli
to be specified profiling the task execution at max frequency on biggest capacity core) gets thus scaled accordingly. Signed-off-by: Juri Lelli <juri.le...@arm.com> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Ingo Molnar <mi...@kernel.org> Cc: Rafael J. Wysocki <rafael.j.wyso...@

[RFD PATCH 5/5] sched/deadline: make bandwidth enforcement scale-invariant

2017-03-24 Thread Juri Lelli
to be specified profiling the task execution at max frequency on biggest capacity core) gets thus scaled accordingly. Signed-off-by: Juri Lelli Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Rafael J. Wysocki Cc: Viresh Kumar Cc: Luca Abeni Cc: Claudio Scordino --- kernel/sched/deadline.c | 27

[RFD PATCH 0/5] SCHED_DEADLINE freq/cpu invariance and OPP selection

2017-03-24 Thread Juri Lelli
rd, but we should probably look into making frequency scaling (and PELT averages) available on !CONFIG_SMP as well (so that schedutil can work on such configurations for example). Since this is only an RFD and since a proper rework might be non trivial, I decided to leave it out of scope for the time be

[RFD PATCH 2/5] sched/deadline: move cpu frequency selection triggering points

2017-03-24 Thread Juri Lelli
-by: Claudio Scordino <clau...@evidence.eu.com> Signed-off-by: Juri Lelli <juri.le...@arm.com> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Ingo Molnar <mi...@kernel.org> Cc: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Cc: Viresh Kumar <viresh.ku...@linaro.org> Cc: Lu

[RFD PATCH 2/5] sched/deadline: move cpu frequency selection triggering points

2017-03-24 Thread Juri Lelli
-by: Claudio Scordino Signed-off-by: Juri Lelli Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Rafael J. Wysocki Cc: Viresh Kumar Cc: Luca Abeni --- kernel/sched/deadline.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index

[RFD PATCH 0/5] SCHED_DEADLINE freq/cpu invariance and OPP selection

2017-03-24 Thread Juri Lelli
rd, but we should probably look into making frequency scaling (and PELT averages) available on !CONFIG_SMP as well (so that schedutil can work on such configurations for example). Since this is only an RFD and since a proper rework might be non trivial, I decided to leave it out of scope for the time be

[RFD PATCH 1/5] sched/cpufreq_schedutil: make use of DEADLINE utilization signal

2017-03-24 Thread Juri Lelli
lau...@evidence.eu.com> Signed-off-by: Juri Lelli <juri.le...@arm.com> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Ingo Molnar <mi...@kernel.org> Cc: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Cc: Viresh Kumar <viresh.ku...@linaro.org> Cc: Luca Abeni <luca.ab...@santannapisa

[RFD PATCH 1/5] sched/cpufreq_schedutil: make use of DEADLINE utilization signal

2017-03-24 Thread Juri Lelli
SCHED_DEADLINE tracks active utilization signal with a per rq variable named running_bw. Make use of that to drive cpu frequency selection: add up FAIR and DEADLINE contribution to get the required CPU capacity to handle both requirements. Co-authored-by: Claudio Scordino Signed-off-by: Juri

Re: [RFC v3 5/5] sched/{core,cpufreq_schedutil}: add capacity clamping for RT/DL tasks

2017-03-16 Thread Juri Lelli
On 16/03/17 09:58, Joel Fernandes wrote: > On Thu, Mar 16, 2017 at 5:44 AM, Juri Lelli <juri.le...@arm.com> wrote: > > On 16/03/17 12:27, Patrick Bellasi wrote: > >> On 16-Mar 11:16, Juri Lelli wrote: > >> > On 15/03/17 16:40, Joel Fernandes wrote: > >&

Re: [RFC v3 5/5] sched/{core,cpufreq_schedutil}: add capacity clamping for RT/DL tasks

2017-03-16 Thread Juri Lelli
On 16/03/17 09:58, Joel Fernandes wrote: > On Thu, Mar 16, 2017 at 5:44 AM, Juri Lelli wrote: > > On 16/03/17 12:27, Patrick Bellasi wrote: > >> On 16-Mar 11:16, Juri Lelli wrote: > >> > On 15/03/17 16:40, Joel Fernandes wrote: > >> > > On We

Re: [RFC v3 5/5] sched/{core,cpufreq_schedutil}: add capacity clamping for RT/DL tasks

2017-03-16 Thread Juri Lelli
On 16/03/17 12:27, Patrick Bellasi wrote: > On 16-Mar 11:16, Juri Lelli wrote: > > On 15/03/17 16:40, Joel Fernandes wrote: > > > On Wed, Mar 15, 2017 at 9:24 AM, Juri Lelli <juri.le...@arm.com> wrote: > > > [..] > > > > > > > >> > Ho

Re: [RFC v3 5/5] sched/{core,cpufreq_schedutil}: add capacity clamping for RT/DL tasks

2017-03-16 Thread Juri Lelli
On 16/03/17 12:27, Patrick Bellasi wrote: > On 16-Mar 11:16, Juri Lelli wrote: > > On 15/03/17 16:40, Joel Fernandes wrote: > > > On Wed, Mar 15, 2017 at 9:24 AM, Juri Lelli wrote: > > > [..] > > > > > > > >> > However,

Re: [RFC v3 5/5] sched/{core,cpufreq_schedutil}: add capacity clamping for RT/DL tasks

2017-03-16 Thread Juri Lelli
On 15/03/17 16:40, Joel Fernandes wrote: > On Wed, Mar 15, 2017 at 9:24 AM, Juri Lelli <juri.le...@arm.com> wrote: > [..] > > > >> > However, trying to quickly summarize how that would work (for who is > >> > already somewhat familiar with reclaiming

Re: [RFC v3 5/5] sched/{core,cpufreq_schedutil}: add capacity clamping for RT/DL tasks

2017-03-16 Thread Juri Lelli
On 15/03/17 16:40, Joel Fernandes wrote: > On Wed, Mar 15, 2017 at 9:24 AM, Juri Lelli wrote: > [..] > > > >> > However, trying to quickly summarize how that would work (for who is > >> > already somewhat familiar with reclaiming bits): > >>

Re: [RFC v3 5/5] sched/{core,cpufreq_schedutil}: add capacity clamping for RT/DL tasks

2017-03-15 Thread Juri Lelli
On 15/03/17 09:13, Joel Fernandes wrote: > On Wed, Mar 15, 2017 at 7:44 AM, Juri Lelli <juri.le...@arm.com> wrote: > > Hi Joel, > > > > On 15/03/17 05:59, Joel Fernandes wrote: > >> On Wed, Mar 15, 2017 at 4:40 AM, Patrick Bellasi > >> <patrick.bell

Re: [RFC v3 5/5] sched/{core,cpufreq_schedutil}: add capacity clamping for RT/DL tasks

2017-03-15 Thread Juri Lelli
On 15/03/17 09:13, Joel Fernandes wrote: > On Wed, Mar 15, 2017 at 7:44 AM, Juri Lelli wrote: > > Hi Joel, > > > > On 15/03/17 05:59, Joel Fernandes wrote: > >> On Wed, Mar 15, 2017 at 4:40 AM, Patrick Bellasi > >> wrote: > >> > On 13-Mar 03:08

Re: [RFC v3 5/5] sched/{core,cpufreq_schedutil}: add capacity clamping for RT/DL tasks

2017-03-15 Thread Juri Lelli
Hi Joel, On 15/03/17 05:59, Joel Fernandes wrote: > On Wed, Mar 15, 2017 at 4:40 AM, Patrick Bellasi > wrote: > > On 13-Mar 03:08, Joel Fernandes (Google) wrote: > >> Hi Patrick, > >> > >> On Tue, Feb 28, 2017 at 6:38 AM, Patrick Bellasi > >>

Re: [RFC v3 5/5] sched/{core,cpufreq_schedutil}: add capacity clamping for RT/DL tasks

2017-03-15 Thread Juri Lelli
Hi Joel, On 15/03/17 05:59, Joel Fernandes wrote: > On Wed, Mar 15, 2017 at 4:40 AM, Patrick Bellasi > wrote: > > On 13-Mar 03:08, Joel Fernandes (Google) wrote: > >> Hi Patrick, > >> > >> On Tue, Feb 28, 2017 at 6:38 AM, Patrick Bellasi > >> wrote: > >> > Currently schedutil enforce a maximum

Re: [PATCH] sched/deadline: Add missing update_rq_clock() in dl_task_timer()

2017-03-15 Thread Juri Lelli
and currnet rq is offline. The rq clock of the new rq should > be updated. This patch fixes it by updating the rq clock after holding > the new rq's rq lock. > > Cc: Juri Lelli <juri.le...@arm.com> > Cc: Peter Zijlstra <pet...@infradead.org> > Cc: Ingo Molnar <

Re: [PATCH] sched/deadline: Add missing update_rq_clock() in dl_task_timer()

2017-03-15 Thread Juri Lelli
clock of the new rq should > be updated. This patch fixes it by updating the rq clock after holding > the new rq's rq lock. > > Cc: Juri Lelli > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Thomas Gleixner > Cc: Matt Fleming > Signed-off-by: Wanpeng Li > ---

Re: [PATCH v2 6/9] arm, arm64: factorize common cpu capacity default code

2017-03-09 Thread Juri Lelli
Hi Greg, did you have a chance to have a look at my replies below? It would be really helpful to understand from you how to move forward with this set. Best Regards, - Juri On 13/02/17 15:09, Juri Lelli wrote: > Hi Greg, > > On 10/02/17 15:28, Greg KH wrote: > > On Thu, Feb 09

Re: [PATCH v2 6/9] arm, arm64: factorize common cpu capacity default code

2017-03-09 Thread Juri Lelli
Hi Greg, did you have a chance to have a look at my replies below? It would be really helpful to understand from you how to move forward with this set. Best Regards, - Juri On 13/02/17 15:09, Juri Lelli wrote: > Hi Greg, > > On 10/02/17 15:28, Greg KH wrote: > > On Thu, Feb 09

Re: [PATCH v3] sched/deadline: Change the time to replenish runtime for sleep tasks

2017-03-01 Thread Juri Lelli
On 01/03/17 12:37, Byungchul Park wrote: > On Tue, Feb 28, 2017 at 05:47:53PM +0000, Juri Lelli wrote: > > > > > Let's consider the following example. > > > > > > > > > > timel

Re: [PATCH v3] sched/deadline: Change the time to replenish runtime for sleep tasks

2017-03-01 Thread Juri Lelli
On 01/03/17 12:37, Byungchul Park wrote: > On Tue, Feb 28, 2017 at 05:47:53PM +0000, Juri Lelli wrote: > > > > > Let's consider the following example. > > > > > > > > > > timel

Re: [PATCH v3] sched/deadline: Change the time to replenish runtime for sleep tasks

2017-02-28 Thread Juri Lelli
On 28/02/17 22:09, Byungchul Park wrote: > On Tue, Feb 28, 2017 at 11:35:15AM +0000, Juri Lelli wrote: > > Hi, > > > > On 23/02/17 15:14, Byungchul Park wrote: > > > Let's consider the following example. > > > > > > timel

Re: [PATCH v3] sched/deadline: Change the time to replenish runtime for sleep tasks

2017-02-28 Thread Juri Lelli
On 28/02/17 22:09, Byungchul Park wrote: > On Tue, Feb 28, 2017 at 11:35:15AM +0000, Juri Lelli wrote: > > Hi, > > > > On 23/02/17 15:14, Byungchul Park wrote: > > > Let's consider the following example. > > > > > > timel

Re: [PATCH] sched: deadline: Fix confusing comments about selection of top pi-waiter

2017-02-28 Thread Juri Lelli
n "we > have a top pi-waiter which is a SCHED_DEADLINE task" in that order. Also fix a > typo that follows. > > Cc: Juri Lelli <juri.le...@arm.com> > Signed-off-by: Joel Fernandes <joe...@google.com> Looks good to me. Acked-by: Juri Lelli <juri.le...@arm.com> Thanks, - Juri

Re: [PATCH] sched: deadline: Fix confusing comments about selection of top pi-waiter

2017-02-28 Thread Juri Lelli
n "we > have a top pi-waiter which is a SCHED_DEADLINE task" in that order. Also fix a > typo that follows. > > Cc: Juri Lelli > Signed-off-by: Joel Fernandes Looks good to me. Acked-by: Juri Lelli Thanks, - Juri

Re: [PATCH v3] sched/deadline: Change the time to replenish runtime for sleep tasks

2017-02-28 Thread Juri Lelli
Hi, On 23/02/17 15:14, Byungchul Park wrote: > Let's consider the following example. > > timeline : o...o.o...o..o >^ ^ ^ ^ ^ >| | | | | >start |

Re: [PATCH v3] sched/deadline: Change the time to replenish runtime for sleep tasks

2017-02-28 Thread Juri Lelli
Hi, On 23/02/17 15:14, Byungchul Park wrote: > Let's consider the following example. > > timeline : o...o.o...o..o >^ ^ ^ ^ ^ >| | | | | >start |

Re: [PATCH v3 2/2] sched/rt: Remove unnecessary condition in push_rt_task()

2017-02-16 Thread Juri Lelli
the redundant condition and make code simpler. > > > > > > By this patch, unnecessary one branch and two LOAD operations in 'if' > > > statement can be avoided. > > > > > > Signed-off-by: Byungchul Park <byungchul.p...@lge.com> > > > Revie

Re: [PATCH v3 2/2] sched/rt: Remove unnecessary condition in push_rt_task()

2017-02-16 Thread Juri Lelli
ke code simpler. > > > > > > By this patch, unnecessary one branch and two LOAD operations in 'if' > > > statement can be avoided. > > > > > > Signed-off-by: Byungchul Park > > > Reviewed-by: Steven Rostedt (VMware) > > > Reviewed-by:

Re: [PATCH] sched/deadline: Remove unnecessary condition in push_dl_task()

2017-02-15 Thread Juri Lelli
On 15/02/17 09:25, Steven Rostedt wrote: > On Wed, 15 Feb 2017 10:47:49 + > Juri Lelli <juri.le...@arm.com> wrote: > > > [+Steve, Luca] > > > > Hi, > > > > On 15/02/17 14:11, Byungchul Park wrote: > > > Once pick_next_pushable_dl_task(

Re: [PATCH] sched/deadline: Remove unnecessary condition in push_dl_task()

2017-02-15 Thread Juri Lelli
On 15/02/17 09:25, Steven Rostedt wrote: > On Wed, 15 Feb 2017 10:47:49 + > Juri Lelli wrote: > > > [+Steve, Luca] > > > > Hi, > > > > On 15/02/17 14:11, Byungchul Park wrote: > > > Once pick_next_pushable_dl_task(rq) return a task, it gua

Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow

2017-02-15 Thread Juri Lelli
On 15/02/17 14:33, Daniel Bristot de Oliveira wrote: > On 02/15/2017 01:59 PM, Juri Lelli wrote: > > Actually, another thing that we noticed, talking on IRC with Peter, is > > that we seem to be replenishing differently on different occasions: > > When a task is awakened (not

Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow

2017-02-15 Thread Juri Lelli
On 15/02/17 14:33, Daniel Bristot de Oliveira wrote: > On 02/15/2017 01:59 PM, Juri Lelli wrote: > > Actually, another thing that we noticed, talking on IRC with Peter, is > > that we seem to be replenishing differently on different occasions: > > When a task is awakened (not

Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow

2017-02-15 Thread Juri Lelli
On 15/02/17 14:13, Luca Abeni wrote: > On Wed, 15 Feb 2017 12:59:25 + > Juri Lelli <juri.le...@arm.com> wrote: > > > On 15/02/17 13:31, Luca Abeni wrote: > > > Hi Juri, > > > > > > On Wed, 15 Feb 2017 10:29:19 + > > > Juri Lel

Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow

2017-02-15 Thread Juri Lelli
On 15/02/17 14:13, Luca Abeni wrote: > On Wed, 15 Feb 2017 12:59:25 + > Juri Lelli wrote: > > > On 15/02/17 13:31, Luca Abeni wrote: > > > Hi Juri, > > > > > > On Wed, 15 Feb 2017 10:29:19 + > > > Juri Lelli wrote: > > > [...

Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow

2017-02-15 Thread Juri Lelli
On 15/02/17 13:31, Luca Abeni wrote: > Hi Juri, > > On Wed, 15 Feb 2017 10:29:19 +0000 > Juri Lelli <juri.le...@arm.com> wrote: > [...] > > > Ok, thanks; I think I can now see why this can result in a task > > > consuming more than the reserved ut

Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow

2017-02-15 Thread Juri Lelli
On 15/02/17 13:31, Luca Abeni wrote: > Hi Juri, > > On Wed, 15 Feb 2017 10:29:19 +0000 > Juri Lelli wrote: > [...] > > > Ok, thanks; I think I can now see why this can result in a task > > > consuming more than the reserved utilisation. I still need some > &

Re: [PATCH] sched/deadline: Remove unnecessary condition in push_dl_task()

2017-02-15 Thread Juri Lelli
[+Steve, Luca] Hi, On 15/02/17 14:11, Byungchul Park wrote: > Once pick_next_pushable_dl_task(rq) return a task, it guarantees that > the task's cpu is rq->cpu, so task_cpu(next_task) is always rq->cpu if > task == next_task. Remove a redundant condition and make code simpler. > >

Re: [PATCH] sched/deadline: Remove unnecessary condition in push_dl_task()

2017-02-15 Thread Juri Lelli
[+Steve, Luca] Hi, On 15/02/17 14:11, Byungchul Park wrote: > Once pick_next_pushable_dl_task(rq) return a task, it guarantees that > the task's cpu is rq->cpu, so task_cpu(next_task) is always rq->cpu if > task == next_task. Remove a redundant condition and make code simpler. > >

Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow

2017-02-15 Thread Juri Lelli
consuming more than the reserved utilisation. I still need some time to > convince me that "runtime / (deadline - t) > dl_runtime / dl_deadline" > is the correct check to use (in this case, shouldn't we also change the > admission test to use densities instead of utilisations?

Re: [PATCH 3/2] sched/deadline: Use deadline instead of period when calculating overflow

2017-02-15 Thread Juri Lelli
served utilisation. I still need some time to > convince me that "runtime / (deadline - t) > dl_runtime / dl_deadline" > is the correct check to use (in this case, shouldn't we also change the > admission test to use densities instead of utilisations?) > Right, thi

Re: [PATCH] sched/deadline: Remove redundant code replenishing runtime

2017-02-14 Thread Juri Lelli
On 14/02/17 11:06, Byungchul Park wrote: > On Tue, Feb 14, 2017 at 08:42:43AM +0900, Byungchul Park wrote: > > On Mon, Feb 13, 2017 at 03:24:55PM +0000, Juri Lelli wrote: > > > > > > I think we actually want to replenish and set the next deadline at > > >

Re: [PATCH] sched/deadline: Remove redundant code replenishing runtime

2017-02-14 Thread Juri Lelli
On 14/02/17 11:06, Byungchul Park wrote: > On Tue, Feb 14, 2017 at 08:42:43AM +0900, Byungchul Park wrote: > > On Mon, Feb 13, 2017 at 03:24:55PM +0000, Juri Lelli wrote: > > > > > > I think we actually want to replenish and set the next deadline at > > >

Re: [PATCH 1/2] sched/deadline: Replenishment timer should fire in the next period

2017-02-13 Thread Juri Lelli
ou disagree. > > You can add mine too. I put in a lot of trace_printk()s and it all > appears to be exactly as Daniel describes. > > Reviewed-by: Steven Rostedt (VMware) <rost...@goodmis.org> > I'm a bit late, but I looked at it as well and it looks good. If you want, Reviewed-by: Juri Lelli <juri.le...@arm.com> Thanks! - Juri

Re: [PATCH 1/2] sched/deadline: Replenishment timer should fire in the next period

2017-02-13 Thread Juri Lelli
in a lot of trace_printk()s and it all > appears to be exactly as Daniel describes. > > Reviewed-by: Steven Rostedt (VMware) > I'm a bit late, but I looked at it as well and it looks good. If you want, Reviewed-by: Juri Lelli Thanks! - Juri

Re: [PATCH] sched/deadline: Remove redundant code replenishing runtime

2017-02-13 Thread Juri Lelli
[+Luca] On 13/02/17 13:29, Byungchul Park wrote: > On Mon, Feb 13, 2017 at 11:30:09AM +0900, Byungchul Park wrote: > > On Fri, Feb 10, 2017 at 01:39:33PM +0000, Juri Lelli wrote: > > > Hi, > > > > > > On 10/02/17 18:11, Byungchul Park wrote: > > >

Re: [PATCH] sched/deadline: Remove redundant code replenishing runtime

2017-02-13 Thread Juri Lelli
[+Luca] On 13/02/17 13:29, Byungchul Park wrote: > On Mon, Feb 13, 2017 at 11:30:09AM +0900, Byungchul Park wrote: > > On Fri, Feb 10, 2017 at 01:39:33PM +0000, Juri Lelli wrote: > > > Hi, > > > > > > On 10/02/17 18:11, Byungchul Park wrote: > > >

Re: [PATCH v2 6/9] arm, arm64: factorize common cpu capacity default code

2017-02-13 Thread Juri Lelli
Hi Greg, On 10/02/17 15:28, Greg KH wrote: > On Thu, Feb 09, 2017 at 09:25:22AM +0000, 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

Re: [PATCH v2 6/9] arm, arm64: factorize common cpu capacity default code

2017-02-13 Thread Juri Lelli
Hi Greg, On 10/02/17 15:28, Greg KH wrote: > On Thu, Feb 09, 2017 at 09:25:22AM +0000, 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

Re: [PATCH] sched/deadline: Remove redundant code replenishing runtime

2017-02-10 Thread Juri Lelli
Hi, On 10/02/17 18:11, Byungchul Park wrote: > For a task passing its deadline while !rq, it will be replenished > in the following path because dl_se->deadline < rq_lock. > >enqueue_dl_entity(ENQUEUE_WAKEUP) > update_dl_entity > > Therefore, code replenishing it in the timer callback

Re: [PATCH] sched/deadline: Remove redundant code replenishing runtime

2017-02-10 Thread Juri Lelli
Hi, On 10/02/17 18:11, Byungchul Park wrote: > For a task passing its deadline while !rq, it will be replenished > in the following path because dl_se->deadline < rq_lock. > >enqueue_dl_entity(ENQUEUE_WAKEUP) > update_dl_entity > > Therefore, code replenishing it in the timer callback

[PATCH v2 3/9] arm: fix return value of parse_cpu_capacity

2017-02-09 Thread Juri Lelli
e26775 ('ARM: 8621/3: parse cpu capacity-dmips-mhz from DT') Signed-off-by: Juri Lelli <juri.le...@arm.com> --- arch/arm/kernel/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index ebf47d91b804..b439f7fff86b

[PATCH v2 3/9] arm: fix return value of parse_cpu_capacity

2017-02-09 Thread Juri Lelli
') Signed-off-by: Juri Lelli --- arch/arm/kernel/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index ebf47d91b804..b439f7fff86b 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -165,7

[PATCH v2 1/9] Documentation: arm: fix wrong reference number in DT definition

2017-02-09 Thread Juri Lelli
Reference to cpu capacity binding has a wrong number. Fix it. Reported-by: Lorenzo Pieralisi <lorenzo.pieral...@arm.com> Signed-off-by: Juri Lelli <juri.le...@arm.com> Acked-by: Rob Herring <r...@kernel.org> --- Documentation/devicetree/bindings/arm/cpus.txt | 4 ++--

[PATCH v2 1/9] Documentation: arm: fix wrong reference number in DT definition

2017-02-09 Thread Juri Lelli
Reference to cpu capacity binding has a wrong number. Fix it. Reported-by: Lorenzo Pieralisi Signed-off-by: Juri Lelli Acked-by: Rob Herring --- Documentation/devicetree/bindings/arm/cpus.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree

[PATCH v2 0/9] Fix issues and factorize arm/arm64 capacity information code

2017-02-09 Thread Juri Lelli
/linux-jl.git upstream/default_caps_factorize-v2 Best, - Juri [1] v1 - https://marc.info/?l=linux-kernel=148483680119355=2 Juri Lelli (9): Documentation: arm: fix wrong reference number in DT definition Documentation/ABI: add information about cpu_capacity arm: fix return value

[PATCH v2 0/9] Fix issues and factorize arm/arm64 capacity information code

2017-02-09 Thread Juri Lelli
/linux-jl.git upstream/default_caps_factorize-v2 Best, - Juri [1] v1 - https://marc.info/?l=linux-kernel=148483680119355=2 Juri Lelli (9): Documentation: arm: fix wrong reference number in DT definition Documentation/ABI: add information about cpu_capacity arm: fix return value

[PATCH v2 2/9] Documentation/ABI: add information about cpu_capacity

2017-02-09 Thread Juri Lelli
/sys/devices/system/cpu/cpu#/cpu_capacity describe information about CPUs heterogeneity (ref. to Documentation/devicetree/bindings/arm/ cpu-capacity.txt). Add such description. Signed-off-by: Juri Lelli <juri.le...@arm.com> --- Documentation/ABI/testing/sysfs-devices-system-cpu | 7

[PATCH v2 2/9] Documentation/ABI: add information about cpu_capacity

2017-02-09 Thread Juri Lelli
/sys/devices/system/cpu/cpu#/cpu_capacity describe information about CPUs heterogeneity (ref. to Documentation/devicetree/bindings/arm/ cpu-capacity.txt). Add such description. Signed-off-by: Juri Lelli --- Documentation/ABI/testing/sysfs-devices-system-cpu | 7 +++ 1 file changed, 7

[PATCH v2 4/9] arm: remove wrong CONFIG_PROC_SYSCTL ifdef

2017-02-09 Thread Juri Lelli
ty attribute') Signed-off-by: Juri Lelli <juri.le...@arm.com> --- arch/arm/kernel/topology.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index b439f7fff86b..c760a321935b 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm

[PATCH v2 4/9] arm: remove wrong CONFIG_PROC_SYSCTL ifdef

2017-02-09 Thread Juri Lelli
The sysfs cpu_capacity entry for each CPU has nothing to do with PROC_FS, nor it's in /proc/sys path. Remove such ifdef. Cc: Russell King Reported-and-suggested-by: Sudeep Holla Fixes: 7e5930aaef5d ('ARM: 8622/3: add sysfs cpu_capacity attribute') Signed-off-by: Juri Lelli --- arch/arm

<    6   7   8   9   10   11   12   13   14   15   >