From: Borislav Petkov <bp@alien8.de>
To: Cannon Matthews <cannonmatthews@google.com>
Cc: Michal Hocko <mhocko@kernel.org>,
Mike Kravetz <mike.kravetz@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andres Lagar-Cavilla <andreslc@google.com>,
Salman Qazi <sqazi@google.com>, Paul Turner <pjt@google.com>,
David Matlack <dmatlack@google.com>,
Peter Feiner <pfeiner@google.com>,
Alain Trinh <nullptr@google.com>
Subject: Re: [PATCH v2] RFC: clear 1G pages with streaming stores on x86
Date: Mon, 30 Jul 2018 18:29:27 +0200 [thread overview]
Message-ID: <20180730162926.GD11890@nazgul.tnic> (raw)
In-Reply-To: <20180725023728.44630-1-cannonmatthews@google.com>
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.
--
next prev parent reply other threads:[~2018-07-30 16:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-24 20:46 [PATCH] RFC: clear 1G pages with streaming stores on x86 Cannon Matthews
2018-07-24 20:53 ` Andrew Morton
2018-07-25 2:50 ` Cannon Matthews
2018-07-24 21:09 ` Matthew Wilcox
2018-07-25 2:37 ` [PATCH v2] " Cannon Matthews
2018-07-25 5:02 ` Elliott, Robert (Persistent Memory)
2018-07-25 14:38 ` Matthew Wilcox
2018-07-25 17:30 ` Cannon Matthews
2018-07-25 18:23 ` Matthew Wilcox
2018-07-25 18:48 ` Cannon Matthews
2018-07-25 12:57 ` Michal Hocko
2018-07-25 17:55 ` Cannon Matthews
2018-07-26 13:19 ` Michal Hocko
2018-07-27 0:05 ` Huang, Ying
2018-07-30 16:29 ` Borislav Petkov [this message]
2018-07-31 0:28 ` Cannon Matthews
2018-07-31 0:45 ` Matthew Wilcox
2018-07-25 2:46 ` [PATCH] " Cannon Matthews
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=20180730162926.GD11890@nazgul.tnic \
--to=bp@alien8.de \
--cc=akpm@linux-foundation.org \
--cc=andreslc@google.com \
--cc=cannonmatthews@google.com \
--cc=dmatlack@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=nullptr@google.com \
--cc=pfeiner@google.com \
--cc=pjt@google.com \
--cc=sqazi@google.com \
--cc=willy@infradead.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).