Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753477AbcL3DxJ (ORCPT ); Thu, 29 Dec 2016 22:53:09 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:50752 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752946AbcL3DxI (ORCPT ); Thu, 29 Dec 2016 22:53:08 -0500 Date: Fri, 30 Dec 2016 03:52:52 +0000 From: Al Viro To: Dan Williams Cc: Boaz Harrosh , "linux-nvdimm@lists.01.org" , "Moreno, Oliver" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , "boylston@burromesa.net" Subject: Re: [PATCH v2 1/3] introduce memcpy_nocache() Message-ID: <20161230035252.GV1555@ZenIV.linux.org.uk> References: <20161026155021.20892-1-brian.boylston@hpe.com> <20161026155021.20892-2-brian.boylston@hpe.com> <58110959.90901@plexistor.com> <5818A5C8.6040300@plexistor.com> <20161228234321.GA27417@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1068 Lines: 21 On Thu, Dec 29, 2016 at 10:23:15AM -0800, Dan Williams wrote: > > BTW, your "it's iovec, only non-temporal stores there" logics in > > arch_copy_from_iter_pmem() is simply wrong - for one thing, unaligned > > copies will have parts done via normal stores, for another 32bit will > > _not_ go for non-caching codepath for short copies. What semantics do > > we really need there? > > For typical pmem platforms we need to make sure all the writes are on > the way to memory such than a later sfence can guarantee that all > previous writes are visible to the platform "ADR" logic. ADR handles > flushing memory controller write buffers to media. At a minimum > arch_copy_from_iter_pmem() needs to trigger a clwb (unordered cache > line writeback) of each touched cache line if it is not using a cache > bypassing store. Um... Then we do have a problem - nocache variant of uaccess primitives does *not* guarantee that clwb is redundant. What about the requirements of e.g. tcp_sendmsg() with its use of skb_add_data_nocache()? What warranties do we need there?