Re: [RFT PATCH v1 3/4] cpu-topology: Move cpu topology code to common code.

2018-12-04 Thread Juri Lelli
> > > Thanks Will for pointing this. I agree with you and like to be added as > reviewer for this. > > Since arch_topology.c was mostly added for ARM/ARM64 and by Juri Lelli > (who is no longer with ARM) and I did review the initial version, I would > like to assume maintenance

Re: [PATCH V5 1/2] base/drivers/arch_topology: Replace mutex with READ_ONCE / WRITE_ONCE

2018-11-29 Thread Juri Lelli
On 29/11/18 11:02, Daniel Lezcano wrote: > On 29/11/2018 10:58, Juri Lelli wrote: > > On 29/11/18 10:18, Daniel Lezcano wrote: > >> On 29/11/2018 08:04, Juri Lelli wrote: > >> > >> [ ... ] > >> > >>>> With or without thi

Re: [PATCH V5 1/2] base/drivers/arch_topology: Replace mutex with READ_ONCE / WRITE_ONCE

2018-11-29 Thread Juri Lelli
On 29/11/18 10:18, Daniel Lezcano wrote: > On 29/11/2018 08:04, Juri Lelli wrote: > > [ ... ] > > >> With or without this patch, it is the case: > >> > >> task1 task2 > >> |

Re: [PATCH V5 1/2] base/drivers/arch_topology: Replace mutex with READ_ONCE / WRITE_ONCE

2018-11-28 Thread Juri Lelli
On 28/11/18 18:54, Daniel Lezcano wrote: > On 28/11/2018 12:44, Juri Lelli wrote: > > Hi Daniel, > > > > On 27/11/18 14:24, Daniel Lezcano wrote: > >> The mutex protects a per_cpu variable access. The potential race can > >> happen only when the cpufreq go

Re: [PATCH V5 1/2] base/drivers/arch_topology: Replace mutex with READ_ONCE / WRITE_ONCE

2018-11-28 Thread Juri Lelli
Hi Daniel, On 27/11/18 14:24, Daniel Lezcano wrote: > The mutex protects a per_cpu variable access. The potential race can > happen only when the cpufreq governor module is loaded and at the same > time the cpu capacity is changed in the sysfs. > > There is no real interest of using a mutex to

Re: [PATCH 2/4] base/drivers/arch_topology: Replace mutex with READ_ONCE / WRITE_ONCE

2018-11-26 Thread Juri Lelli
ssues. > > > > If user-space starts writing the value to influence the scheduler, then > > it makes it difficult for kernel to change the way it uses the > > cpu_capacity in future. > > > > Sorry if there's valid usecase and I am just making noise here. &

Re: WARNING in enqueue_task_dl

2018-11-19 Thread Juri Lelli
On 19/11/18 14:43, Juri Lelli wrote: > On 19/11/18 13:52, Peter Zijlstra wrote: > > On Mon, Nov 19, 2018 at 01:07:18PM +0100, luca abeni wrote: > > > > > > On Sun, 18 Nov 2018, syzbot wrote: > > > > > > > WARNING: CPU: 1 PID: 6351 at kernel/sched

Re: WARNING in enqueue_task_dl

2018-11-19 Thread Juri Lelli
On 19/11/18 13:52, Peter Zijlstra wrote: > On Mon, Nov 19, 2018 at 01:07:18PM +0100, luca abeni wrote: > > > > On Sun, 18 Nov 2018, syzbot wrote: > > > > > WARNING: CPU: 1 PID: 6351 at kernel/sched/deadline.c:628 > > > > enqueue_task_dl+0x22da/0x38a0 kernel/sched/deadline.c:1504 > > > > Here,

Re: [PATCH v5 3/5] cgroup/cpuset: make callback_lock raw

2018-11-09 Thread Juri Lelli
On 08/11/18 14:11, Waiman Long wrote: > On 11/07/2018 11:38 AM, Juri Lelli wrote: > > Hi, > > > > On 07/11/18 07:53, Tejun Heo wrote: > >> Hello, > >> > >> On Tue, Sep 25, 2018 at 04:34:16PM +0200, Juri Lelli wrote: > >>> It would be

Re: [PATCH v5 4/5] sched/core: Prevent race condition between cpuset and __sched_setscheduler()

2018-11-08 Thread Juri Lelli
Hi, On 08/11/18 10:49, Waiman Long wrote: > On 10/04/2018 05:04 AM, Juri Lelli wrote: [...] > > +/** > > + * cpuset_read_only_lock - Grab the callback_lock from cpuset subsystem. > > + * > > + * Description: As described in full details the comment above cpuset_mute

Re: [PATCH v5 3/5] cgroup/cpuset: make callback_lock raw

2018-11-08 Thread Juri Lelli
On 07/11/18 17:38, Juri Lelli wrote: > Hi, > > On 07/11/18 07:53, Tejun Heo wrote: > > Hello, > > > > On Tue, Sep 25, 2018 at 04:34:16PM +0200, Juri Lelli wrote: > > > It would be great if you could please have a look at the proposed change > >

[tip:timers/urgent] posix-cpu-timers: Remove useless call to check_dl_overrun()

2018-11-07 Thread tip-bot for Juri Lelli
Commit-ID: e6a2d72c10405b30ddba5af2e44a9d3d925a56d3 Gitweb: https://git.kernel.org/tip/e6a2d72c10405b30ddba5af2e44a9d3d925a56d3 Author: Juri Lelli AuthorDate: Wed, 7 Nov 2018 12:10:32 +0100 Committer: Thomas Gleixner CommitDate: Thu, 8 Nov 2018 07:43:35 +0100 posix-cpu-timers: Remove

Re: [PATCH v5 3/5] cgroup/cpuset: make callback_lock raw

2018-11-07 Thread Juri Lelli
Hi, On 07/11/18 07:53, Tejun Heo wrote: > Hello, > > On Tue, Sep 25, 2018 at 04:34:16PM +0200, Juri Lelli wrote: > > It would be great if you could please have a look at the proposed change > > below (and the rest of the set of course :-). > > Yeah, looks good to m

[PATCH] kernel/time/posix-cpu-timers: Remove useless call to check_dl_overrun

2018-11-07 Thread Juri Lelli
sched/deadline: Implement "runtime overrun signal" support") Signed-off-by: Juri Lelli Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Luca Abeni Cc: Claudio Scordino Cc: Mathieu Poirier --- kernel/time/posix-cpu-timers.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/k

Re: [PATCH v5 3/5] cgroup/cpuset: make callback_lock raw

2018-11-07 Thread Juri Lelli
Hi, Ping. Thanks, - Juri On 25/09/18 16:34, Juri Lelli wrote: > Hi Li Zefan and Tejun Heo, > > It would be great if you could please have a look at the proposed change > below (and the rest of the set of course :-). > > Another bit that I'd be more comfortable after

Re: INFO: rcu detected stall in do_idle

2018-11-06 Thread Juri Lelli
On 30/10/18 12:12, Juri Lelli wrote: > On 30/10/18 11:45, Peter Zijlstra wrote: > > [...] > > > Hurm.. right. We knew of this issue back when we did it. > > I suppose now it hurts and we need to figure something out. > > > > By virtue of being a real-t

Re: INFO: rcu detected stall in do_idle

2018-11-05 Thread Juri Lelli
On 02/11/18 11:00, Daniel Bristot de Oliveira wrote: > On 11/1/18 6:55 AM, Juri Lelli wrote: > >> I meant, I am not against the/a fix, i just think that... it is more > >> complicated > >> that it seems. > >> > >> For example: Let's as

Re: INFO: rcu detected stall in do_idle

2018-10-31 Thread Juri Lelli
On 31/10/18 18:58, Daniel Bristot de Oliveira wrote: > On 10/31/18 5:40 PM, Juri Lelli wrote: > > On 31/10/18 17:18, Daniel Bristot de Oliveira wrote: > >> On 10/30/18 12:08 PM, luca abeni wrote: > >>> Hi Peter, > >>> > >>> On Tue,

Re: INFO: rcu detected stall in do_idle

2018-10-31 Thread Juri Lelli
On 31/10/18 17:18, Daniel Bristot de Oliveira wrote: > On 10/30/18 12:08 PM, luca abeni wrote: > > Hi Peter, > > > > On Tue, 30 Oct 2018 11:45:54 +0100 > > Peter Zijlstra wrote: > > [...] > >>> 2. This is related to perf_event_open syscall reproducer does > >>> before becoming DEADLINE and

Re: INFO: rcu detected stall in do_idle

2018-10-30 Thread Juri Lelli
On 30/10/18 11:45, Peter Zijlstra wrote: [...] > Hurm.. right. We knew of this issue back when we did it. > I suppose now it hurts and we need to figure something out. > > By virtue of being a real-time class, we do indeed need to have deadline > on the wall-clock. But if we then don't account

Re: INFO: rcu detected stall in do_idle

2018-10-28 Thread Juri Lelli
On 27/10/18 12:16, Dmitry Vyukov wrote: > On Wed, Oct 24, 2018 at 1:03 PM, Juri Lelli wrote: > > > > On 19/10/18 22:50, luca abeni wrote: > > > On Fri, 19 Oct 2018 13:39:42 +0200 > > > Peter Zijlstra wrote: > > > > > > > On Thu, Oct 18, 2018

Re: INFO: rcu detected stall in do_idle

2018-10-24 Thread Juri Lelli
On 19/10/18 22:50, luca abeni wrote: > On Fri, 19 Oct 2018 13:39:42 +0200 > Peter Zijlstra wrote: > > > On Thu, Oct 18, 2018 at 01:08:11PM +0200, luca abeni wrote: > > > Ok, I see the issue now: the problem is that the "while > > > (dl_se->runtime <= 0)" loop is executed at replenishment time,

Re: INFO: rcu detected stall in do_idle

2018-10-18 Thread Juri Lelli
On 18/10/18 13:08, luca abeni wrote: > On Thu, 18 Oct 2018 12:47:13 +0200 > Juri Lelli wrote: > > > Hi, > > > > On 18/10/18 12:23, luca abeni wrote: > > > Hi Juri, > > > > > > On Thu, 18 Oct 2018 10:28:38 +0200 > > &

Re: INFO: rcu detected stall in do_idle

2018-10-18 Thread Juri Lelli
Hi, On 18/10/18 12:23, luca abeni wrote: > Hi Juri, > > On Thu, 18 Oct 2018 10:28:38 +0200 > Juri Lelli wrote: > [...] > > struct sched_attr { > > .size = 0, > > .policy = 6, > > .flags = 0, > > .nice = 0, > > .p

Re: INFO: rcu detected stall in do_idle

2018-10-18 Thread Juri Lelli
On 18/10/18 11:48, Peter Zijlstra wrote: > On Thu, Oct 18, 2018 at 10:28:38AM +0200, Juri Lelli wrote: > > > Another side problem seems also to be that with such tiny parameters we > > spend lot of time in the while (dl_se->runtime <= 0) loop of replenish_dl_ > >

Re: INFO: rcu detected stall in do_idle

2018-10-18 Thread Juri Lelli
On 16/10/18 16:03, Peter Zijlstra wrote: > On Tue, Oct 16, 2018 at 03:24:06PM +0200, Thomas Gleixner wrote: > > It does reproduce here but with a kworker stall. Looking at the reproducer: > > > > *(uint32_t*)0x2000 = 0; > > *(uint32_t*)0x2004 = 6; > > *(uint64_t*)0x2008 = 0; > >

Re: INFO: rcu detected stall in do_idle

2018-10-16 Thread Juri Lelli
On 16/10/18 16:45, Thomas Gleixner wrote: > On Tue, 16 Oct 2018, Juri Lelli wrote: > > On 16/10/18 16:03, Peter Zijlstra wrote: > > > On Tue, Oct 16, 2018 at 03:24:06PM +0200, Thomas Gleixner wrote: > > > > It does reproduce here but with a kworker stall. Look

Re: INFO: rcu detected stall in do_idle

2018-10-16 Thread Juri Lelli
On 16/10/18 16:03, Peter Zijlstra wrote: > On Tue, Oct 16, 2018 at 03:24:06PM +0200, Thomas Gleixner wrote: > > It does reproduce here but with a kworker stall. Looking at the reproducer: > > > > *(uint32_t*)0x2000 = 0; > > *(uint32_t*)0x2004 = 6; > > *(uint64_t*)0x2008 = 0; > >

Re: [PATCH v8 10/15] sched: Introduce a sysctl for Energy Aware Scheduling

2018-10-16 Thread Juri Lelli
On 16/10/18 14:36, Quentin Perret wrote: > Hi, > > On Tuesday 16 Oct 2018 at 14:50:58 (+0200), Juri Lelli wrote: > > Hi, > > > > On 16/10/18 11:15, Quentin Perret wrote: > > > > [...] > > > > > diff --git a/kernel/sysctl.c b/kernel/

Re: [PATCH v8 10/15] sched: Introduce a sysctl for Energy Aware Scheduling

2018-10-16 Thread Juri Lelli
Hi, On 16/10/18 11:15, Quentin Perret wrote: [...] > diff --git a/kernel/sysctl.c b/kernel/sysctl.c > index cc02050fd0c4..481309a11174 100644 > --- a/kernel/sysctl.c > +++ b/kernel/sysctl.c > @@ -466,6 +466,17 @@ static struct ctl_table kern_table[] = { > .extra1 = , >

Re: [RFD/RFC PATCH 5/8] sched: Add proxy execution

2018-10-12 Thread Juri Lelli
On 12/10/18 09:22, luca abeni wrote: > On Thu, 11 Oct 2018 14:53:25 +0200 > Peter Zijlstra wrote: > > [...] > > > > > + if (rq->curr != rq->idle) { > > > > > + rq->proxy = rq->idle; > > > > > + set_tsk_need_resched(rq->idle); > > > > > + /* > > > > > +

Re: [RFD/RFC PATCH 5/8] sched: Add proxy execution

2018-10-11 Thread Juri Lelli
On 11/10/18 14:53, Peter Zijlstra wrote: [...] > I think it was the safe and simple choice; note that we're not migrating > just a single @p, but a whole chain of @p. rq->curr must not be any of the > possible @p's. rq->idle, is per definition not one of the @p's. > > Does that make sense? It

Re: [RFD/RFC PATCH 5/8] sched: Add proxy execution

2018-10-11 Thread Juri Lelli
Hi Luca, On 10/10/18 13:10, luca abeni wrote: > Hi, > > On Tue, 9 Oct 2018 11:24:31 +0200 > Juri Lelli wrote: > [...] > > +migrate_task: > [...] > > + put_prev_task(rq, next); > > + if (rq->curr != rq->idle) { > > + rq->proxy

Re: [RFC PATCH 0/7] Introduce thermal pressure

2018-10-10 Thread Juri Lelli
On 10/10/18 15:08, Vincent Guittot wrote: > On Wed, 10 Oct 2018 at 14:50, Juri Lelli wrote: > > > > On 10/10/18 14:34, Vincent Guittot wrote: > > > Hi Juri, > > > > > > On Wed, 10 Oct 2018 at 14:23, Juri Lelli wrote: > > >

Re: [RFC PATCH 0/7] Introduce thermal pressure

2018-10-10 Thread Juri Lelli
On 10/10/18 14:34, Vincent Guittot wrote: > Hi Juri, > > On Wed, 10 Oct 2018 at 14:23, Juri Lelli wrote: > > > > On 10/10/18 14:04, Vincent Guittot wrote: > > > > [...] > > > > > The problem was the same with RT, the cfs utilization was lower

Re: [RFD/RFC PATCH 0/8] Towards implementing proxy execution

2018-10-10 Thread Juri Lelli
On 10/10/18 13:56, Henrik Austad wrote: > On Tue, Oct 09, 2018 at 11:24:26AM +0200, Juri Lelli wrote: > > Hi all, > > Hi, nice series, I have a lot of details to grok, but I like the idea of PE > > > Proxy Execution (also goes under several other names) isn't a new

Re: [RFD/RFC PATCH 0/8] Towards implementing proxy execution

2018-10-10 Thread Juri Lelli
On 10/10/18 13:23, Peter Zijlstra wrote: > On Wed, Oct 10, 2018 at 01:16:29PM +0200, luca abeni wrote: > > On Wed, 10 Oct 2018 12:57:10 +0200 > > Peter Zijlstra wrote: > > > > > On Wed, Oct 10, 2018 at 12:34:17PM +0200, luca abeni wrote: > > > > So, I would propose to make the proxy() function

Re: [RFC PATCH 0/7] Introduce thermal pressure

2018-10-10 Thread Juri Lelli
On 10/10/18 14:04, Vincent Guittot wrote: [...] > The problem was the same with RT, the cfs utilization was lower than > reality because RT steals soem cycle to CFS > So schedutil was selecting a lower frequency when cfs was running > whereas the CPU was fully used. > The same can happen with

Re: [RFD/RFC PATCH 3/8] locking/mutex: Rework task_struct::blocked_on

2018-10-10 Thread Juri Lelli
On 10/10/18 12:43, luca abeni wrote: > Hi, > > On Tue, 9 Oct 2018 11:24:29 +0200 > Juri Lelli wrote: > > > From: Peter Zijlstra > > > > Track the blocked-on relation for mutexes, this allows following this > > relation at schedule time. Add blocked

Re: [RFD/RFC PATCH 0/8] Towards implementing proxy execution

2018-10-09 Thread Juri Lelli
On 09/10/18 13:56, Daniel Bristot de Oliveira wrote: > On 10/9/18 12:51 PM, Sebastian Andrzej Siewior wrote: > >> The main concerns I have with the current approach is that, being based > >> on mutex.c, it's both > >> > >> - not linked with futexes > >> - not involving "legacy" priority

Re: [RFD/RFC PATCH 0/8] Towards implementing proxy execution

2018-10-09 Thread Juri Lelli
On 09/10/18 11:44, Peter Zijlstra wrote: > On Tue, Oct 09, 2018 at 11:24:26AM +0200, Juri Lelli wrote: > > The main concerns I have with the current approach is that, being based > > on mutex.c, it's both > > > > - not linked with futexes > > - not involv

[RFD/RFC PATCH 4/8] sched: Split scheduler execution context

2018-10-09 Thread Juri Lelli
-by: Juri Lelli --- kernel/sched/core.c | 62 ++-- kernel/sched/fair.c | 4 +++ kernel/sched/sched.h | 30 - 3 files changed, 82 insertions(+), 14 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index fe0223121883

[RFD/RFC PATCH 5/8] sched: Add proxy execution

2018-10-09 Thread Juri Lelli
be in all sort of states when a proxy is found (blocked, executing on a different CPU, etc.). Details on how to handle different situations are to be found in proxy() code comments. Signed-off-by: Peter Zijlstra (Intel) [rebased, added comments and changelog] Signed-off-by: Juri Lelli --- include

[RFD/RFC PATCH 8/8] sched: Fixup task CPUs for potential proxies.

2018-10-09 Thread Juri Lelli
). Signed-off-by: Juri Lelli --- kernel/sched/core.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 54003515fd29..0314afe4ba80 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1664,6 +1664,14 @@ static inline

[RFD/RFC PATCH 6/8] locking/mutex: make mutex::wait_lock irq safe

2018-10-09 Thread Juri Lelli
mutex::wait_lock might be nested under rq->lock. Make it irq safe then. Signed-off-by: Juri Lelli --- kernel/locking/mutex.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c index 23312afa7

[RFD/RFC PATCH 2/8] locking/mutex: Removes wakeups from under mutex::wait_lock

2018-10-09 Thread Juri Lelli
for Wound-Wait mutexes")] Signed-off-by: Juri Lelli --- kernel/locking/mutex.c | 43 +++--- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c index df34ce70fcde..f37402cd8496 100644 --- a/ke

[RFD/RFC PATCH 7/8] sched: Ensure blocked_on is always guarded by blocked_lock

2018-10-09 Thread Juri Lelli
blocked_on pointer might be concurrently modified by schedule() (when proxy() is called) and by wakeup path, so we need to guard changes. Ensure blocked_lock is always held before updating blocked_on pointer. Signed-off-by: Juri Lelli --- kernel/locking/mutex-debug.c | 1 + kernel/locking

[RFD/RFC PATCH 3/8] locking/mutex: Rework task_struct::blocked_on

2018-10-09 Thread Juri Lelli
tex | | owner | v `-- task This patch only enables blocked-on relation, blocked-task will be enabled in a later patch implementing proxy(). Signed-off-by: Peter Zijlstra (Intel) [minor changes while rebasing] Signed-off-by: Juri Lelli --- include/linux/sche

[RFD/RFC PATCH 1/8] locking/mutex: Convert mutex::wait_lock to raw_spinlock_t

2018-10-09 Thread Juri Lelli
From: Peter Zijlstra In preparation to nest mutex::wait_lock under rq::lock it needs to be raw_spinlock_t. Signed-off-by: Peter Zijlstra --- include/linux/mutex.h| 4 ++-- kernel/locking/mutex-debug.c | 4 ++-- kernel/locking/mutex.c | 22 +++--- 3 files

[RFD/RFC PATCH 0/8] Towards implementing proxy execution

2018-10-09 Thread Juri Lelli
-rt-users=153450086400459=2 4 - https://ieeexplore.ieee.org/document/5562902 5 - http://retis.sssup.it/~lipari/papers/rtlws2013.pdf 6 - https://lore.kernel.org/lkml/20180828135324.21976-1-patrick.bell...@arm.com/ Juri Lelli (3): locking/mutex: make mutex::wait_lock irq safe sched: Ensure blocked_on

Re: [PATCH] sched/dl : return accurate release rq lock info

2018-10-08 Thread Juri Lelli
lems and changelog might be improved. Other then that patch looks good, thanks! Acked-by: Juri Lelli

Re: [PATCH v5 4/5] sched/core: Prevent race condition between cpuset and __sched_setscheduler()

2018-10-04 Thread Juri Lelli
On 03/10/18 15:42, Steven Rostedt wrote: > On Mon, 3 Sep 2018 16:28:00 +0200 > Juri Lelli wrote: > > > > diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c > > index 5b43f482fa0f..8dc26005bb1e 100644 > > --- a/kernel/cgroup/cpuset.c > > +++ b/k

Re: [PATCH v5 3/5] cgroup/cpuset: make callback_lock raw

2018-09-25 Thread Juri Lelli
.GA25664@localhost.localdomain/ Best, - Juri On 03/09/18 16:27, Juri Lelli wrote: > callback_lock grants the holder read-only access to cpusets. For fixing > a synchronization issue between cpusets and scheduler core, it is now > required to make callback_lock available to core sched

Re: [PATCH v5 5/5] cpuset: Rebuild root domain deadline accounting information

2018-09-25 Thread Juri Lelli
On 25/09/18 14:53, Peter Zijlstra wrote: > On Mon, Sep 03, 2018 at 04:28:01PM +0200, Juri Lelli wrote: > > diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c > > index fb7ae691cb82..08128bdf3944 100644 > > --- a/kernel/sched/topology.c > > +++ b/kernel/sche

Re: [PATCH v5 5/5] cpuset: Rebuild root domain deadline accounting information

2018-09-25 Thread Juri Lelli
On 25/09/18 14:32, Peter Zijlstra wrote: > On Mon, Sep 03, 2018 at 04:28:01PM +0200, Juri Lelli wrote: > > +/* > > + * Called with cpuset_mutex held (rebuild_sched_domains()) > > + * Called with hotplug lock held (rebuild_sched_domains_locked()) > > + * Called wi

Re: [PATCH v5 0/5] sched/deadline: fix cpusets bandwidth accounting

2018-09-25 Thread Juri Lelli
Hi, On 03/09/18 16:27, Juri Lelli wrote: > Hi, > > v5 of a series of patches, originally authored by Mathieu, with the intent > of fixing a long standing issue of SCHED_DEADLINE bandwidth accounting. > As originally reported by Steve [1], when hotplug and/or (certain) > cpus

Re: [PATCH] sched/fair: vruntime should normalize when switching from fair

2018-09-07 Thread Juri Lelli
On 06/09/18 16:25, Dietmar Eggemann wrote: > Hi Juri, > > On 08/23/2018 11:54 PM, Juri Lelli wrote: > > On 23/08/18 18:52, Dietmar Eggemann wrote: > > > Hi, > > > > > > On 08/21/2018 01:54 AM, Miguel de Dios wrote: > > > > On 08/17/2018 1

Re: [PATCH v4 14/16] sched/core: uclamp: request CAP_SYS_ADMIN by default

2018-09-06 Thread Juri Lelli
On 06/09/18 15:40, Patrick Bellasi wrote: > On 04-Sep 15:47, Juri Lelli wrote: [...] > > Wondering if you want to fold the check below inside the > > > > if (user && !capable(CAP_SYS_NICE)) { > >... > > } > > > > block.

Re: [PATCH v4 02/16] sched/core: uclamp: map TASK's clamp values into CPU's clamp groups

2018-09-06 Thread Juri Lelli
On 06/09/18 14:48, Patrick Bellasi wrote: > Hi Juri! > > On 05-Sep 12:45, Juri Lelli wrote: > > Hi, > > > > On 28/08/18 14:53, Patrick Bellasi wrote: > > > > [...] > > > > > static inline int __setscheduler_uclamp(struct task_struct *p

Re: [PATCH v4 02/16] sched/core: uclamp: map TASK's clamp values into CPU's clamp groups

2018-09-06 Thread Juri Lelli
On 28/08/18 14:53, Patrick Bellasi wrote: [...] > static inline int __setscheduler_uclamp(struct task_struct *p, > const struct sched_attr *attr) > { > - if (attr->sched_util_min > attr->sched_util_max) > - return -EINVAL; > - if

Re: [PATCH v4 01/16] sched/core: uclamp: extend sched_setattr to support utilization clamping

2018-09-05 Thread Juri Lelli
Hi, On 28/08/18 14:53, Patrick Bellasi wrote: [...] > Let's introduce a new API to set utilization clamping values for a > specified task by extending sched_setattr, a syscall which already > allows to define task specific properties for different scheduling > classes. > Specifically, a new

Re: [PATCH v4 02/16] sched/core: uclamp: map TASK's clamp values into CPU's clamp groups

2018-09-05 Thread Juri Lelli
Hi, On 28/08/18 14:53, Patrick Bellasi wrote: [...] > static inline int __setscheduler_uclamp(struct task_struct *p, > const struct sched_attr *attr) > { > - if (attr->sched_util_min > attr->sched_util_max) > - return -EINVAL; > - if

Re: [PATCH v4 14/16] sched/core: uclamp: request CAP_SYS_ADMIN by default

2018-09-04 Thread Juri Lelli
nge > this default behavior thus allowing non privileged tasks to change their > utilization clamp values. > > Signed-off-by: Patrick Bellasi > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Rafael J. Wysocki > Cc: Paul Turner > Cc: Suren Baghdasaryan > Cc: Todd Kjos

[PATCH v5 4/5] sched/core: Prevent race condition between cpuset and __sched_setscheduler()

2018-09-03 Thread Juri Lelli
to a potential oversell of CPU bandwidth. Grab callback_lock from core scheduler, so to prevent situations such as the one described above from happening. Signed-off-by: Mathieu Poirier Signed-off-by: Juri Lelli --- v4->v5: grab callback_lock instead of cpuset_mutex, as callback_lock is eno

[PATCH v5 3/5] cgroup/cpuset: make callback_lock raw

2018-09-03 Thread Juri Lelli
atomic context. Signed-off-by: Juri Lelli --- kernel/cgroup/cpuset.c | 66 +- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index 266f10cb7222..5b43f482fa0f 100644 --- a/kernel/cgroup

[PATCH v5 5/5] cpuset: Rebuild root domain deadline accounting information

2018-09-03 Thread Juri Lelli
From: Mathieu Poirier When the topology of root domains is modified by CPUset or CPUhotplug operations information about the current deadline bandwidth held in the root domain is lost. This patch address the issue by recalculating the lost deadline bandwidth information by circling through the

[PATCH v5 2/5] sched/core: Streamlining calls to task_rq_unlock()

2018-09-03 Thread Juri Lelli
From: Mathieu Poirier Calls to task_rq_unlock() are done several times in function __sched_setscheduler(). This is fine when only the rq lock needs to be handled but not so much when other locks come into play. This patch streamlines the release of the rq lock so that only one location need to

[PATCH v5 0/5] sched/deadline: fix cpusets bandwidth accounting

2018-09-03 Thread Juri Lelli
/root-domain-accounting-v5 Thanks, - Juri [1] https://lkml.org/lkml/2016/2/3/966 [2] https://lore.kernel.org/lkml/20180614161142.69f18...@gandalf.local.home/ Juri Lelli (1): cgroup/cpuset: make callback_lock raw Mathieu Poirier (4): sched/topology: Adding function

[PATCH v5 1/5] sched/topology: Adding function partition_sched_domains_locked()

2018-09-03 Thread Juri Lelli
From: Mathieu Poirier Introducing function partition_sched_domains_locked() by taking the mutex locking code out of the original function. That way the work done by partition_sched_domains_locked() can be reused without dropping the mutex lock. No change of functionality is introduced by this

Re: [PATCH] sched/fair: vruntime should normalize when switching from fair

2018-08-24 Thread Juri Lelli
On 23/08/18 18:52, Dietmar Eggemann wrote: > Hi, > > On 08/21/2018 01:54 AM, Miguel de Dios wrote: > > On 08/17/2018 11:27 AM, Steve Muckle wrote: > > > From: John Dias > > > > > > When rt_mutex_setprio changes a task's scheduling class to RT, > > > we're seeing cases where the task's vruntime

Re: [PATCH v3 01/14] sched/core: uclamp: extend sched_setattr to support utilization clamping

2018-08-13 Thread Juri Lelli
On 13/08/18 13:14, Patrick Bellasi wrote: > On 07-Aug 11:59, Juri Lelli wrote: > > Hi, > > > > Minor comments below. > > > > On 06/08/18 17:39, Patrick Bellasi wrote: > > > > [...] > &g

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-13 Thread Juri Lelli
On 13/08/18 11:12, Patrick Bellasi wrote: > Hi Vincent! > > On 09-Aug 18:03, Vincent Guittot wrote: > > > On 07-Aug 15:26, Juri Lelli wrote: > > [...] > > > > > > + util_cfs = cpu_util_cfs(rq); > > > > > + util_rt = cpu_uti

Re: [PATCH v3 01/14] sched/core: uclamp: extend sched_setattr to support utilization clamping

2018-08-10 Thread Juri Lelli
On 09/08/18 16:23, Patrick Bellasi wrote: > On 09-Aug 11:50, Juri Lelli wrote: > > On 09/08/18 10:14, Patrick Bellasi wrote: > > > On 07-Aug 14:35, Juri Lelli wrote: > > > > On 06/08/18 17:39, Patrick Bellasi wrote: > > [...] > > > >

Re: [PATCH v3 01/14] sched/core: uclamp: extend sched_setattr to support utilization clamping

2018-08-09 Thread Juri Lelli
On 09/08/18 10:14, Patrick Bellasi wrote: > On 07-Aug 14:35, Juri Lelli wrote: > > On 06/08/18 17:39, Patrick Bellasi wrote: > > > > [...] > > > > > @@ -4218,6 +4245,13 @@ static int __sched_setscheduler(struct task_struct > > &

Re: [PATCH v3 06/14] sched/cpufreq: uclamp: add utilization clamping for RT tasks

2018-08-07 Thread Juri Lelli
Hi, On 06/08/18 17:39, Patrick Bellasi wrote: [...] > @@ -223,13 +224,25 @@ static unsigned long sugov_get_util(struct sugov_cpu > *sg_cpu) >* utilization (PELT windows are synchronized) we can directly add them >* to obtain the CPU's actual utilization. >* > - *

Re: [PATCH v3 01/14] sched/core: uclamp: extend sched_setattr to support utilization clamping

2018-08-07 Thread Juri Lelli
On 06/08/18 17:39, Patrick Bellasi wrote: [...] > @@ -4218,6 +4245,13 @@ static int __sched_setscheduler(struct task_struct *p, > return retval; > } > > + /* Configure utilization clamps for the task */ > + if (attr->sched_flags & SCHED_FLAG_UTIL_CLAMP) { >

Re: [PATCH v3 01/14] sched/core: uclamp: extend sched_setattr to support utilization clamping

2018-08-07 Thread Juri Lelli
Hi, Minor comments below. On 06/08/18 17:39, Patrick Bellasi wrote: [...] > + * > + * Task Utilization Attributes > + * === > + * > + * A subset of sched_attr attributes allows to specify the utilization which > + * should be expected by a task. These attributes allows

Re: [PATCH] sched/deadline: Fix switched_from_dl

2018-08-06 Thread Juri Lelli
On 01/08/18 23:19, Steven Rostedt wrote: > On Wed, 11 Jul 2018 09:29:48 +0200 > Juri Lelli wrote: > > > Mark noticed that syzkaller is able to reliably trigger the following > > > > dl_rq->running_bw > dl_rq->this_bw > > WARNING: CPU:

Re: [PATCH V3] sched/deadline: Update rq_clock of later_rq when pushing a task

2018-07-20 Thread Juri Lelli
On 20/07/18 17:36, Daniel Bristot de Oliveira wrote: > On 07/20/2018 02:53 PM, Juri Lelli wrote: > > On 20/07/18 14:48, Peter Zijlstra wrote: > >> On Fri, Jul 20, 2018 at 02:46:15PM +0200, Peter Zijlstra wrote: > >>> On Fri, Jul 20, 2018 at 11:16:30AM +0200, Daniel Br

Re: [PATCH V3] sched/deadline: Update rq_clock of later_rq when pushing a task

2018-07-20 Thread Juri Lelli
On 20/07/18 14:48, Peter Zijlstra wrote: > On Fri, Jul 20, 2018 at 02:46:15PM +0200, Peter Zijlstra wrote: > > On Fri, Jul 20, 2018 at 11:16:30AM +0200, Daniel Bristot de Oliveira wrote: > > > diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c > > > index fbfc3f1d368a..8b50eea4b607

Re: [PATCH V2] sched/deadline: Update rq_clock of later_rq when pushing a task

2018-07-16 Thread Juri Lelli
double rq_clock_update() call, we set ENQUEUE_NOCLOCK flag to > activate_task(). I suggested almost the same, but missed the ENQUEUE_NOCLOCK bit (which I think it's required). > Changes from v1: > Cosmetic changes in the log, and correct Juri's email (Daniel). > > Reported-by

[tip:sched/urgent] sched/deadline: Fix switched_from_dl() warning

2018-07-15 Thread tip-bot for Juri Lelli
Commit-ID: e117cb52bdb4d376b711bee34af6434c9e314b3b Gitweb: https://git.kernel.org/tip/e117cb52bdb4d376b711bee34af6434c9e314b3b Author: Juri Lelli AuthorDate: Wed, 11 Jul 2018 09:29:48 +0200 Committer: Ingo Molnar CommitDate: Sun, 15 Jul 2018 23:47:33 +0200 sched/deadline: Fix

[PATCH] sched/deadline: Fix switched_from_dl

2018-07-11 Thread Juri Lelli
tter sees running_bw > this_bw. Fix it by removing a task contribution from running_bw if the task is not queued and in non_contending state while switched to a different class. Reported-by: Mark Rutland Signed-off-by: Juri Lelli --- kernel/sched/deadline.c | 11 ++- 1 file changed, 10 inse

Re: [BUG] Caused by: sched/deadline: Move CPU frequency selection triggering points

2018-07-03 Thread Juri Lelli
Hi Steve, On 03/07/18 10:54, Steven Rostedt wrote: > When looking to test SCHED_DEADLINE, I triggered a lockup. The lockup > appears to be caused by WARN_ON() done inside the scheduling path, and > I'm guessing it tried to grab the rq lock and caused a deadlock (all I > would get would be the

Re: [PATCH v6 04/11] cpufreq/schedutil: use rt utilization tracking

2018-06-22 Thread Juri Lelli
On 21/06/18 20:45, Peter Zijlstra wrote: > On Fri, Jun 08, 2018 at 02:09:47PM +0200, Vincent Guittot wrote: > > static unsigned long sugov_aggregate_util(struct sugov_cpu *sg_cpu) > > { > > struct rq *rq = cpu_rq(sg_cpu->cpu); > > + unsigned long util; > > > > if

Re: [RFC PATCH v3 10/10] arch_topology: Start Energy Aware Scheduling

2018-06-19 Thread Juri Lelli
On 19/06/18 11:25, Quentin Perret wrote: > On Tuesday 19 Jun 2018 at 12:19:01 (+0200), Juri Lelli wrote: > > On 19/06/18 11:02, Quentin Perret wrote: > > > On Tuesday 19 Jun 2018 at 11:47:14 (+0200), Juri Lelli wrote: > > > > On 19/06/18 10:40, Quentin Pe

Re: [RFC PATCH v3 10/10] arch_topology: Start Energy Aware Scheduling

2018-06-19 Thread Juri Lelli
On 19/06/18 11:02, Quentin Perret wrote: > On Tuesday 19 Jun 2018 at 11:47:14 (+0200), Juri Lelli wrote: > > On 19/06/18 10:40, Quentin Perret wrote: > > > Hi Pavan, > > > > > > On Tuesday 19 Jun 2018 at 14:48:41 (+0530), Pavan Kondeti wrote: > > > &

Re: [RFC PATCH v3 10/10] arch_topology: Start Energy Aware Scheduling

2018-06-19 Thread Juri Lelli
On 19/06/18 10:40, Quentin Perret wrote: > Hi Pavan, > > On Tuesday 19 Jun 2018 at 14:48:41 (+0530), Pavan Kondeti wrote: [...] > > There seems to be a sysfs interface exposed by this driver to change > > cpu_scale. > > Should we worry about it? I don't know what is the usecase for changing

Re: [PATCH v4 4/5] sched/core: Prevent race condition between cpuset and __sched_setscheduler()

2018-06-15 Thread Juri Lelli
On 15/06/18 09:01, Juri Lelli wrote: [...] > I'll try harder to find alternatives, but suggestions are welcome! :-) I wonder if something like the following might actually work. IIUC cpuset.c comment [1], callback_lock is the one to actually take if one needs to only query cpusets. [1] ht

Re: [PATCH v4 4/5] sched/core: Prevent race condition between cpuset and __sched_setscheduler()

2018-06-15 Thread Juri Lelli
On 14/06/18 16:11, Steven Rostedt wrote: > On Wed, 13 Jun 2018 14:17:10 +0200 > Juri Lelli wrote: > > > +/** > > + * cpuset_lock - Grab the cpuset_mutex from another subsysytem > > + */ > > +int cpuset_lock(void) > >

Re: [PATCH v4 1/5] sched/topology: Add check to backup comment about hotplug lock

2018-06-14 Thread Juri Lelli
On 14/06/18 15:18, Quentin Perret wrote: > On Thursday 14 Jun 2018 at 16:11:18 (+0200), Juri Lelli wrote: > > On 14/06/18 14:58, Quentin Perret wrote: > > > > [...] > > > > > Hmm not sure if this can help but I think that rebuild_sched_domains() > >

Re: [PATCH v4 1/5] sched/topology: Add check to backup comment about hotplug lock

2018-06-14 Thread Juri Lelli
On 14/06/18 14:58, Quentin Perret wrote: [...] > Hmm not sure if this can help but I think that rebuild_sched_domains() > does _not_ take the hotplug lock before calling partition_sched_domains() > when CONFIG_CPUSETS=n. But it does take it for CONFIG_CPUSETS=y. Did you mean cpuset_mutex?

Re: [PATCH v4 4/5] sched/core: Prevent race condition between cpuset and __sched_setscheduler()

2018-06-14 Thread Juri Lelli
On 14/06/18 09:45, Steven Rostedt wrote: > On Wed, 13 Jun 2018 14:17:10 +0200 > Ju > > diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c > > index b42037e6e81d..d26fd4795aa3 100644 > > --- a/kernel/cgroup/cpuset.c > > +++ b/kernel/cgroup/cpuset.c > > @@ -2409,6 +2409,22 @@ void __init

Re: [PATCH v4 1/5] sched/topology: Add check to backup comment about hotplug lock

2018-06-14 Thread Juri Lelli
On 14/06/18 09:47, Steven Rostedt wrote: > On Thu, 14 Jun 2018 15:42:34 +0200 > Juri Lelli wrote: > > > On 14/06/18 09:33, Steven Rostedt wrote: > > > On Wed, 13 Jun 2018 14:17:07 +0200 > > > Juri Lelli wrote: > > > > > > > From: Mathie

Re: [PATCH v4 2/5] sched/topology: Adding function partition_sched_domains_locked()

2018-06-14 Thread Juri Lelli
On 14/06/18 09:35, Steven Rostedt wrote: > On Wed, 13 Jun 2018 14:17:08 +0200 > Juri Lelli wrote: [...] > > +/* > > + * Call with hotplug lock held > > + */ > > +void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[], > > +

Re: [PATCH v4 1/5] sched/topology: Add check to backup comment about hotplug lock

2018-06-14 Thread Juri Lelli
On 14/06/18 09:33, Steven Rostedt wrote: > On Wed, 13 Jun 2018 14:17:07 +0200 > Juri Lelli wrote: > > > From: Mathieu Poirier > > > > The comment above function partition_sched_domains() clearly state that > > the cpu_hotplug_lock should be held

[PATCH v4 3/5] sched/core: Streamlining calls to task_rq_unlock()

2018-06-13 Thread Juri Lelli
From: Mathieu Poirier Calls to task_rq_unlock() are done several times in function __sched_setscheduler(). This is fine when only the rq lock needs to be handled but not so much when other locks come into play. This patch streamlines the release of the rq lock so that only one location need to

[PATCH v4 1/5] sched/topology: Add check to backup comment about hotplug lock

2018-06-13 Thread Juri Lelli
Lelli Signed-off-by: Mathieu Poirier [modified changelog] Signed-off-by: Juri Lelli --- kernel/sched/topology.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 61a1125c1ae4..96eee22fafe8 100644 --- a/kernel/sched/topology.c +++ b/kernel

[PATCH v4 0/5] sched/deadline: fix cpusets bandwidth accounting

2018-06-13 Thread Juri Lelli
Hi, This is v4 of a series of patches, authored by Mathieu (thanks for your work and for allowing me to try to move this forward), with the intent of fixing a long standing issue of SCHED_DEADLINE bandwidth accounting. As originally reported by Steve [1], when hotplug and/or (certain) cpuset

[PATCH v4 4/5] sched/core: Prevent race condition between cpuset and __sched_setscheduler()

2018-06-13 Thread Juri Lelli
-by: Juri Lelli --- include/linux/cpuset.h | 6 ++ kernel/cgroup/cpuset.c | 16 kernel/sched/core.c| 14 ++ 3 files changed, 36 insertions(+) diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 934633a05d20..a1970862ab8e 100644 --- a/include/linux

  1   2   3   4   5   6   7   8   9   10   >