Re: [PATCH 0/2] hugepage: optimize page fault path locking

2013-08-07 Thread Joonsoo Kim
On Tue, Aug 06, 2013 at 05:08:04PM -0700, Davidlohr Bueso wrote:
> On Mon, 2013-07-29 at 15:18 +0900, Joonsoo Kim wrote:
> > On Fri, Jul 26, 2013 at 07:27:23AM -0700, Davidlohr Bueso wrote:
> > > This patchset attempts to reduce the amount of contention we impose
> > > on the hugetlb_instantiation_mutex by replacing the global mutex with
> > > a table of mutexes, selected based on a hash. The original discussion can 
> > > be found here: http://lkml.org/lkml/2013/7/12/428
> > 
> > Hello, Davidlohr.
> > 
> > I recently sent a patchset which remove the hugetlb_instantiation_mutex
> > entirely ('mm, hugetlb: remove a hugetlb_instantiation_mutex').
> > This patchset can be found here: https://lkml.org/lkml/2013/7/29/54
> > 
> > If possible, could you review it and test it whether your problem is
> > disappered with it or not?
> 
> This patchset applies on top of https://lkml.org/lkml/2013/7/22/96
> "[PATCH v2 00/10] mm, hugetlb: clean-up and possible bug fix", right?
> 
> AFAIK those changes are the ones Andrew picked up a few weeks ago and
> are now in linux-next, right? I was able to apply those just fine, but
> couldn't apply your 'remove a hugetlb_instantiation_mutex series' (IIRC
> pach 1/18 failed). I guess you'll send out a v2 anyway so I'll wait
> until then.
> 
> In any case I'm not seeing an actual performance issue with the
> hugetlb_instantiation_mutex, all I noticed was that under large DB
> workloads that make use of hugepages, such as Oracle, this lock becomes
> quite hot during the first few minutes of startup, which makes sense in
> the fault path it is contended. So I'll try out your patches, but, in
> this particular case, I just cannot compare with the lock vs without the
> lock situations.

Okay. I just want to know that lock contention is reduced by my patches
in the first few minutes of startup. I will send v2 soon.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/2] hugepage: optimize page fault path locking

2013-08-07 Thread Joonsoo Kim
On Tue, Aug 06, 2013 at 05:08:04PM -0700, Davidlohr Bueso wrote:
 On Mon, 2013-07-29 at 15:18 +0900, Joonsoo Kim wrote:
  On Fri, Jul 26, 2013 at 07:27:23AM -0700, Davidlohr Bueso wrote:
   This patchset attempts to reduce the amount of contention we impose
   on the hugetlb_instantiation_mutex by replacing the global mutex with
   a table of mutexes, selected based on a hash. The original discussion can 
   be found here: http://lkml.org/lkml/2013/7/12/428
  
  Hello, Davidlohr.
  
  I recently sent a patchset which remove the hugetlb_instantiation_mutex
  entirely ('mm, hugetlb: remove a hugetlb_instantiation_mutex').
  This patchset can be found here: https://lkml.org/lkml/2013/7/29/54
  
  If possible, could you review it and test it whether your problem is
  disappered with it or not?
 
 This patchset applies on top of https://lkml.org/lkml/2013/7/22/96
 [PATCH v2 00/10] mm, hugetlb: clean-up and possible bug fix, right?
 
 AFAIK those changes are the ones Andrew picked up a few weeks ago and
 are now in linux-next, right? I was able to apply those just fine, but
 couldn't apply your 'remove a hugetlb_instantiation_mutex series' (IIRC
 pach 1/18 failed). I guess you'll send out a v2 anyway so I'll wait
 until then.
 
 In any case I'm not seeing an actual performance issue with the
 hugetlb_instantiation_mutex, all I noticed was that under large DB
 workloads that make use of hugepages, such as Oracle, this lock becomes
 quite hot during the first few minutes of startup, which makes sense in
 the fault path it is contended. So I'll try out your patches, but, in
 this particular case, I just cannot compare with the lock vs without the
 lock situations.

Okay. I just want to know that lock contention is reduced by my patches
in the first few minutes of startup. I will send v2 soon.

Thanks.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/2] hugepage: optimize page fault path locking

2013-08-06 Thread Davidlohr Bueso
On Mon, 2013-07-29 at 15:18 +0900, Joonsoo Kim wrote:
> On Fri, Jul 26, 2013 at 07:27:23AM -0700, Davidlohr Bueso wrote:
> > This patchset attempts to reduce the amount of contention we impose
> > on the hugetlb_instantiation_mutex by replacing the global mutex with
> > a table of mutexes, selected based on a hash. The original discussion can 
> > be found here: http://lkml.org/lkml/2013/7/12/428
> 
> Hello, Davidlohr.
> 
> I recently sent a patchset which remove the hugetlb_instantiation_mutex
> entirely ('mm, hugetlb: remove a hugetlb_instantiation_mutex').
> This patchset can be found here: https://lkml.org/lkml/2013/7/29/54
> 
> If possible, could you review it and test it whether your problem is
> disappered with it or not?

This patchset applies on top of https://lkml.org/lkml/2013/7/22/96
"[PATCH v2 00/10] mm, hugetlb: clean-up and possible bug fix", right?

AFAIK those changes are the ones Andrew picked up a few weeks ago and
are now in linux-next, right? I was able to apply those just fine, but
couldn't apply your 'remove a hugetlb_instantiation_mutex series' (IIRC
pach 1/18 failed). I guess you'll send out a v2 anyway so I'll wait
until then.

In any case I'm not seeing an actual performance issue with the
hugetlb_instantiation_mutex, all I noticed was that under large DB
workloads that make use of hugepages, such as Oracle, this lock becomes
quite hot during the first few minutes of startup, which makes sense in
the fault path it is contended. So I'll try out your patches, but, in
this particular case, I just cannot compare with the lock vs without the
lock situations.

Thanks,
Davidlohr

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/2] hugepage: optimize page fault path locking

2013-08-06 Thread Davidlohr Bueso
On Mon, 2013-07-29 at 15:18 +0900, Joonsoo Kim wrote:
 On Fri, Jul 26, 2013 at 07:27:23AM -0700, Davidlohr Bueso wrote:
  This patchset attempts to reduce the amount of contention we impose
  on the hugetlb_instantiation_mutex by replacing the global mutex with
  a table of mutexes, selected based on a hash. The original discussion can 
  be found here: http://lkml.org/lkml/2013/7/12/428
 
 Hello, Davidlohr.
 
 I recently sent a patchset which remove the hugetlb_instantiation_mutex
 entirely ('mm, hugetlb: remove a hugetlb_instantiation_mutex').
 This patchset can be found here: https://lkml.org/lkml/2013/7/29/54
 
 If possible, could you review it and test it whether your problem is
 disappered with it or not?

This patchset applies on top of https://lkml.org/lkml/2013/7/22/96
[PATCH v2 00/10] mm, hugetlb: clean-up and possible bug fix, right?

AFAIK those changes are the ones Andrew picked up a few weeks ago and
are now in linux-next, right? I was able to apply those just fine, but
couldn't apply your 'remove a hugetlb_instantiation_mutex series' (IIRC
pach 1/18 failed). I guess you'll send out a v2 anyway so I'll wait
until then.

In any case I'm not seeing an actual performance issue with the
hugetlb_instantiation_mutex, all I noticed was that under large DB
workloads that make use of hugepages, such as Oracle, this lock becomes
quite hot during the first few minutes of startup, which makes sense in
the fault path it is contended. So I'll try out your patches, but, in
this particular case, I just cannot compare with the lock vs without the
lock situations.

Thanks,
Davidlohr

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/2] hugepage: optimize page fault path locking

2013-07-29 Thread Joonsoo Kim
On Fri, Jul 26, 2013 at 07:27:23AM -0700, Davidlohr Bueso wrote:
> This patchset attempts to reduce the amount of contention we impose
> on the hugetlb_instantiation_mutex by replacing the global mutex with
> a table of mutexes, selected based on a hash. The original discussion can 
> be found here: http://lkml.org/lkml/2013/7/12/428

Hello, Davidlohr.

I recently sent a patchset which remove the hugetlb_instantiation_mutex
entirely ('mm, hugetlb: remove a hugetlb_instantiation_mutex').
This patchset can be found here: https://lkml.org/lkml/2013/7/29/54

If possible, could you review it and test it whether your problem is
disappered with it or not?

Thanks.

> 
> Patch 1: Allows the file region tracking list to be serialized by its own 
> rwsem.
> This is necessary because the next patch allows concurrent hugepage fault 
> paths,
> getting rid of the hugetlb_instantiation_mutex - which protects chains of 
> struct 
> file_regionin inode->i_mapping->private_list (VM_MAYSHARE) or 
> vma_resv_map(vma)->regions 
> (!VM_MAYSHARE).
> 
> Patch 2: From David Gibson, for some reason never made it into the kernel. 
> Further cleanups and enhancements from Anton Blanchard and myself.
> Details of how the hash key is selected is in the patch.
> 
> Davidlohr Bueso (2):
>   hugepage: protect file regions with rwsem
>   hugepage: allow parallelization of the hugepage fault path
> 
>  mm/hugetlb.c | 134 
> ++-
>  1 file changed, 106 insertions(+), 28 deletions(-)
> 
> -- 
> 1.7.11.7
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majord...@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: mailto:"d...@kvack.org;> em...@kvack.org 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/2] hugepage: optimize page fault path locking

2013-07-29 Thread Joonsoo Kim
On Fri, Jul 26, 2013 at 07:27:23AM -0700, Davidlohr Bueso wrote:
 This patchset attempts to reduce the amount of contention we impose
 on the hugetlb_instantiation_mutex by replacing the global mutex with
 a table of mutexes, selected based on a hash. The original discussion can 
 be found here: http://lkml.org/lkml/2013/7/12/428

Hello, Davidlohr.

I recently sent a patchset which remove the hugetlb_instantiation_mutex
entirely ('mm, hugetlb: remove a hugetlb_instantiation_mutex').
This patchset can be found here: https://lkml.org/lkml/2013/7/29/54

If possible, could you review it and test it whether your problem is
disappered with it or not?

Thanks.

 
 Patch 1: Allows the file region tracking list to be serialized by its own 
 rwsem.
 This is necessary because the next patch allows concurrent hugepage fault 
 paths,
 getting rid of the hugetlb_instantiation_mutex - which protects chains of 
 struct 
 file_regionin inode-i_mapping-private_list (VM_MAYSHARE) or 
 vma_resv_map(vma)-regions 
 (!VM_MAYSHARE).
 
 Patch 2: From David Gibson, for some reason never made it into the kernel. 
 Further cleanups and enhancements from Anton Blanchard and myself.
 Details of how the hash key is selected is in the patch.
 
 Davidlohr Bueso (2):
   hugepage: protect file regions with rwsem
   hugepage: allow parallelization of the hugepage fault path
 
  mm/hugetlb.c | 134 
 ++-
  1 file changed, 106 insertions(+), 28 deletions(-)
 
 -- 
 1.7.11.7
 
 --
 To unsubscribe, send a message with 'unsubscribe linux-mm' in
 the body to majord...@kvack.org.  For more info on Linux MM,
 see: http://www.linux-mm.org/ .
 Don't email: a href=mailto:d...@kvack.org; em...@kvack.org /a
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/