Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp274462imm; Thu, 21 Jun 2018 18:20:27 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLC4cYNnYSeZ9yVxfRpdwzzuI2n2wE2hUunPW5V1tUSm9H1n6IhczidbcDR4Syb7PxGyDb7 X-Received: by 2002:a63:780b:: with SMTP id t11-v6mr24195025pgc.91.1529630427214; Thu, 21 Jun 2018 18:20:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529630427; cv=none; d=google.com; s=arc-20160816; b=l6kgCbZaT8/L913el6HLmrIJhNk8UBYhNAzX4LxruOTVmI0VAf482KNJm8jaMkKnJp oByoPFQb1G5vKxid1y370lxJuj97/GXe434g9DKQwvTh2LmJzOQ7AYze8WxZ3W0Ix/rY qZTJTog8Plf9Fu/xsxnG57ZAP4aZKoUwTxwIqGFbdrJC/URsfU1rtQ/NQuwMgrad/ez9 vlwRDoarvIvRnuA8kqXTBP7aE+2YNztnKlgP6Gc1H6Av2mMKDazHDT3DRgxJkgV0F8yF 9aayawLhNbTMogtUKRavghLWLzol4o6ZSuCa0yWfKem9P/gWpwJb3gnYddUuPgfUMxJm uKNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=AL31oidC0Yy1rPVWNnx3mmkIvFLNPQzhzCup0UKci6Q=; b=uRpRhSNlPud+RB+4rESFyjgbSYkOfNemSCY/1UZgoBNLX6JIGSnG7yJ+nKzLXI77oX 7NJCjWRcb28M6tXboZ66BrvIp4R9d1+v+trUS9INuNBejGspmf7TBslOYFr0rPAKarwh mOyLhrxrOa9y8KshoY8SUx+T8GOF9KFXYnyz6pJPMJgbF+MjH45h9OOSSbua+BDHtlJE tuDIOD5V9Ub4rmdhWJYKrUqjoAY54BcWEydaD7TZNnV9q77nH2KJy9Ud5a0TT51qXABT FXG6In18yOImeMUzEfUj8BM8z5exR5ldFAIzyGes39URhbGIi/ir6Ij+8eGFPKlbq5vH wzuA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1-v6si5925132pld.424.2018.06.21.18.20.12; Thu, 21 Jun 2018 18:20:27 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934133AbeFVBTc (ORCPT + 99 others); Thu, 21 Jun 2018 21:19:32 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:38136 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933129AbeFVBTb (ORCPT ); Thu, 21 Jun 2018 21:19:31 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0D2A08AA0D; Fri, 22 Jun 2018 01:19:31 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7471E1C67D; Fri, 22 Jun 2018 01:19:27 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id w5M1JRST016859; Thu, 21 Jun 2018 21:19:27 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id w5M1JReS016855; Thu, 21 Jun 2018 21:19:27 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Thu, 21 Jun 2018 21:19:27 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Ingo Molnar cc: Mike Snitzer , Thomas Gleixner , Dan Williams , device-mapper development , X86 ML , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 RESEND] x86: optimize memcpy_flushcache In-Reply-To: <20180621143140.GA14095@gmail.com> Message-ID: References: <20180519052503.325953342@debian.vm> <20180519052631.730455475@debian.vm> <20180524182013.GA59755@redhat.com> <20180618132306.GA25431@redhat.com> <20180621143140.GA14095@gmail.com> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 22 Jun 2018 01:19:31 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 22 Jun 2018 01:19:31 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mpatocka@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Jun 2018, Ingo Molnar wrote: > > * Mike Snitzer wrote: > > > From: Mikulas Patocka > > Subject: [PATCH v2] x86: optimize memcpy_flushcache > > > > In the context of constant short length stores to persistent memory, > > memcpy_flushcache suffers from a 2% performance degradation compared to > > explicitly using the "movnti" instruction. > > > > Optimize 4, 8, and 16 byte memcpy_flushcache calls to explicitly use the > > movnti instruction with inline assembler. > > Linus requested asm optimizations to include actual benchmarks, so it would be > nice to describe how this was tested, on what hardware, and what the before/after > numbers are. > > Thanks, > > Ingo It was tested on 4-core skylake machine with persistent memory being emulated using the memmap kernel option. The dm-writecache target used the emulated persistent memory as a cache and sata SSD as a backing device. The patch results in 2% improved throughput when writing data using dd. I don't have access to the machine anymore. Mikulas