Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp283208imm; Thu, 21 Jun 2018 18:33:12 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLqTKqPwbxUDcmTcEHTV89ndtec1VCke2XXYKwQlO1WD7FbGWnMf8KOTDtlTPlIjio+8K6c X-Received: by 2002:a62:4c88:: with SMTP id e8-v6mr24821339pfj.99.1529631192761; Thu, 21 Jun 2018 18:33:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529631192; cv=none; d=google.com; s=arc-20160816; b=hwGn1EOh3i9WbYccn6gvppwoXfQZV1TWyYLtpj/Q/ixpaLc1TdCfDwEs7ZZzuW2K+I cMgxoD67P+X7y1CIEtdN/hhPjcxwy6iceab32iOcl3u0yx4Js9hnRKn+63kcyvFOubOw qZg8mggv9OhuSVAXO+P4sYBWhripl+eaa7xynKrs6NIX3axoTpJZPuIT8O7HOm08rft5 lIJtzA7mavw3RMbpcHdn9K3CK302Sn3F/oyWnrURusqvT+0TXn3G8/LC88C58KUFbWkP OPymZrEWGQdoTPljKPbPjUzWkmSvHq3+5qBtYq8xm2dQFyRQ8A/aSW8eO/g6PBT0SQpt 9gmw== 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:dkim-signature:arc-authentication-results; bh=DRJap80aN6hca01lyw+7BJXXOUvCiWkBqPZlzZV2+ds=; b=M87yGBuywr5tf9HC3nC1EB5L0og8uTFMYmh1qitkw0I8UNCT73ZG5EabbABfAFA0wL +hFqDWAVFPu1OvmPwKyAYSqfI+oK1vfGOvTVsAHtGnnuuOi/aMPtGGzG0cvTT3O4GSR7 JSnLrfKC8zwGxEnWhwEVjJsrvQOsKTBUmwk71UNv3f68fGv0Wd7Npxx9tRjqbQVQidjH hWgcgKQ9r+NuvbCdkyH04YNr2rdKyzE8fkAiQ9efWG2J7FJDjqUbCOK+OWsYTFkY0IYF 9ZaqDiusAPU+mNShm+rfUSDCAUnrxLVfXurczvL3brrGVajkpEb6geaVFCm9nx7t0LR1 BgdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=FwDan4t8; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y23-v6si6088516pfk.75.2018.06.21.18.32.58; Thu, 21 Jun 2018 18:33:12 -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=fail header.i=@gmail.com header.s=20161025 header.b=FwDan4t8; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934273AbeFVBay (ORCPT + 99 others); Thu, 21 Jun 2018 21:30:54 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:52804 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933948AbeFVBax (ORCPT ); Thu, 21 Jun 2018 21:30:53 -0400 Received: by mail-wm0-f68.google.com with SMTP id p126-v6so522850wmb.2 for ; Thu, 21 Jun 2018 18:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=DRJap80aN6hca01lyw+7BJXXOUvCiWkBqPZlzZV2+ds=; b=FwDan4t8QSQPqxOdzoLIZNx1+KfHvT6Ae2bRudJJoYT9RKybkdwX6a8HoQO+sas9J8 x8dGqBDGTgbSpHFvwb3MT7i4JDf+zXHgKPF8bTAFd7yku6oql4FWH4PsewplATfaYMs+ YmBNmPRyNi/Hzk/CVZw2/QSBQkAYa8WFz5oIvx1CpSDb8M36BnADvbA24ozxu6jIXPDS 4ZC0dNrgpMzqEieFhEMqFCzRExB7FRiODQyKk88a5j0npQB/JryMStz50empMb2Ei/Kx xe+UnoT20UWGj0k7kGfbHe1II2nIHbXU9tat/lBooxqoQP0H0DXCPldKGWUBNTa4nO1Q bdxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=DRJap80aN6hca01lyw+7BJXXOUvCiWkBqPZlzZV2+ds=; b=cTIaBMKI1VctMY8MpvN+UbZEf7RvXjwb6zoAIWgJ4cjBo8O+D05raGmVPw1+FZnma1 +rXn22V1zcebA1Aqgix5OYfKEIoyd5msYxaboD7NGy4Dsk253mu+mHOH2ZIHX8ckF8ev BQ4xFjNGGqDPqd3cJzH3jVhhytCKI+CuJrfi2TtnAjYArL6RSkmuAdn2XpWJe5qCUYDN foDzxCK9kp0anqdPy0vQe+0aKwBtxoT1wp439nssP2d97J3NfFcO0kLNulfg/o+rCFCt AAcdTQN1XTqm6kkS2gfjhQZ7QMCIwNVeweDcPMxfU/Xv2nZ6nKDnZEs5F/lb3Qdd2i5t TU5w== X-Gm-Message-State: APt69E2e/DV/nMjQbi3icXzOQvU15daN/i0fqIuFGqQExCt3LzI8eb3e Ly0/ghMOY3TqUuFzXI5aT7s= X-Received: by 2002:a1c:3a91:: with SMTP id h139-v6mr7110559wma.94.1529631052321; Thu, 21 Jun 2018 18:30:52 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id k16-v6sm7386932wrh.25.2018.06.21.18.30.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Jun 2018 18:30:51 -0700 (PDT) Date: Fri, 22 Jun 2018 03:30:49 +0200 From: Ingo Molnar To: Mikulas Patocka 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 Message-ID: <20180622013049.GA12505@gmail.com> References: <20180519052503.325953342@debian.vm> <20180519052631.730455475@debian.vm> <20180524182013.GA59755@redhat.com> <20180618132306.GA25431@redhat.com> <20180621143140.GA14095@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Mikulas Patocka wrote: > 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. I think this information is enough, but do we know how well memmap emulation represents true persistent memory speed and cache management characteristics? It might be representative - but I don't know for sure, nor probably most readers of the changelog. So could you please put all this into an updated changelog, and also add a short description that outlines exactly which codepaths end up using this method in a typical persistent memory setup? All filesystem ops - or only reads, etc? Thanks, Ingo