Re: [PATCH] mm: Fix warning in move_normal_pmd()

2020-07-15 Thread Joel Fernandes
g/lkml/20200713025354.gb3644...@google.com/ > The fix is to avoid move_normal_pmd() if we see that source and > destination ranges overlap. Reviewed-by: Joel Fernandes (Google) And one thing that bothers me: > mm/mremap.c | 14 +- > 1 file changed, 13 insertions(+), 1 d

Re: WARNING: at mm/mremap.c:211 move_page_tables in i386

2020-07-14 Thread Joel Fernandes
On Tue, Jul 14, 2020 at 12:11 PM Linus Torvalds wrote: > > On Tue, Jul 14, 2020 at 9:08 AM Joel Fernandes wrote: > > > > I was thinking we should not call move_page_tables() with overlapping ranges > > at all, just to keep things simple. > > No, we're not breaki

Re: WARNING: at mm/mremap.c:211 move_page_tables in i386

2020-07-14 Thread Joel Fernandes
Hi Kirill, On Tue, Jul 14, 2020 at 10:33:06AM +0300, Kirill A. Shutemov wrote: > On Sun, Jul 12, 2020 at 03:58:06PM -0700, Linus Torvalds wrote: > > Anybody else have any opinions? > > Maybe we just shouldn't allow move_normal_pmd() if ranges overlap? > > Other option: pass 'overlaps' down to

Re: WARNING: at mm/mremap.c:211 move_page_tables in i386

2020-07-13 Thread Joel Fernandes
On Sun, Jul 12, 2020 at 08:51:26PM -0700, Linus Torvalds wrote: > > > Maybe saying "doing the pmd copies for the initial stack isn't > > > important, so let's just note this as a special case and get rid of > > > the WARN_ON()" might be an alternative solution. > > > > Personally, I feel it is

Re: WARNING: at mm/mremap.c:211 move_page_tables in i386

2020-07-12 Thread Joel Fernandes
Hi Linus, On Sun, Jul 12, 2020 at 03:58:06PM -0700, Linus Torvalds wrote: > On Sun, Jul 12, 2020 at 2:50 PM Joel Fernandes wrote: > > > > I reproduced Naresh's issue on a 32-bit x86 machine and the below patch > > fixes it. > > The issue is solely within execve() itse

Re: WARNING: at mm/mremap.c:211 move_page_tables in i386

2020-07-12 Thread Joel Fernandes
o test the below patch on your setup? thanks, - Joel ---8<--- From: Joel Fernandes Subject: [PATCH] fs/exec: Fix stack overlap issue during stack moving in i386 When running LTP's thp01 test, it is observed that a warning fires in move_page_tables() because a PMD is already allocated.

Re: WARNING: at mm/mremap.c:211 move_page_tables in i386

2020-07-11 Thread Joel Fernandes
igure out > what's wrong. > > Sadly, in this case: > > > commit 9f132f7e145506efc0744426cb338b18a54afc3b > > Author: Joel Fernandes (Google) > > Date: Thu Jan 3 15:28:41 2019 -0800 > > > > mm: select HAVE_MOVE_PMD on x86 for faster mremap >

Re: [RFC PATCH 14/16] irq: Add support for core-wide protection of IRQ and softirq

2020-07-10 Thread Joel Fernandes
On Fri, Jul 10, 2020 at 08:19:24PM +0800, Li, Aubrey wrote: > Hi Joel/Vineeth, > > On 2020/7/1 5:32, Vineeth Remanan Pillai wrote: > > From: "Joel Fernandes (Google)" > > > > With current core scheduling patchset, non-threaded IRQ and softirq > >

Re: [PATCH 1/1] MAINTAINERS: add Hridya and myself into Android driver maintainers list

2020-07-09 Thread Joel Fernandes
On Thu, Jul 9, 2020 at 4:18 AM Greg KH wrote: > And I thought we were deleting ashmem soon? This seems harder than initially thought. The Android userspace is intertwined with ashmem in various ways (security policies, apps etc). There were various concerns with old apps using /dev/ashmem

Re: [PATCH tip/core/rcu 03/17] rcu/tree: Skip entry into the page allocator for PREEMPT_RT

2020-07-07 Thread Joel Fernandes
On Tue, Jul 07, 2020 at 07:34:41PM +0200, Uladzislau Rezki wrote: > On Mon, Jul 06, 2020 at 02:06:45PM -0700, Paul E. McKenney wrote: > > On Thu, Jul 02, 2020 at 10:19:08PM +0200, Sebastian Andrzej Siewior wrote: > > > On 2020-07-02 09:48:26 [-0700], Paul E. McKenney wrote: > > > > On Thu, Jul 02,

Re: [PATCH tip/core/rcu 03/17] rcu/tree: Skip entry into the page allocator for PREEMPT_RT

2020-07-06 Thread Joel Fernandes
On Mon, Jul 06, 2020 at 09:55:57PM +0200, Uladzislau Rezki wrote: [...] > > > Another way of fixing it is just dropping the lock letting the page > > > allocator to do an allocation without our "upper/local" lock. I did a > > > proposal like that once upon a time, so maybe it is a time to

Re: [PATCH tip/core/rcu 03/17] rcu/tree: Skip entry into the page allocator for PREEMPT_RT

2020-07-06 Thread Joel Fernandes
On Thu, Jul 02, 2020 at 09:45:06PM +0200, Uladzislau Rezki wrote: > On Thu, Jul 02, 2020 at 04:12:16PM +0200, Sebastian Andrzej Siewior wrote: > > On 2020-06-30 11:35:34 [-0700], Paul E. McKenney wrote: > > > > This is not going to work together with the "wait context validator" > > > >

Re: [RFC PATCH 06/16] sched: Add core wide task selection and scheduling.

2020-07-06 Thread Joel Fernandes
Hi Vineeth, On Mon, Jul 06, 2020 at 10:38:27AM -0400, Vineeth Remanan Pillai wrote: > On Mon, Jul 6, 2020 at 10:09 AM Joel Fernandes wrote: > > > > > I am not sure if this can happen. If the other sibling sets core_pick, it > > > will be under the core

Re: [RFC PATCH 06/16] sched: Add core wide task selection and scheduling.

2020-07-06 Thread Joel Fernandes
On Fri, Jul 03, 2020 at 04:21:46PM -0400, Vineeth Remanan Pillai wrote: > On Wed, Jul 1, 2020 at 7:28 PM Joel Fernandes wrote: > > > > From: "Joel Fernandes (Google)" > > Subject: [PATCH] sched: Fix CPU hotplug causing crashes in task selection > > logic >

Re: [PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation

2020-07-02 Thread Joel Fernandes
On Thu, Jul 2, 2020 at 10:55 AM Will Deacon wrote: > On Thu, Jul 02, 2020 at 10:43:55AM -0400, Joel Fernandes wrote: > > On Tue, Jun 30, 2020 at 1:38 PM Will Deacon wrote: > > > diff --git a/arch/alpha/include/asm/barrier.h > > > b/arch/alpha/include/asm/barrier

Re: [PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation

2020-07-02 Thread Joel Fernandes
On Tue, Jun 30, 2020 at 1:38 PM Will Deacon wrote: > > Rather then relying on the core code to use smp_read_barrier_depends() > as part of the READ_ONCE() definition, instead override __READ_ONCE() > in the Alpha code so that it is treated the same way as > smp_load_acquire(). > > Acked-by: Paul

Re: [RFC PATCH 06/16] sched: Add core wide task selection and scheduling.

2020-07-02 Thread Joel Fernandes
On Thu, Jul 02, 2020 at 08:57:57AM -0400, Joel Fernandes wrote: [...] > > > unconstrained pick, then rq->core_pick is set. The next time task > > > selection > > > logic runs when stopper needs to switch to idle, the current CPU is not in > > > the smt_mas

Re: [RFC PATCH 06/16] sched: Add core wide task selection and scheduling.

2020-07-02 Thread Joel Fernandes
On Wed, Jul 01, 2020 at 05:54:11PM -0700, Tim Chen wrote: > > > On 7/1/20 4:28 PM, Joel Fernandes wrote: > > On Tue, Jun 30, 2020 at 09:32:27PM +, Vineeth Remanan Pillai wrote: > >> From: Peter Zijlstra > >> > >> Instead of only selecti

Re: [RFC PATCH 06/16] sched: Add core wide task selection and scheduling.

2020-07-01 Thread Joel Fernandes
Aaron Lu > Signed-off-by: Tim Chen Hi Peter, Tim, all, the below patch fixes the hotplug issue described in the below patch's Link tag. Patch description below describes the issues fixed and it applies on top of this patch. --8<-- From: "Joel Fernandes (Google)" Subjec

Re: [RFC PATCH 00/13] Core scheduling v5

2020-06-27 Thread Joel Fernandes
On Fri, Jun 26, 2020 at 11:10 AM Joel Fernandes wrote: > [..] > > What do you think about having a separate cgroup for coresched? > > Both coresched cgroup and prctl() could co-exist where prctl could > > be used to isolate individual process or task and coresched cgroup

Re: [RFC PATCH 00/13] Core scheduling v5

2020-06-26 Thread Joel Fernandes
On Fri, Jun 26, 2020 at 11:10:28AM -0400, Joel Fernandes wrote: > On Fri, Jun 26, 2020 at 10:36:01AM -0400, Vineeth Remanan Pillai wrote: > > On Thu, Jun 25, 2020 at 9:47 PM Joel Fernandes > > wrote: > > > > > > On Thu, Jun 25, 2020 at 4:12 PM Vi

Re: [RFC PATCH 00/13] Core scheduling v5

2020-06-26 Thread Joel Fernandes
On Fri, Jun 26, 2020 at 10:36:01AM -0400, Vineeth Remanan Pillai wrote: > On Thu, Jun 25, 2020 at 9:47 PM Joel Fernandes wrote: > > > > On Thu, Jun 25, 2020 at 4:12 PM Vineeth Remanan Pillai > > wrote: > > [...] > > > TODO lists: > > >

Re: [RFC PATCH 00/13] Core scheduling v5

2020-06-25 Thread Joel Fernandes
On Thu, Jun 25, 2020 at 4:12 PM Vineeth Remanan Pillai wrote: [...] > TODO lists: > > - Interface discussions could not come to a conclusion in v5 and hence would >like to restart the discussion and reach a consensus on it. >- >

Re: [PATCH] cros_ec_spi: Even though we're RT priority, don't bump cpu freq

2020-06-24 Thread Joel Fernandes
On Wed, Jun 24, 2020 at 1:52 PM Qais Yousef wrote: > > On 06/24/20 13:35, Joel Fernandes wrote: > > [...] > > > > Doing the in-kernel opt-out via API should be fine, I think. But this will > > > need to be discussed in the wider circle. It will already clash w

Re: [PATCH] cros_ec_spi: Even though we're RT priority, don't bump cpu freq

2020-06-24 Thread Joel Fernandes
On Wed, Jun 24, 2020 at 12:55 PM Qais Yousef wrote: > > On 06/24/20 11:49, Joel Fernandes wrote: > > On Tue, Jun 23, 2020 at 12:40 PM Qais Yousef wrote: > > > > > > On 06/22/20 11:21, Doug Anderson wrote: > > > > > > [...] > > > > >

Re: [PATCH] cros_ec_spi: Even though we're RT priority, don't bump cpu freq

2020-06-24 Thread Joel Fernandes
On Tue, Jun 23, 2020 at 12:40 PM Qais Yousef wrote: > > On 06/22/20 11:21, Doug Anderson wrote: > > [...] > > > > If you propose something that will help the discussion. I think based on > > > the > > > same approach Peter has taken to prevent random RT priorities. In uclamp > > > case > > > I

Re: [PATCH tip/core/rcu 02/26] mm/mmap.c: Add cond_resched() for exit_mmap() CPU stalls

2020-06-23 Thread Joel Fernandes
On Tue, Jun 23, 2020 at 01:55:08PM -0700, Paul E. McKenney wrote: [..] > > Just for my understanding, cond_resched_tasks_rcu_qs() may not help here > > because preemption is not disabled right? Still I see no harm in using it > > here either as it may give a slight speed up for tasks-RCU. > >

Re: [PATCH v2] kvm: Fix false positive RCU usage warning

2020-06-23 Thread Joel Fernandes
On Tue, Jun 23, 2020 at 11:19:20PM +0530, Madhuparna Bhowmik wrote: > On Tue, Jun 23, 2020 at 08:39:01AM -0700, Paul E. McKenney wrote: > > On Tue, Jun 23, 2020 at 09:00:36PM +0530, Madhuparna Bhowmik wrote: > > > On Tue, Jun 23, 2020 at 11:02:36AM -0400, Joel Fernandes wrote: &

Re: [PATCH tip/core/rcu 02/26] mm/mmap.c: Add cond_resched() for exit_mmap() CPU stalls

2020-06-23 Thread Joel Fernandes
1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/mmap.c b/mm/mmap.c > index 59a4682..972f839 100644 > --- a/mm/mmap.c > +++ b/mm/mmap.c > @@ -3159,6 +3159,7 @@ void exit_mmap(struct mm_struct *mm) > if (vma->vm_flags & VM_ACCOUNT) >

Re: [PATCH v2] kvm: Fix false positive RCU usage warning

2020-06-23 Thread Joel Fernandes
On Tue, Jun 23, 2020 at 08:39:01AM -0700, Paul E. McKenney wrote: > On Tue, Jun 23, 2020 at 09:00:36PM +0530, Madhuparna Bhowmik wrote: > > On Tue, Jun 23, 2020 at 11:02:36AM -0400, Joel Fernandes wrote: > > > On Tue, Jun 23, 2020 at 09:39:53AM +0200, Paolo Bonzini wrote: > &g

Re: [PATCH] rcu/tree: Force quiescent state on callback overload

2020-06-23 Thread Joel Fernandes
> --- Reviewed-by: Joel Fernandes (Google) And I think needs fixes tag: Fixes: 1fca4d12f4637 ("rcu: Expedite first two FQS scans under callback-overload conditions") thanks, - Joel > kernel/rcu/tree.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > dif

Re: [PATCH v2] kvm: Fix false positive RCU usage warning

2020-06-23 Thread Joel Fernandes
On Tue, Jun 23, 2020 at 09:39:53AM +0200, Paolo Bonzini wrote: > On 16/05/20 10:22, madhuparnabhowmi...@gmail.com wrote: > > From: Madhuparna Bhowmik > > > > Fix the following false positive warnings: > > > > [ 9403.765413][T61744] = > > [ 9403.786541][T61744]

Re: [PATCH] binder: fix null deref of proc->context

2020-06-23 Thread Joel Fernandes
know there are no references > remaining on the binder_proc. > > Fixes: f0fe2c0f050d ("binder: prevent UAF for binderfs devices II") > Signed-off-by: Todd Kjos Reviewed-by: Joel Fernandes (Google) Thanks, - Joel > --- > drivers/android/binder.c | 14 +++---

Re: [PATCH 3/3] rcu/trace: Add name of the source for gp_seq to prevent confusion

2020-06-19 Thread Joel Fernandes
On Fri, Jun 19, 2020 at 10:40:01AM -0700, Paul E. McKenney wrote: > On Thu, Jun 18, 2020 at 10:07:18PM -0400, Joel Fernandes wrote: > > On Thu, Jun 18, 2020 at 09:36:41PM -0400, Joel Fernandes (Google) wrote: > > [...] > > > @@ -2019,7 +2019,7 @@ static int __noreturn rcu

Re: [PATCH 3/3] rcu/trace: Add name of the source for gp_seq to prevent confusion

2020-06-18 Thread Joel Fernandes
On Thu, Jun 18, 2020 at 09:36:41PM -0400, Joel Fernandes (Google) wrote: [...] > @@ -2019,7 +2019,7 @@ static int __noreturn rcu_gp_kthread(void *unused) > cond_resched_tasks_rcu_qs(); > WRITE_ONCE(rcu_state.gp_activity

[PATCH 3/3] rcu/trace: Add name of the source for gp_seq to prevent confusion

2020-06-18 Thread Joel Fernandes (Google)
-by: Joel Fernandes (Google) --- include/trace/events/rcu.h | 12 kernel/rcu/tree.c | 32 kernel/rcu/tree_plugin.h | 4 ++-- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/include/trace/events/rcu.h b/include/trace/events

[PATCH 1/3] rcu/trace: Print negative GP numbers correctly

2020-06-18 Thread Joel Fernandes (Google)
the negative numbering directly. Cc: ure...@gmail.com Signed-off-by: Joel Fernandes (Google) --- include/trace/events/rcu.h | 54 +++--- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index

[PATCH 2/3] rcu/trace: Use gp_seq_req in acceleration's rcu_grace_period tracepoint

2020-06-18 Thread Joel Fernandes (Google)
instead as it allows one to reason about how the acceleration works. Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/tree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 9ef68dd249e1d..d0988a1c1079d 100644 --- a/kernel

Re: [PATCH 3/7] rcu/trace: Add name of the source for gp_seq

2020-06-18 Thread Joel Fernandes
On Thu, Jun 18, 2020 at 05:12:01PM -0700, Paul E. McKenney wrote: > On Thu, Jun 18, 2020 at 07:51:17PM -0400, Joel Fernandes wrote: > > On Thu, Jun 18, 2020 at 03:19:01PM -0700, Paul E. McKenney wrote: > > > On Thu, Jun 18, 2020 at 04:29:51PM -0400, Joel Fernan

Re: [PATCH 3/7] rcu/trace: Add name of the source for gp_seq

2020-06-18 Thread Joel Fernandes
On Thu, Jun 18, 2020 at 08:01:38PM -0400, Steven Rostedt wrote: > On Thu, 18 Jun 2020 15:19:01 -0700 > "Paul E. McKenney" wrote: > > > For future reference, the TPS() around strings is not optional. Without > > it, trace messages from crash dumps are garbled, if I remember correctly. > > When

Re: [PATCH 6/7] rcutorture: Add support to get the number of wakeups of main GP kthread

2020-06-18 Thread Joel Fernandes
On Thu, Jun 18, 2020 at 05:12:44PM -0700, Paul E. McKenney wrote: > On Thu, Jun 18, 2020 at 08:01:56PM -0400, Joel Fernandes wrote: > > On Thu, Jun 18, 2020 at 03:40:58PM -0700, Paul E. McKenney wrote: > > > On Thu, Jun 18, 2020 at 04:29:54PM -0400, Joel Fernan

Re: [PATCH 3/7] rcu/trace: Add name of the source for gp_seq

2020-06-18 Thread Joel Fernandes
On Thu, Jun 18, 2020 at 05:12:01PM -0700, Paul E. McKenney wrote: > On Thu, Jun 18, 2020 at 07:51:17PM -0400, Joel Fernandes wrote: > > On Thu, Jun 18, 2020 at 03:19:01PM -0700, Paul E. McKenney wrote: > > > On Thu, Jun 18, 2020 at 04:29:51PM -0400, Joel Fernan

Re: [PATCH 1/7] rcu/segcblist: Prevent useless GP start if no CBs to accelerate

2020-06-18 Thread Joel Fernandes
On Thu, Jun 18, 2020 at 04:09:34PM -0700, Paul E. McKenney wrote: > On Thu, Jun 18, 2020 at 03:11:19PM -0700, Paul E. McKenney wrote: > > On Thu, Jun 18, 2020 at 04:29:49PM -0400, Joel Fernandes (Google) wrote: > > > > First, this looks like a very nice optimization, thank yo

Re: [PATCH 6/7] rcutorture: Add support to get the number of wakeups of main GP kthread

2020-06-18 Thread Joel Fernandes
On Thu, Jun 18, 2020 at 03:40:58PM -0700, Paul E. McKenney wrote: > On Thu, Jun 18, 2020 at 04:29:54PM -0400, Joel Fernandes (Google) wrote: > > This is useful to check for any improvements or degradation related to > > number of GP kthread wakeups during testing. > > &g

Re: [PATCH 5/7] rcu/trace: Use rsp's gp_seq in acceleration's rcu_grace_period tracepoint

2020-06-18 Thread Joel Fernandes
On Thu, Jun 18, 2020 at 03:27:21PM -0700, Paul E. McKenney wrote: > On Thu, Jun 18, 2020 at 04:29:53PM -0400, Joel Fernandes (Google) wrote: > > During acceleration of CB, the rsp's gp_seq is rcu_seq_snap'd. This is > > the value used for acceleration - it is the value of

Re: [PATCH 2/7] rcu/trace: Add tracing for how segcb list changes

2020-06-18 Thread Joel Fernandes
On Thu, Jun 18, 2020 at 03:16:39PM -0700, Paul E. McKenney wrote: > On Thu, Jun 18, 2020 at 04:29:50PM -0400, Joel Fernandes (Google) wrote: > > Track how the segcb list changes before/after acceleration, during > > queuing and during dequeuing. > > > > This ha

Re: [PATCH 3/7] rcu/trace: Add name of the source for gp_seq

2020-06-18 Thread Joel Fernandes
On Thu, Jun 18, 2020 at 03:19:01PM -0700, Paul E. McKenney wrote: > On Thu, Jun 18, 2020 at 04:29:51PM -0400, Joel Fernandes (Google) wrote: > > The gp_seq value can come from either of rdp, rsp or rnp. > > > > Only the rsp is the global source of truth (most accurate GP i

[PATCH 4/7] rcu/trace: Print negative GP numbers correctly

2020-06-18 Thread Joel Fernandes (Google)
the negative numbering directly. Signed-off-by: Joel Fernandes (Google) --- include/trace/events/rcu.h | 62 -- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index cb5363564f7ed..bc24862790623

[PATCH 6/7] rcutorture: Add support to get the number of wakeups of main GP kthread

2020-06-18 Thread Joel Fernandes (Google)
This is useful to check for any improvements or degradation related to number of GP kthread wakeups during testing. Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/Kconfig.debug | 1 + kernel/rcu/rcu.h | 2 ++ kernel/rcu/rcutorture.c | 23 ++- kernel/rcu

[PATCH 3/7] rcu/trace: Add name of the source for gp_seq

2020-06-18 Thread Joel Fernandes (Google)
The gp_seq value can come from either of rdp, rsp or rnp. Only the rsp is the global source of truth (most accurate GP info). The rnp can be off by ~1 and the rdp can be off by way more. Add some more context to traces to clarify where it comes from. Signed-off-by: Joel Fernandes (Google

[PATCH 5/7] rcu/trace: Use rsp's gp_seq in acceleration's rcu_grace_period tracepoint

2020-06-18 Thread Joel Fernandes (Google)
gp_seq instead as it allows one to reason about how the acceleration works. Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 81df1b837dd9d..c3bae7a83d792 100644 --- a/kernel

[PATCH 2/7] rcu/trace: Add tracing for how segcb list changes

2020-06-18 Thread Joel Fernandes (Google)
Track how the segcb list changes before/after acceleration, during queuing and during dequeuing. This has proved useful to discover an optimization to avoid unwanted GP requests when there are no callbacks accelerated. Signed-off-by: Joel Fernandes (Google) --- include/trace/events/rcu.h | 25

[PATCH 7/7] rcutorture: Add number of GP information to reports

2020-06-18 Thread Joel Fernandes (Google)
Add 2 things to get visiblity around number of grace periods. 1. Add number of GPs to End-state print. 2. Just like End-state, add GP state to Start-state. This helps determine how many GPs elapsed during a run of rcutorture and what the initial state was. Signed-off-by: Joel Fernandes (Google

[PATCH 1/7] rcu/segcblist: Prevent useless GP start if no CBs to accelerate

2020-06-18 Thread Joel Fernandes (Google)
104 | ++-+-+-+-+ | 10 | 66 | 82 | 98 | 119 | ++-+-+-+-+ | 11 | 52 | 82 | 83 | 117 | ++-+-+-+-+ Cc: ure...@gmail.com Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/rcu_segcblist.c

Re: [PATCH x86/entry: Force rcu_irq_enter() when in idle task

2020-06-16 Thread Joel Fernandes
On Tue, Jun 16, 2020 at 10:40:04AM +0200, Thomas Gleixner wrote: > Joel, > > Joel Fernandes writes: > > On Fri, Jun 12, 2020 at 03:55:00PM +0200, Thomas Gleixner wrote: > >> This is also correct vs. user mode entries in NOHZ full scenarios because > >> user

Re: [PATCH x86/entry: Force rcu_irq_enter() when in idle task

2020-06-15 Thread Joel Fernandes
Hi Thomas, Paul, On Fri, Jun 12, 2020 at 03:55:00PM +0200, Thomas Gleixner wrote: > The idea of conditionally calling into rcu_irq_enter() only when RCU is > not watching turned out to be not completely thought through. > > Paul noticed occasional premature end of grace periods in RCU torture >

Re: [RFC PATCH 11/13] sched: migration changes for core scheduling

2020-06-12 Thread Joel Fernandes
On Fri, Jun 12, 2020 at 05:32:01PM -0400, Vineeth Remanan Pillai wrote: > > AFAIR, that's what v4 did: > > > > if (available_idle_cpu(cpu)) > > #ifdef CONFIG_SCHED_CORE > > if (sched_core_enabled(cpu_rq(cpu)) && > >

Re: [RFC PATCH 11/13] sched: migration changes for core scheduling

2020-06-12 Thread Joel Fernandes
On Wed, Mar 04, 2020 at 05:00:01PM +, vpillai wrote: > From: Aubrey Li > > - Don't migrate if there is a cookie mismatch > Load balance tries to move task from busiest CPU to the > destination CPU. When core scheduling is enabled, if the > task's cookie does not match with

Re: [PATCH 06/10] rcu: Make nocb_cb kthread parkable

2020-06-10 Thread Joel Fernandes
Kenney > Cc: Josh Triplett > Cc: Steven Rostedt > Cc: Mathieu Desnoyers > Cc: Lai Jiangshan > Cc: Joel Fernandes Reviewed-by: Joel Fernandes (Google) thanks, - Joel > --- > kernel/rcu/tree_plugin.h | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) &g

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-06-10 Thread Joel Fernandes
On Thu, Jun 04, 2020 at 03:10:30PM +0200, Frederic Weisbecker wrote: > On Tue, May 26, 2020 at 06:49:08PM -0400, Joel Fernandes wrote: > > On Tue, May 26, 2020 at 05:20:17PM -0400, Joel Fernandes wrote: > > > > > > The switch happens on the target with IRQs

Re: [PATCH 01/10] rcu: Directly lock rdp->nocb_lock on nocb code entrypoints

2020-06-10 Thread Joel Fernandes
On Wed, Jun 10, 2020 at 04:21:42PM -0700, Paul E. McKenney wrote: [...] > > > 8.To softirq 3. Either GP or CB kthread for the transitioning > > > CPU advances to next. > > > At this point, the no-CBs setup is fully shut down. > > > 9.To softirq 4. Transitioning code advances

Re: [PATCH linux-rcu] docs/litmus-tests: add BPF ringbuf MPSC litmus tests

2020-05-29 Thread Joel Fernandes
Hi Andrii, On Thu, May 28, 2020 at 10:50:30PM -0700, Andrii Nakryiko wrote: > > [...] > > > diff --git a/Documentation/litmus-tests/bpf-rb/bpf-rb+1p1c+bounded.litmus > > > b/Documentation/litmus-tests/bpf-rb/bpf-rb+1p1c+bounded.litmus > > > new file mode 100644 > > > index

Re: Some -serious- BPF-related litmus tests

2020-05-29 Thread Joel Fernandes
On Thu, May 28, 2020 at 09:38:35PM -0700, Andrii Nakryiko wrote: > On Thu, May 28, 2020 at 2:48 PM Joel Fernandes wrote: > > > > On Mon, May 25, 2020 at 11:38:23AM -0700, Andrii Nakryiko wrote: > > > On Mon, May 25, 2020 at 7:53 AM Boqun Feng wrote: &

Re: [PATCH] sched/headers: Fix sched_setattr userspace compilation breakage

2020-05-29 Thread Joel Fernandes
Hi Linus, On Thu, May 28, 2020 at 07:17:38PM -0700, Linus Torvalds wrote: > On Thu, May 28, 2020 at 6:45 PM Joel Fernandes wrote: > > > > glibc's already defines struct sched_param (which is a POSIX > > struct), so my inclusion of above which is a UAPI > > he

Re: [PATCH] sched/headers: Fix sched_setattr userspace compilation breakage

2020-05-28 Thread Joel Fernandes
On Thu, May 28, 2020 at 04:23:26PM -0700, Linus Torvalds wrote: > On Thu, May 28, 2020 at 4:09 PM Joel Fernandes wrote: > > > > > So no, this patch is fundamentally wrong. It negates the whole point > > > of having a uapi header at all. > > > > Sorry, I n

Re: [PATCH] sched/headers: Fix sched_setattr userspace compilation breakage

2020-05-28 Thread Joel Fernandes
Hi Linus, On Thu, May 28, 2020 at 03:21:56PM -0700, Linus Torvalds wrote: > On Thu, May 28, 2020 at 6:55 AM Joel Fernandes (Google) > wrote: > > > > On a modern Linux distro, compiling the following program fails: > > #include > > #include > > #include >

Re: [PATCH linux-rcu] docs/litmus-tests: add BPF ringbuf MPSC litmus tests

2020-05-28 Thread Joel Fernandes
Hello Andrii, This is quite exciting. Some comments below: On Wed, May 27, 2020 at 11:24:08PM -0700, Andrii Nakryiko wrote: [...] > diff --git a/Documentation/litmus-tests/bpf-rb/bpf-rb+1p1c+bounded.litmus > b/Documentation/litmus-tests/bpf-rb/bpf-rb+1p1c+bounded.litmus > new file mode 100644 >

Re: Some -serious- BPF-related litmus tests

2020-05-28 Thread Joel Fernandes
On Mon, May 25, 2020 at 10:21:54AM -0700, Paul E. McKenney wrote: > On Mon, May 25, 2020 at 07:02:57PM +0200, Peter Zijlstra wrote: > > On Mon, May 25, 2020 at 08:47:30AM -0700, Paul E. McKenney wrote: > > > On Mon, May 25, 2020 at 01:25:21PM +0200, Peter Zijlstra wrote: > > > > > > That is; how

Re: Some -serious- BPF-related litmus tests

2020-05-28 Thread Joel Fernandes
On Mon, May 25, 2020 at 11:38:23AM -0700, Andrii Nakryiko wrote: > On Mon, May 25, 2020 at 7:53 AM Boqun Feng wrote: > > > > Hi Andrii, > > > > On Fri, May 22, 2020 at 12:38:21PM -0700, Andrii Nakryiko wrote: > > > On 5/22/20 10:43 AM, Paul E. McKenney wrote: > > > > On Fri, May 22, 2020 at

Re: [PATCH RFC] sched: Add a per-thread core scheduling interface

2020-05-28 Thread Joel Fernandes
Hi Peter, On Thu, May 28, 2020 at 07:01:28PM +0200, Peter Zijlstra wrote: > On Sun, May 24, 2020 at 10:00:46AM -0400, Phil Auld wrote: > > On Fri, May 22, 2020 at 05:35:24PM -0400 Joel Fernandes wrote: > > > On Fri, May 22, 2020 at 02:59:05PM +0200, Pe

Re: [PATCH RFC] sched: Add a per-thread core scheduling interface

2020-05-28 Thread Joel Fernandes
On Sun, May 24, 2020 at 10:00:46AM -0400, Phil Auld wrote: > On Fri, May 22, 2020 at 05:35:24PM -0400 Joel Fernandes wrote: > > On Fri, May 22, 2020 at 02:59:05PM +0200, Peter Zijlstra wrote: > > [..] > > > > > It doens't allow tasks for form their own groups (by

[PATCH] sched/headers: Fix sched_setattr userspace compilation breakage

2020-05-28 Thread Joel Fernandes (Google)
can compile. Fixes: e2d1e2aec572a ("sched/headers: Move various ABI definitions to " Signed-off-by: Joel Fernandes (Google) --- include/uapi/linux/sched/types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/sched/types.h b/include/uapi/linux/sched/typ

Re: [RFC][PATCH 4/7] smp: Optimize send_call_function_single_ipi()

2020-05-27 Thread Joel Fernandes
_from_idle() to also accept task context, > > provided it is the idle task. > > > > Signed-off-by: Peter Zijlstra (Intel) > > Looks good to me! > > Reviewed-by: Paul E. McKenney Reviewed-by: Joel Fernandes (Google) thanks, - Joel > > > --

Re: [PATCH] rcu/performance: Fix kfree_perf_init() build warning on 32-bit kernels

2020-05-26 Thread Joel Fernandes
On Tue, May 26, 2020 at 08:27:44PM +0200, Ingo Molnar wrote: [...] > ./include/linux/kern_levels.h:5:18: warning: format ‘%lu’ expects argument > of type ‘long unsigned int’, but argument 2 has type ‘unsigned int’ > [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | > ^~ >

Re: [PATCH 01/10] rcu: Directly lock rdp->nocb_lock on nocb code entrypoints

2020-05-26 Thread Joel Fernandes
Hi Paul, On Tue, May 26, 2020 at 6:29 PM Paul E. McKenney wrote: > > On Tue, May 26, 2020 at 05:27:56PM -0400, Joel Fernandes wrote: > > On Tue, May 26, 2020 at 02:09:47PM -0700, Paul E. McKenney wrote: > > [...] > > > > > > BTW, I'm really itching to give

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-05-26 Thread Joel Fernandes
On Tue, May 26, 2020 at 05:20:17PM -0400, Joel Fernandes wrote: > > The switch happens on the target with IRQs disabled and rdp->nocb_lock > > held to avoid races between local callbacks handling and kthread > > offloaded callbacks handling. > > nocb_cb kthread i

Re: [PATCH 01/10] rcu: Directly lock rdp->nocb_lock on nocb code entrypoints

2020-05-26 Thread Joel Fernandes
On Tue, May 26, 2020 at 02:09:47PM -0700, Paul E. McKenney wrote: [...] > > > > BTW, I'm really itching to give it a try to make the scheduler more > > > > deadlock > > > > resilient (that is, if the scheduler wake up path detects a deadlock, > > > > then it > > > > defers the wake up using

Re: [PATCH 08/10] rcu: Allow to deactivate nocb on a CPU

2020-05-26 Thread Joel Fernandes
On Wed, May 13, 2020 at 06:47:12PM +0200, Frederic Weisbecker wrote: > Allow a CPU's rdp to quit the callback offlined mode. nit: s/offlined/offloaded/ ? > The switch happens on the target with IRQs disabled and rdp->nocb_lock > held to avoid races between local callbacks handling and kthread >

Re: [PATCH 01/10] rcu: Directly lock rdp->nocb_lock on nocb code entrypoints

2020-05-26 Thread Joel Fernandes
On Tue, May 26, 2020 at 09:29:46AM -0700, Paul E. McKenney wrote: > On Tue, May 26, 2020 at 11:21:37AM -0400, Joel Fernandes wrote: > > Hi Paul, > > > > On Fri, May 22, 2020 at 10:57:39AM -0700, Paul E. McKenney wrote: > > > On Wed, May 20, 2020 at 08:29:49

Re: [PATCH 03/10] rcu: Make locking explicit in do_nocb_deferred_wakeup_common()

2020-05-26 Thread Joel Fernandes
ed/offloaded/ thanks, - Joel > > Clarify the locking rules and expectations. > > Signed-off-by: Frederic Weisbecker > Cc: Paul E. McKenney > Cc: Josh Triplett > Cc: Steven Rostedt > Cc: Mathieu Desnoyers > Cc: Lai Jiangshan > Cc: Joel Fernandes > --- > ker

Re: [PATCH 03/10] rcu: Make locking explicit in do_nocb_deferred_wakeup_common()

2020-05-26 Thread Joel Fernandes
gt; Cc: Mathieu Desnoyers > Cc: Lai Jiangshan > Cc: Joel Fernandes > --- > kernel/rcu/tree_plugin.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h > index 1d22b16c03e0..1dd3fdd675a

Re: [rcu:dev.2020.05.25a 51/63] kernel/rcu/refperf.c:298:6: warning: no previous prototype for function 'reset_readers'

2020-05-26 Thread Joel Fernandes
On Tue, May 26, 2020 at 09:11:17AM -0700, Paul E. McKenney wrote: > On Tue, May 26, 2020 at 08:07:35PM +0800, kbuild test robot wrote: > > tree: > > https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git > > dev.2020.05.25a > > head: 1e9451642683146552713c5ce6d269ae378eacd5 >

Re: [PATCH 01/10] rcu: Directly lock rdp->nocb_lock on nocb code entrypoints

2020-05-26 Thread Joel Fernandes
Hi Paul, On Fri, May 22, 2020 at 10:57:39AM -0700, Paul E. McKenney wrote: > On Wed, May 20, 2020 at 08:29:49AM -0400, Joel Fernandes wrote: > > On Wed, May 13, 2020 at 06:47:05PM +0200, Frederic Weisbecker wrote: > > > Pure NOCB code entrypoints (nocb_cb kthread, noc

[PATCH 2/2] refperf: Add a test to measure performance of read-side synchronization

2020-05-24 Thread Joel Fernandes (Google)
7 33 [3.347133] 18 34 Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/Kconfig.debug | 19 ++ kernel/rcu/Makefile | 1 + kernel/rcu/refperf.c | 558 +++ 3 files changed, 578 insertions(+) create mode 100644 kernel/rcu/refperf.c

[PATCH 1/2] rcuperf: Remove useless while loops around wait_event

2020-05-24 Thread Joel Fernandes (Google)
wait_event() already retries if the condition for the wake up is not satisifed after wake up. Remove them from the rcuperf test. Signed-off-by: Joel Fernandes (Google) --- kernel/rcu/rcuperf.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/kernel/rcu

Re: [PATCH RFC] sched: Add a per-thread core scheduling interface

2020-05-22 Thread Joel Fernandes
On Fri, May 22, 2020 at 02:59:05PM +0200, Peter Zijlstra wrote: [..] > > > It doens't allow tasks for form their own groups (by for example setting > > > the key to that of another task). > > > > So for this, I was thinking of making the prctl pass in an integer. And 0 > > would mean untagged.

Re: [RFC PATCH 07/13] sched: Add core wide task selection and scheduling.

2020-05-22 Thread Joel Fernandes
On Fri, May 22, 2020 at 11:44:06AM +0800, Aaron Lu wrote: [...] > > Updated diff below: > > > > ---8<--- > > > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > > index 005d7f7323e2d..625377f393ed3 100644 > > --- a/kernel/sched/core.c > > +++ b/kernel/sched/core.c >

Re: [PATCH RFC] sched/headers: Fix sched_setattr userspace compilation issues

2020-05-22 Thread Joel Fernandes
On Fri, May 22, 2020 at 04:02:26PM +0200, Peter Zijlstra wrote: > On Thu, May 21, 2020 at 11:55:21AM -0400, Joel Fernandes wrote: > > On Thu, May 21, 2020 at 11:53 AM Joel Fernandes (Google) > > wrote: > > > > > > On a modern Linux distro, compiling the followi

Re: [PATCH RFC] sched/headers: Fix sched_setattr userspace compilation issues

2020-05-22 Thread Joel Fernandes
On Fri, May 22, 2020 at 03:13:55PM +0200, Christian Brauner wrote: > On Thu, May 21, 2020 at 11:55:21AM -0400, Joel Fernandes wrote: > > On Thu, May 21, 2020 at 11:53 AM Joel Fernandes (Google) > > wrote: > > > > > > On a modern Linux distro, compiling the followi

[PATCH RFC v2] sched/headers: Fix sched_setattr userspace compilation issues

2020-05-22 Thread Joel Fernandes (Google)
with __KERNEL__ so that userspace and the kernel can both compile. Signed-off-by: Joel Fernandes (Google) --- v1->v2: With the chance that libc needs resolving something, I'm resending with libc-alpha added as suggested by Christian, and minor commit message fixes. include/uapi/linux/sched/types.h

Re: [RFC PATCH 07/13] sched: Add core wide task selection and scheduling.

2020-05-21 Thread Joel Fernandes
On Thu, May 21, 2020 at 07:14:26PM -0400, Joel Fernandes wrote: > On Wed, Mar 04, 2020 at 04:59:57PM +, vpillai wrote: > > From: Peter Zijlstra > > > > Instead of only selecting a local task, select a task for all SMT > > siblings for every reschedule on the core

Re: [PATCH RFC] sched: Use sched-RCU in core-scheduling balancing logic

2020-05-21 Thread Joel Fernandes
On Thu, May 21, 2020 at 6:52 PM Paul E. McKenney wrote: > > On Wed, May 20, 2020 at 06:48:18PM -0400, Joel Fernandes (Google) wrote: > > rcu_read_unlock() can incur an infrequent deadlock in > > sched_core_balance(). Fix this by using sched-RCU instead. > > > > Thi

Re: [RFC PATCH 07/13] sched: Add core wide task selection and scheduling.

2020-05-21 Thread Joel Fernandes
On Thu, May 21, 2020 at 07:14:26PM -0400, Joel Fernandes wrote: > On Wed, Mar 04, 2020 at 04:59:57PM +, vpillai wrote: [snip] > > + /* > > +* If class_pick is idle or matches cookie, return early. > > +*/ > > + if (cookie_equals(class_pick, cook

Re: [RFC PATCH 07/13] sched: Add core wide task selection and scheduling.

2020-05-21 Thread Joel Fernandes
On Wed, Mar 04, 2020 at 04:59:57PM +, vpillai wrote: > From: Peter Zijlstra > > Instead of only selecting a local task, select a task for all SMT > siblings for every reschedule on the core (irrespective which logical > CPU does the reschedule). > > There could be races in core scheduler

Re: [PATCH RFC] sched: Add a per-thread core scheduling interface

2020-05-21 Thread Joel Fernandes
Hi Linus, On Thu, May 21, 2020 at 11:31:38AM -0700, Linus Torvalds wrote: > On Wed, May 20, 2020 at 3:26 PM Joel Fernandes (Google) > wrote: > > > > ChromeOS will use core-scheduling to securely enable hyperthreading. > > This cuts down the keypress latency in Google

Re: [PATCH RFC] sched/headers: Fix sched_setattr userspace compilation issues

2020-05-21 Thread Joel Fernandes
On Thu, May 21, 2020 at 11:53 AM Joel Fernandes (Google) wrote: > > On a modern Linux distro, compiling the following program fails: > #include > #include > #include > #include > > void main() { > struct sched_attr sa; > > return; > }

[PATCH RFC] sched/headers: Fix sched_setattr userspace compilation issues

2020-05-21 Thread Joel Fernandes (Google)
compile. Signed-off-by: Joel Fernandes (Google) --- include/uapi/linux/sched/types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/sched/types.h b/include/uapi/linux/sched/types.h index c852153ddb0d3..1f10d935a63fe 100644 --- a/include/uapi/linux/sched/types.h +++ b

Re: [PATCH RFC] sched: Add a per-thread core scheduling interface(Internet mail)

2020-05-21 Thread Joel Fernandes
On Thu, May 21, 2020 at 04:09:50AM +, benbjiang(蒋彪) wrote: > > > > On May 21, 2020, at 6:26 AM, Joel Fernandes (Google) > > wrote: > > > > Add a per-thread core scheduling interface which allows a thread to tag > > itself and enable core sch

Re: [PATCH RFC] sched: Add a per-thread core scheduling interface

2020-05-21 Thread Joel Fernandes
Hi Peter, Thanks for the comments. On Thu, May 21, 2020 at 10:51:22AM +0200, Peter Zijlstra wrote: > On Wed, May 20, 2020 at 06:26:42PM -0400, Joel Fernandes (Google) wrote: > > Add a per-thread core scheduling interface which allows a thread to tag > > itself and enable core sc

[PATCH RFC] sched: Use sched-RCU in core-scheduling balancing logic

2020-05-20 Thread Joel Fernandes (Google)
] watchdog: BUG: soft lockup - CPU#0 stuck for 11s! [kworker/0:10:965] Cc: vpillai Cc: Aaron Lu Cc: Aubrey Li Cc: pet...@infradead.org Cc: paul...@kernel.org Signed-off-by: Joel Fernandes (Google) Change-Id: I1a4bf0cd1426b3c21ad5de44719813ad4ee5805e --- kernel/sched/core.c | 4 ++-- 1 file

<    1   2   3   4   5   6   7   8   9   10   >