Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4553195imm; Mon, 30 Jul 2018 17:29:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdHrt/YvCTJc3fUzteIuC56GRFApZyYkqbwoHjwCGybA25TtuPZ+pIRZQHCb2jYHDCK7+ts X-Received: by 2002:a62:d693:: with SMTP id a19-v6mr19743460pfl.248.1532996994667; Mon, 30 Jul 2018 17:29:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532996994; cv=none; d=google.com; s=arc-20160816; b=gbMmIRnK1ESuuyoF6C7sE6Nb5G2VBuGqt0fQwIynkneKMG6X+L9Q1o1hLMftRJDevk pAwLxjtvQdRCB5umHepe+OVizo8RxeoxGIDRFSPijXrC6wlaopjBITBi31mm1qpSEnqq re/vAsDDjQzXNV5VU52o4DdMviFUmSY8jK01fzQTwYT86iidEZ9P1VQ0U7WSwSllcvjH g8LVYIJWjALB07eICnMS4cxtERj6XdqZB/56Dpx+99I7EoLsn+GIgGfCkb9O+Gw8D1Ku vhsv5k+Be+BytoQ1KvUTOZexOXOXBwou88PIpJU5TtjMD5UyzaEOjvbxDI1PdahgXAxh PUMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=lZCTNO7l1zXWs/lTPNJh3hnDtpHCOLiA517x/IgDS2o=; b=nXbjSiKXu5cOY/F433MvTbs6AHL4Lmq8BbBeeI6zXATNujM8WcuPl+AGpEJPplkInY Jd5GVzv4d9Wh0pwTUC8pc2NxI08oG753hfoBBnhwhBMtoj23xfLgCZVGo1QMwdSozDob THzrRKlrPSGkzaF02NFeiriVZ/wiA1pA1fslI1DVs8xGFZtXW74jSJksfEQZlSH4GsIl mWJSAdVL0ctT4Rzj+Oksl1oU0JVU5RgrQ64biDBWCKvDHHNKDgYHdCzSNEYjitEf8Ct+ Z2HIT/BNP8tqVTAMwUo/m188eAxlec88xK2Ztt4c5ICpQZ39IWUBVHOMEJLIcwAZ/f49 y7Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nVRRkfeX; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 68-v6si2036523pla.332.2018.07.30.17.29.40; Mon, 30 Jul 2018 17:29:54 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=nVRRkfeX; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732161AbeGaCGW (ORCPT + 99 others); Mon, 30 Jul 2018 22:06:22 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:54681 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732079AbeGaCGV (ORCPT ); Mon, 30 Jul 2018 22:06:21 -0400 Received: by mail-wm0-f66.google.com with SMTP id c14-v6so1144780wmb.4 for ; Mon, 30 Jul 2018 17:28:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lZCTNO7l1zXWs/lTPNJh3hnDtpHCOLiA517x/IgDS2o=; b=nVRRkfeXPb8nc3WyZDCd5n8sT1Jvji440Ws5c22rMNRaY4XpdC9vO6SeqwWCUkzWRG fA9S9r69vL6IIX0XIv0NI+ro85EYeseYGke7Aya4zVz6hWZ2Z/cDPtfz8DZTSM6gYTsH sbHRW/JTOZauTWbd3YkK2Bn7U5DS7ZZvUF63C0hXYBwyk1JVMFNINblrTVB71wzG8gr1 7Pg8J5w7fUTX+DBnBeNj1l5UUgP82Aa0TQL+MnpjTHzSXxWuIW2hjJFdK08yNp4Zz2rX p+1LENuPDeH3QypYxi5Ry8SYLhwGOzwyIFEjgJ9cu+bFwPcxMg4gZ8RJtpVAaMnz4abp sljQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lZCTNO7l1zXWs/lTPNJh3hnDtpHCOLiA517x/IgDS2o=; b=ozvonDjjrlFQxLquCU2VWPysjrwqZiYaKUQpjOoMbgoPp9moAwaWikNzqeRa65j+P4 k+5t6Vf+/R1V/VcoXr2VSmSs44zASZI7BFmkW7kAG+9yRgpLhtZIKx4OMucjsEgTPxz/ D76YPvdW0Xv8Xdakah3RIGhcyKJES5+hTLxgbAjADET/ER45jbJAfpUGJd2pDKo7m0Pt 3WK98hn0uWUPXaehHMR1sahqsGdIx3dG1c0YZl79Pk94zm7JSnpTkeJFSNqV3iTPqEta uFCaNmrg1IFiwqMip3XlLQxojjgwaeAoFRO0naBLWbv3vI+9XPm56ZsEdFfDH9xnfVwc uSnA== X-Gm-Message-State: AOUpUlEXTTRcPoWATmrCk7JCsAQlFmOvD+jf53vra25BdAYTWQU50vYM hWr8kWA/P/MX9Jdb5gaQwA3OLoOGg3DSqHkVvDIRvw== X-Received: by 2002:a1c:f306:: with SMTP id q6-v6mr763965wmq.111.1532996928875; Mon, 30 Jul 2018 17:28:48 -0700 (PDT) MIME-Version: 1.0 References: <20180724210923.GA20168@bombadil.infradead.org> <20180725023728.44630-1-cannonmatthews@google.com> <20180730162926.GD11890@nazgul.tnic> In-Reply-To: <20180730162926.GD11890@nazgul.tnic> From: Cannon Matthews Date: Mon, 30 Jul 2018 17:28:37 -0700 Message-ID: Subject: Re: [PATCH v2] RFC: clear 1G pages with streaming stores on x86 To: bp@alien8.de Cc: mhocko@kernel.org, mike.kravetz@oracle.com, akpm@linux-foundation.org, willy@infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andres Lagar-Cavilla , Salman Qazi , Paul Turner , David Matlack , Peter Feiner , Alain Trinh Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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. > --