[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <8dd74917-2f61-cf49-a350-73e4d54c72c1@linux.vnet.ibm.com>
Date: Wed, 17 Jan 2018 16:15:23 +0100
From: Laurent Dufour <ldufour@...ux.vnet.ibm.com>
To: "Kirill A. Shutemov" <kirill@...temov.name>
Cc: paulmck@...ux.vnet.ibm.com, peterz@...radead.org,
akpm@...ux-foundation.org, ak@...ux.intel.com, mhocko@...nel.org,
dave@...olabs.net, jack@...e.cz,
Matthew Wilcox <willy@...radead.org>, benh@...nel.crashing.org,
mpe@...erman.id.au, paulus@...ba.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, hpa@...or.com,
Will Deacon <will.deacon@....com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Alexei Starovoitov <alexei.starovoitov@...il.com>,
kemi.wang@...el.com, sergey.senozhatsky.work@...il.com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
haren@...ux.vnet.ibm.com, khandual@...ux.vnet.ibm.com,
npiggin@...il.com, bsingharora@...il.com,
Tim Chen <tim.c.chen@...ux.intel.com>,
linuxppc-dev@...ts.ozlabs.org, x86@...nel.org
Subject: Re: [PATCH v6 00/24] Speculative page faults
Hi Kirill,
Thanks for reviewing this series.
On 16/01/2018 16:11, Kirill A. Shutemov wrote:
> On Fri, Jan 12, 2018 at 06:25:44PM +0100, Laurent Dufour wrote:
>> ------------------
>> Benchmarks results
>>
>> Base kernel is 4.15-rc6-mmotm-2018-01-04-16-19
>> SPF is BASE + this series
>
> Do you have THP=always here? Lack of THP support worries me.
Yes my kernel is built with THP=always.
For the record, I wrote all the code to support THP, but when I was about
to plug it into the speculative page fault handler, I was wondering about
the pmd_none() check and this raises the issue with khugepaged and the way
it is invalidating the pmd before collapsing the underlying pages.
Currently, there is no easy way to detect when such a collapsing operation
is occurring.
> What is performance in the worst case scenario? Like when we go far enough into
> speculative code path on every page fault and then fallback to normal page
> fault?
I did further tests focusing on the THP with a patched ebizzy (to use
posix_memalign() and MADV_HUGEPAGE) to force the use of the transparent
huge pages. I double checked that use through /proc/#/smaps.
Here is the result I got on a 16 CPUs x86 VM (higher the best):
BASE SPF
mean 276.83 276.93 record/s
max 280 280 record/s
The run was done 100 times using a large enough size records (128 MB).
Here is also the event I recorded when running ebizzy during 60s:
275 records/s
Performance counter stats for './ebizzy -HT -s 134217728':
182,470 faults
5,085 spf
176,634 pagefault:spf_vma_notsup
10.518504612 seconds time elapsed
Most of the speculative page fault events were aborted because the VMA was
not supported, which is matching the huge pages (pagefault:spf_vma_notsup).
Only 5,000 were managed fully without holding the mmap_sem, I guess for
other part of the memory's process.
Running the same command on the Base kernel gave:
293 records/s
Performance counter stats for './ebizzy -HT -s 134217728':
183,170 faults
10.660787623 seconds time elapsed
So I'd say that aborting the speculative page fault handler when a THP is
detected, has no visible impact.
Cheers,
Laurent.
Powered by blists - more mailing lists