From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Paul McKenney <paulmck@linux.vnet.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
kirill@shutemov.name, Andi Kleen <ak@linux.intel.com>,
Michal Hocko <mhocko@kernel.org>,
dave@stgolabs.net, Jan Kara <jack@suse.cz>,
Matthew Wilcox <willy@infradead.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Paul Mackerras <paulus@samba.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Will Deacon <will.deacon@arm.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
haren@linux.vnet.ibm.com,
Anshuman Khandual <khandual@linux.vnet.ibm.com>,
npiggin@gmail.com, bsingharora@gmail.com,
Tim Chen <tim.c.chen@linux.intel.com>,
linuxppc-dev@lists.ozlabs.org, "x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH v3 00/20] Speculative page faults
Date: Fri, 29 Sep 2017 17:27:09 +0200 [thread overview]
Message-ID: <64e9759b-a4fb-63d3-a811-3e35ae5a1028@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170928133850.90c5bf2aac0f1a63e29c01a3@linux-foundation.org>
Hi Andrew,
On 28/09/2017 22:38, Andrew Morton wrote:
> On Thu, 28 Sep 2017 14:29:02 +0200 Laurent Dufour <ldufour@linux.vnet.ibm.com> wrote:
>
>>> Laurent's [0/n] provides some nice-looking performance benefits for
>>> workloads which are chosen to show performance benefits(!) but, alas,
>>> no quantitative testing results for workloads which we may suspect will
>>> be harmed by the changes(?). Even things as simple as impact upon
>>> single-threaded pagefault-intensive workloads and its effect upon
>>> CONFIG_SMP=n .text size?
>>
>> I forgot to mention in my previous email the impact on the .text section.
>>
>> Here are the metrics I got :
>>
>> .text size UP SMP Delta
>> 4.13-mmotm 8444201 8964137 6.16%
>> '' +spf 8452041 8971929 6.15%
>> Delta 0.09% 0.09%
>>
>> No major impact as you could see.
>
> 8k text increase seems rather a lot actually. That's a lot more
> userspace cacheclines that get evicted during a fault...
>
> Is the feature actually beneficial on uniprocessor?
This is useless on uniprocessor, and I will disable it on x86 when !SMP
by not defining __HAVE_ARCH_CALL_SPF.
So the speculative page fault handler will not be built but the vm
sequence counter and the SCRU stuff will still be there. I may also make
it disabled through macro when __HAVE_ARCH_CALL_SPF is not defined, but
this may obfuscated the code a bit...
On ppc64, as this feature requires book3s, it can't be built without SMP
support.
I rebuild the code on my x86 guest with the following patch applied:
--- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h
@@ -260,7 +260,7 @@ enum page_cache_mode {
/*
* Advertise that we call the Speculative Page Fault handler.
*/
-#ifdef CONFIG_X86_64
+#if defined(CONFIG_X86_64) && defined(CONFIG_SMP)
#define __HAVE_ARCH_CALL_SPF
#endif
And this time I got the following size on UP :
UP
4.13-mmotm 8444201
'' +spf 8447945 (previously 8452041)
+3744
If I disable all the vm_sequence operations and the SRCU stuff this
would lead to 0.
Thanks,
Laurent.
next prev parent reply other threads:[~2017-09-29 15:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-25 16:27 [PATCH v3 00/20] Speculative page faults Alexei Starovoitov
2017-09-25 23:34 ` Andrew Morton
2017-09-28 12:17 ` Laurent Dufour
2017-09-28 12:29 ` Laurent Dufour
2017-09-28 20:38 ` Andrew Morton
2017-09-29 15:27 ` Laurent Dufour [this message]
2017-10-03 1:27 ` Michael Ellerman
2017-10-03 8:03 ` Laurent Dufour
2017-09-26 8:30 ` Laurent Dufour
2017-10-04 6:50 ` Laurent Dufour
2017-10-05 23:32 ` Alexei Starovoitov
-- strict thread matches above, loose matches on Subject: below --
2017-09-08 18:06 Laurent Dufour
2017-09-18 7:15 ` Laurent Dufour
2017-09-08 17:32 Laurent Dufour
2017-09-08 17:44 ` Laurent Dufour
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=64e9759b-a4fb-63d3-a811-3e35ae5a1028@linux.vnet.ibm.com \
--to=ldufour@linux.vnet.ibm.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=alexei.starovoitov@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=bsingharora@gmail.com \
--cc=dave@stgolabs.net \
--cc=haren@linux.vnet.ibm.com \
--cc=hpa@zytor.com \
--cc=jack@suse.cz \
--cc=khandual@linux.vnet.ibm.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mhocko@kernel.org \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=tglx@linutronix.de \
--cc=tim.c.chen@linux.intel.com \
--cc=will.deacon@arm.com \
--cc=willy@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).