From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71F78C433B4 for ; Tue, 13 Apr 2021 12:56:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B3D8613B7 for ; Tue, 13 Apr 2021 12:56:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231409AbhDMM4r (ORCPT ); Tue, 13 Apr 2021 08:56:47 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:17326 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231794AbhDMMzW (ORCPT ); Tue, 13 Apr 2021 08:55:22 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FKQW106NHzB09P; Tue, 13 Apr 2021 20:52:45 +0800 (CST) Received: from [10.174.177.246] (10.174.177.246) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Tue, 13 Apr 2021 20:54:55 +0800 Subject: Re:Re: [PATCH] x86: Accelerate copy_page with non-temporal in X86 To: Borislav Petkov CC: , , , , , References: <3f28adee-8214-fa8e-b368-eaf8b193469e@huawei.com> <20210413110137.GD16519@zn.tnic> From: Kemeng Shi Message-ID: Date: Tue, 13 Apr 2021 20:54:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20210413110137.GD16519@zn.tnic> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.246] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org on 2021/4/13 19:01, Borislav Petkov wrote: > + linux-nvdimm > > Original mail at https://lkml.kernel.org/r/3f28adee-8214-fa8e-b368-eaf8b193469e@huawei.com > > On Tue, Apr 13, 2021 at 02:25:58PM +0800, Kemeng Shi wrote: >> I'm using AEP with dax_kmem drvier, and AEP is export as a NUMA node in > > What is AEP? > AEP is a type of persistent memory produced by Intel. It's slower than normal memory but is persistent. >> my system. I will move cold pages from DRAM node to AEP node with >> move_pages system call. With old "rep movsq', it costs 2030ms to move >> 1 GB pages. With "movnti", it only cost about 890ms to move 1GB pages. > > So there's __copy_user_nocache() which does NT stores. > >> - ALTERNATIVE "jmp copy_page_regs", "", X86_FEATURE_REP_GOOD >> + ALTERNATIVE_2 "jmp copy_page_regs", "", X86_FEATURE_REP_GOOD, \ >> + "jmp copy_page_nt", X86_FEATURE_XMM2 > > This makes every machine which has sse2 do NT stores now. Which means > *every* machine practically. > Yes. And NT stores should be better for copy_page especially copying a lot of pages as only partial memory of copied page will be access recently. > The folks on linux-nvdimm@ should be able to give you a better idea what > to do. > > HTH. > Thanks for response and help.