Re: [PATCH 2/2] thp: support split page table lock

From: Daniel J Blueman
Date: Sun Sep 08 2013 - 23:29:15 EST


On Saturday, 7 September 2013 02:10:02 UTC+8, Naoya Horiguchi wrote:
Hi Alex,

On Fri, Sep 06, 2013 at 11:04:23AM -0500, Alex Thorlton wrote:
> On Thu, Sep 05, 2013 at 05:27:46PM -0400, Naoya Horiguchi wrote:
> > Thp related code also uses per process mm->page_table_lock now.
> > So making it fine-grained can provide better performance.
> >
> > This patch makes thp support split page table lock by using page->ptl
> > of the pages storing "pmd_trans_huge" pmds.
> >
> > Some functions like pmd_trans_huge_lock() and
page_check_address_pmd()
> > are expected by their caller to pass back the pointer of ptl, so this
> > patch adds to those functions new arguments for that. Rather than
that,
> > this patch gives only straightforward replacement.
> >
> > ChangeLog v3:
> > - fixed argument of huge_pmd_lockptr() in copy_huge_pmd()
> > - added missing declaration of ptl in do_huge_pmd_anonymous_page()
>
> I've applied these and tested them using the same tests program that I
> used when I was working on the same issue, and I'm running into some
> bugs. Here's a stack trace:

Thank you for helping testing. This bug is new to me.

With 3.11, this patch series and CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS, I consistently hit the same failure when exiting one of my stress-testers [1] when using eg 24 cores.

Doesn't happen with 8 cores, so likely needs enough virtual memory to use multiple split locks. Otherwise, this is very promising work!

[1] http://quora.org/2013/fft3d.c
--
Daniel J Blueman
Principal Software Engineer, Numascale
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/