Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4153429imm; Mon, 30 Jul 2018 09:30:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcATxoAAiVNBPcSPWz3D1j6cHieHJJ5FGHZ5u/K+N6kdYa7IbaOXa2GcNz2d6gilFGHY82R X-Received: by 2002:a17:902:bd44:: with SMTP id b4-v6mr17288707plx.144.1532968242289; Mon, 30 Jul 2018 09:30:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532968242; cv=none; d=google.com; s=arc-20160816; b=Gc2MP6DzQSoPKoa0Qw1cSgno7GnmMMnCtYJefg6Rrr6FPprobVW2DOciMrb7+omZi3 e5hW+ngJFSeocd7w3BYRXfsMVYarQ2vyjh8qLP8KY6/OEBUyTU5CzJ8cddjY72nxnxOf 8M0NpiEkGqrBXJOGVkpUgMIhjGily5yp1FgepVHM4aUhak1hIWJEqQZndX05p8Y6/1T/ 9Dkg34+UtQoM77UV2kZyydPwfyGbDz4gqTtPp2jHrhGOlYJNHQYihc49T27Y0RTNAS+4 BLIiK3Irg29TkZqBFg/f15xMJVhHzKrtSK2nXFeQSeZuQYrXVQiA+R4H4hialCeSnBjI yf3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=1uNLl7QXyOl4Y7BQoChDV9F8DCLmSFKYY4bw7rBEDlQ=; b=r5j1F/vFHFq7qxMcXzCoogHNaOGSfs8hv2VcNJy+HkMOhM7uMPgrwMZnqazoAayRLH EcLcjzzABtLnjcXIA9uoVelegQ8G8zfS9WhhjT3JhjsLLVdz81sTAvPLioAVD148/42R 9cWDQCZbd64e1YkqyNagT+BWNZ2u6tW3kFPSrRMNoPG/YkiSkLgzfURPFVwAIPwVUtlL vFV4/tT5BhwqaG3/OvCUiqRu/0miVoXR2MEfq3AUd2N0SSlMjPiupcKyIz/h8frFzw+h N5Fihlib3evlsZ9v5PC3l1oh8Eqdc2fjr6dZvT5S1QiNp2r+33VDRR7s422DC+Xh80WJ LYmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11-v6si9930432plp.108.2018.07.30.09.30.27; Mon, 30 Jul 2018 09:30:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731696AbeG3SFP (ORCPT + 99 others); Mon, 30 Jul 2018 14:05:15 -0400 Received: from mail.skyhub.de ([5.9.137.197]:41502 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726760AbeG3SFO (ORCPT ); Mon, 30 Jul 2018 14:05:14 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id KDLgMYo83hC0; Mon, 30 Jul 2018 18:29:28 +0200 (CEST) Received: from nazgul.tnic (95-42-131-245.ip.btc-net.bg [95.42.131.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 534551EC00F4; Mon, 30 Jul 2018 18:29:28 +0200 (CEST) Date: Mon, 30 Jul 2018 18:29:27 +0200 From: Borislav Petkov To: Cannon Matthews Cc: Michal Hocko , Mike Kravetz , Andrew Morton , Matthew Wilcox , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andres Lagar-Cavilla , Salman Qazi , Paul Turner , David Matlack , Peter Feiner , Alain Trinh Subject: Re: [PATCH v2] RFC: clear 1G pages with streaming stores on x86 Message-ID: <20180730162926.GD11890@nazgul.tnic> References: <20180724210923.GA20168@bombadil.infradead.org> <20180725023728.44630-1-cannonmatthews@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180725023728.44630-1-cannonmatthews@google.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. --