From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH v3 01/14] x86, uaccess: introduce copy_from_iter_flushcache for pmem / cache-bypass operations Date: Sun, 18 Jun 2017 10:28:41 +0200 Message-ID: <20170618082841.GA26456@lst.de> References: <149703982465.20620.14881139332926778446.stgit@dwillia2-desk3.amr.corp.intel.com> <149703983098.20620.14791162611225792317.stgit@dwillia2-desk3.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <149703983098.20620.14791162611225792317.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: Dan Williams Cc: Jan Kara , Matthew Wilcox , x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org, dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Ingo Molnar , viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org, "H. Peter Anvin" , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Thomas Gleixner , hch-jcswGhMUV9g@public.gmane.org List-Id: dm-devel.ids On Fri, Jun 09, 2017 at 01:23:51PM -0700, Dan Williams wrote: > Implement a __copy_from_user_inatomic_flushcache, memcpy_page_flushcache, and > memcpy_flushcache, that guarantee that the destination buffer is not dirty in > the cpu cache on completion. The new copy_from_iter_flushcache and sub-routines Wouldn't writethrough be a better name? > will be used to replace the "pmem api" (include/linux/pmem.h + > arch/x86/include/asm/pmem.h). The availability of copy_from_iter_flushcache() > and memcpy_flushcache() are gated by the CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE > config symbol, and fallback to copy_from_iter_nocache() and plain memcpy() > otherwise. What is UACCESS about memcpy_flushcache?