linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] THP support for Sparc64
@ 2012-10-02 22:26 David Miller
  2012-10-02 22:55 ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2012-10-02 22:26 UTC (permalink / raw)
  To: linux-mm; +Cc: sparclinux, linux-kernel, linux-arch, akpm, aarcange, hannes


Here is a set of patches that add THP support for sparc64.

A few of them are relatively minor portability issues I ran into.
Like the MIPS guys I hit the update_mmu_cache() typing issue so I have
a patch for that here.

It is very likely that I need the ACCESSED bit handling fix the
ARM folks have been posting recently as well.

On the sparc64 side the biggest issue was moving to only supporting
4MB pages and then realigning the page tables so that the PMDs map 4MB
(instead of 8MB as they do now).

The rest was just trial and error, running tests, and fixing bugs.

A familiar test case that makes 5 million random accesses to a 1GB
memory area goes from 20 seconds down to 0.43 seconds with THP enabled
on my SPARC T4-2 box.

Signed-off-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/8] THP support for Sparc64
  2012-10-02 22:26 [PATCH 0/8] THP support for Sparc64 David Miller
@ 2012-10-02 22:55 ` Andrew Morton
  2012-10-03  0:53   ` David Miller
  2012-10-04  2:00   ` David Miller
  0 siblings, 2 replies; 8+ messages in thread
From: Andrew Morton @ 2012-10-02 22:55 UTC (permalink / raw)
  To: David Miller
  Cc: linux-mm, sparclinux, linux-kernel, linux-arch, aarcange, hannes,
	Gerald Schaefer

On Tue, 02 Oct 2012 18:26:01 -0400 (EDT)
David Miller <davem@davemloft.net> wrote:

> Here is a set of patches that add THP support for sparc64.
> 
> A few of them are relatively minor portability issues I ran into.
> Like the MIPS guys I hit the update_mmu_cache() typing issue so I have
> a patch for that here.
> 
> It is very likely that I need the ACCESSED bit handling fix the
> ARM folks have been posting recently as well.
> 
> On the sparc64 side the biggest issue was moving to only supporting
> 4MB pages and then realigning the page tables so that the PMDs map 4MB
> (instead of 8MB as they do now).
> 
> The rest was just trial and error, running tests, and fixing bugs.
> 
> A familiar test case that makes 5 million random accesses to a 1GB
> memory area goes from 20 seconds down to 0.43 seconds with THP enabled
> on my SPARC T4-2 box.

Hardly worth bothering about ;)

I had a shot at integrating all this onto the pending stuff in linux-next. 
"mm: Add and use update_mmu_cache_pmd() in transparent huge page code."
needed minor massaging in huge_memory.c.  But as Andrea mentioned, we
ran aground on Gerald's
http://ozlabs.org/~akpm/mmotm/broken-out/thp-remove-assumptions-on-pgtable_t-type.patch,
part of the thp-for-s390 work.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/8] THP support for Sparc64
  2012-10-02 22:55 ` Andrew Morton
@ 2012-10-03  0:53   ` David Miller
  2012-10-04  2:00   ` David Miller
  1 sibling, 0 replies; 8+ messages in thread
From: David Miller @ 2012-10-03  0:53 UTC (permalink / raw)
  To: akpm
  Cc: linux-mm, sparclinux, linux-kernel, linux-arch, aarcange, hannes,
	gerald.schaefer

From: Andrew Morton <akpm@linux-foundation.org>
Date: Tue, 2 Oct 2012 15:55:44 -0700

> I had a shot at integrating all this onto the pending stuff in linux-next. 
> "mm: Add and use update_mmu_cache_pmd() in transparent huge page code."
> needed minor massaging in huge_memory.c.  But as Andrea mentioned, we
> ran aground on Gerald's
> http://ozlabs.org/~akpm/mmotm/broken-out/thp-remove-assumptions-on-pgtable_t-type.patch,
> part of the thp-for-s390 work.

I'll rebase my work against that stuff, looks fine to me.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/8] THP support for Sparc64
  2012-10-02 22:55 ` Andrew Morton
  2012-10-03  0:53   ` David Miller
@ 2012-10-04  2:00   ` David Miller
  2012-10-04 10:35     ` Andrea Arcangeli
  1 sibling, 1 reply; 8+ messages in thread
From: David Miller @ 2012-10-04  2:00 UTC (permalink / raw)
  To: akpm
  Cc: linux-mm, sparclinux, linux-kernel, linux-arch, aarcange, hannes,
	gerald.schaefer

From: Andrew Morton <akpm@linux-foundation.org>
Date: Tue, 2 Oct 2012 15:55:44 -0700

> I had a shot at integrating all this onto the pending stuff in linux-next. 
> "mm: Add and use update_mmu_cache_pmd() in transparent huge page code."
> needed minor massaging in huge_memory.c.  But as Andrea mentioned, we
> ran aground on Gerald's
> http://ozlabs.org/~akpm/mmotm/broken-out/thp-remove-assumptions-on-pgtable_t-type.patch,
> part of the thp-for-s390 work.

While working on a rebase relative to this work, I noticed that the
s390 patches don't even compile.

It's because of that pmd_pgprot() change from Peter Z. which arrives
asynchonously via the linux-next tree.  It makes THP start using
pmd_pgprot() (a new interface) which the s390 patches don't provide.

It's going to require that I do new work for my sparc64 THP changes as
well.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/8] THP support for Sparc64
  2012-10-04  2:00   ` David Miller
@ 2012-10-04 10:35     ` Andrea Arcangeli
  2012-10-04 18:11       ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Andrea Arcangeli @ 2012-10-04 10:35 UTC (permalink / raw)
  To: David Miller
  Cc: akpm, linux-mm, sparclinux, linux-kernel, linux-arch, hannes,
	gerald.schaefer

Hi Dave,

On Wed, Oct 03, 2012 at 10:00:27PM -0400, David Miller wrote:
> From: Andrew Morton <akpm@linux-foundation.org>
> Date: Tue, 2 Oct 2012 15:55:44 -0700
> 
> > I had a shot at integrating all this onto the pending stuff in linux-next. 
> > "mm: Add and use update_mmu_cache_pmd() in transparent huge page code."
> > needed minor massaging in huge_memory.c.  But as Andrea mentioned, we
> > ran aground on Gerald's
> > http://ozlabs.org/~akpm/mmotm/broken-out/thp-remove-assumptions-on-pgtable_t-type.patch,
> > part of the thp-for-s390 work.
> 
> While working on a rebase relative to this work, I noticed that the
> s390 patches don't even compile.
> 
> It's because of that pmd_pgprot() change from Peter Z. which arrives
> asynchonously via the linux-next tree.  It makes THP start using
> pmd_pgprot() (a new interface) which the s390 patches don't provide.

My suggestion would be to ignore linux-next and port it to -mm only
and re-send to Andrew. schednuma is by mistake in linux-next, and
it's not going to get merged as far as I can tell.

Even if schednuma would get merged by mistake, pmd_pgprot is a micro
optimization and it's by no means necessary. I don't think it's clean
to add arch dependencies like that just for a micro optimization mixed
up with schednuma code. The implementation of the AutoNUMA NUMA
hinting page faults that was introduced recently in schednuma is also
very bad, all checks on the vmas vm_page_prot are totally unnecessary
because _PAGE_PROTNONE and _PAGE_NUMA are mutually exclusive code
paths, _PAGE_PROTNONE would segfault before ever entering
handle_mm_fault and so checking if it's _PAGE_PROTNONE in
handle_mm_fault is unnecessary. Calling pte_numa do_prot_none also
sounds very confusing to me.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/8] THP support for Sparc64
  2012-10-04 10:35     ` Andrea Arcangeli
@ 2012-10-04 18:11       ` David Miller
  2012-10-05  9:28         ` Michal Hocko
  0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2012-10-04 18:11 UTC (permalink / raw)
  To: aarcange
  Cc: akpm, linux-mm, sparclinux, linux-kernel, linux-arch, hannes,
	gerald.schaefer

From: Andrea Arcangeli <aarcange@redhat.com>
Date: Thu, 4 Oct 2012 12:35:48 +0200

> Hi Dave,
> 
> On Wed, Oct 03, 2012 at 10:00:27PM -0400, David Miller wrote:
>> From: Andrew Morton <akpm@linux-foundation.org>
>> Date: Tue, 2 Oct 2012 15:55:44 -0700
>> 
>> > I had a shot at integrating all this onto the pending stuff in linux-next. 
>> > "mm: Add and use update_mmu_cache_pmd() in transparent huge page code."
>> > needed minor massaging in huge_memory.c.  But as Andrea mentioned, we
>> > ran aground on Gerald's
>> > http://ozlabs.org/~akpm/mmotm/broken-out/thp-remove-assumptions-on-pgtable_t-type.patch,
>> > part of the thp-for-s390 work.
>> 
>> While working on a rebase relative to this work, I noticed that the
>> s390 patches don't even compile.
>> 
>> It's because of that pmd_pgprot() change from Peter Z. which arrives
>> asynchonously via the linux-next tree.  It makes THP start using
>> pmd_pgprot() (a new interface) which the s390 patches don't provide.
> 
> My suggestion would be to ignore linux-next and port it to -mm only
> and re-send to Andrew. schednuma is by mistake in linux-next, and
> it's not going to get merged as far as I can tell.

Sorry Andrea, that simply is impractical.

The first thing Andrew's patch series does is include linux-next,
therefore every THP and MM patch in his series is against linux-next.

So there are already dependencies in there on the pmd_pgprot() bits
and I already did the implementation for sparc64 so that's what I'm
submitting against.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/8] THP support for Sparc64
  2012-10-04 18:11       ` David Miller
@ 2012-10-05  9:28         ` Michal Hocko
  2012-10-05 11:57           ` Andrea Arcangeli
  0 siblings, 1 reply; 8+ messages in thread
From: Michal Hocko @ 2012-10-05  9:28 UTC (permalink / raw)
  To: David Miller
  Cc: aarcange, akpm, linux-mm, sparclinux, linux-kernel, linux-arch,
	hannes, gerald.schaefer

On Thu 04-10-12 14:11:36, David Miller wrote:
> From: Andrea Arcangeli <aarcange@redhat.com>
> Date: Thu, 4 Oct 2012 12:35:48 +0200
> 
> > Hi Dave,
> > 
> > On Wed, Oct 03, 2012 at 10:00:27PM -0400, David Miller wrote:
> >> From: Andrew Morton <akpm@linux-foundation.org>
> >> Date: Tue, 2 Oct 2012 15:55:44 -0700
> >> 
> >> > I had a shot at integrating all this onto the pending stuff in linux-next. 
> >> > "mm: Add and use update_mmu_cache_pmd() in transparent huge page code."
> >> > needed minor massaging in huge_memory.c.  But as Andrea mentioned, we
> >> > ran aground on Gerald's
> >> > http://ozlabs.org/~akpm/mmotm/broken-out/thp-remove-assumptions-on-pgtable_t-type.patch,
> >> > part of the thp-for-s390 work.
> >> 
> >> While working on a rebase relative to this work, I noticed that the
> >> s390 patches don't even compile.
> >> 
> >> It's because of that pmd_pgprot() change from Peter Z. which arrives
> >> asynchonously via the linux-next tree.  It makes THP start using
> >> pmd_pgprot() (a new interface) which the s390 patches don't provide.
> > 
> > My suggestion would be to ignore linux-next and port it to -mm only
> > and re-send to Andrew. schednuma is by mistake in linux-next, and
> > it's not going to get merged as far as I can tell.
> 
> Sorry Andrea, that simply is impractical.
> 
> The first thing Andrew's patch series does is include linux-next,
> therefore every THP and MM patch in his series is against linux-next.

FWIW there is also a pure -mm (non-rebased) git tree at
http://git.kernel.org/?p=linux/kernel/git/mhocko/mm.git;a=summary
since-3.6 branch. It is based on top of 3.6 with mm patches from
Andrew's tree.

HTH
-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/8] THP support for Sparc64
  2012-10-05  9:28         ` Michal Hocko
@ 2012-10-05 11:57           ` Andrea Arcangeli
  0 siblings, 0 replies; 8+ messages in thread
From: Andrea Arcangeli @ 2012-10-05 11:57 UTC (permalink / raw)
  To: Michal Hocko
  Cc: David Miller, akpm, linux-mm, sparclinux, linux-kernel,
	linux-arch, hannes, gerald.schaefer

Hi Michal,

On Fri, Oct 05, 2012 at 11:28:10AM +0200, Michal Hocko wrote:
> FWIW there is also a pure -mm (non-rebased) git tree at
> http://git.kernel.org/?p=linux/kernel/git/mhocko/mm.git;a=summary
> since-3.6 branch. It is based on top of 3.6 with mm patches from
> Andrew's tree.

I'd still suggest to use your mm.git tree to rebase the -mm patches,
until schednuma will be dropped from linux-next. Either that or I hope
you don't run any benchmark with more than one NUMA node.

Thanks,
Andrea

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-10-05 11:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-02 22:26 [PATCH 0/8] THP support for Sparc64 David Miller
2012-10-02 22:55 ` Andrew Morton
2012-10-03  0:53   ` David Miller
2012-10-04  2:00   ` David Miller
2012-10-04 10:35     ` Andrea Arcangeli
2012-10-04 18:11       ` David Miller
2012-10-05  9:28         ` Michal Hocko
2012-10-05 11:57           ` Andrea Arcangeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).