[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfu=UcafhF4EEXxFAT+1v8F4i7GJ99z2wKc2Z5PJ8THst2VKw@mail.gmail.com>
Date: Mon, 30 Jul 2018 17:28:37 -0700
From: Cannon Matthews <cannonmatthews@...gle.com>
To: bp@...en8.de
Cc: mhocko@...nel.org, mike.kravetz@...cle.com,
akpm@...ux-foundation.org, willy@...radead.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Andres Lagar-Cavilla <andreslc@...gle.com>,
Salman Qazi <sqazi@...gle.com>, Paul Turner <pjt@...gle.com>,
David Matlack <dmatlack@...gle.com>,
Peter Feiner <pfeiner@...gle.com>,
Alain Trinh <nullptr@...gle.com>
Subject: Re: [PATCH v2] RFC: clear 1G pages with streaming stores on x86
Thanks for all the feedback from everyone.
I am going to try to fix this up, and do some more robust benchmarking,
including the 2MB case, and try to have an updated/non-RFC patch(es) in
a few days.
Thanks!
Cannon
On Mon, Jul 30, 2018 at 9:29 AM Borislav Petkov <bp@...en8.de> wrote:
>
> On Tue, Jul 24, 2018 at 07:37:28PM -0700, Cannon Matthews wrote:
> > diff --git a/arch/x86/lib/clear_page_64.S b/arch/x86/lib/clear_page_64.S
> > index 88acd349911b..81a39804ac72 100644
> > --- a/arch/x86/lib/clear_page_64.S
> > +++ b/arch/x86/lib/clear_page_64.S
> > @@ -49,3 +49,23 @@ ENTRY(clear_page_erms)
> > ret
> > ENDPROC(clear_page_erms)
> > EXPORT_SYMBOL_GPL(clear_page_erms)
> > +
> > +/*
> > + * Zero memory using non temporal stores, bypassing the cache.
> > + * Requires an `sfence` (wmb()) afterwards.
> > + * %rdi - destination.
> > + * %rsi - page size. Must be 64 bit aligned.
> > +*/
> > +ENTRY(__clear_page_nt)
> > + leaq (%rdi,%rsi), %rdx
> > + xorl %eax, %eax
> > + .p2align 4,,10
> > + .p2align 3
> > +.L2:
> > + movnti %rax, (%rdi)
> > + addq $8, %rdi
> > + cmpq %rdx, %rdi
> > + jne .L2
> > + ret
> > +ENDPROC(__clear_page_nt)
> > +EXPORT_SYMBOL(__clear_page_nt)
>
> EXPORT_SYMBOL_GPL like the other functions in that file.
>
> --
> Regards/Gruss,
> Boris.
>
> ECO tip #101: Trim your mails when you reply.
> --
Powered by blists - more mailing lists