Re: [PATCH v4 01/11] powerpc/mm: Adds counting method to monitor lockless pgtable walks

2019-10-01 Thread Leonardo Bras
On Mon, 2019-09-30 at 14:47 -0700, John Hubbard wrote: > On 9/30/19 11:42 AM, Leonardo Bras wrote: > > On Mon, 2019-09-30 at 10:57 -0700, John Hubbard wrote: > > > > As I told before, there are cases where this function is called from > > > > 'real mode' in powerpc, which doesn't disable irqs and m

Re: [PATCH v4 01/11] powerpc/mm: Adds counting method to monitor lockless pgtable walks

2019-09-30 Thread Leonardo Bras
On Mon, 2019-09-30 at 10:57 -0700, John Hubbard wrote: > > As I told before, there are cases where this function is called from > > 'real mode' in powerpc, which doesn't disable irqs and may have a > > tricky behavior if we do. So, encapsulate the irq disable in this > > function can be a bad choic

Re: [PATCH v4 01/11] powerpc/mm: Adds counting method to monitor lockless pgtable walks

2019-09-30 Thread Leonardo Bras
On Sun, 2019-09-29 at 15:40 -0700, John Hubbard wrote: > Hi, Leonardo, Hello John, thanks for the feedback. > Can we please do it as shown below, instead (compile-tested only)? > > This addresses all of the comments that I was going to make about structure > of this patch, which are: > > * The

[PATCH v4 01/11] powerpc/mm: Adds counting method to monitor lockless pgtable walks

2019-09-27 Thread Leonardo Bras
It's necessary to monitor lockless pagetable walks, in order to avoid doing THP splitting/collapsing during them. Some methods rely on local_irq_{save,restore}, but that can be slow on cases with a lot of cpus are used for the process. In order to speedup some cases, I propose a refcount-based ap