From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932980AbbLVWoo (ORCPT ); Tue, 22 Dec 2015 17:44:44 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:59583 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753856AbbLVWom (ORCPT ); Tue, 22 Dec 2015 17:44:42 -0500 Date: Tue, 22 Dec 2015 14:44:40 -0800 From: Andrew Morton To: Ross Zwisler Cc: linux-kernel@vger.kernel.org, "H. Peter Anvin" , "J. Bruce Fields" , "Theodore Ts'o" , Alexander Viro , Andreas Dilger , Dave Chinner , Ingo Molnar , Jan Kara , Jeff Layton , Matthew Wilcox , Thomas Gleixner , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@ml01.01.org, x86@kernel.org, xfs@oss.sgi.com, Dan Williams , Matthew Wilcox , Dave Hansen Subject: Re: [PATCH v5 1/7] pmem: add wb_cache_pmem() to the PMEM API Message-Id: <20151222144440.1ad9e076464f4751f3de6a1f@linux-foundation.org> In-Reply-To: <1450502540-8744-2-git-send-email-ross.zwisler@linux.intel.com> References: <1450502540-8744-1-git-send-email-ross.zwisler@linux.intel.com> <1450502540-8744-2-git-send-email-ross.zwisler@linux.intel.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 18 Dec 2015 22:22:14 -0700 Ross Zwisler wrote: > The function __arch_wb_cache_pmem() was already an internal implementation > detail of the x86 PMEM API, but this functionality needs to be exported as > part of the general PMEM API to handle the fsync/msync case for DAX mmaps. > > One thing worth noting is that we really do want this to be part of the > PMEM API as opposed to a stand-alone function like clflush_cache_range() > because of ordering restrictions. By having wb_cache_pmem() as part of the > PMEM API we can leave it unordered, call it multiple times to write back > large amounts of memory, and then order the multiple calls with a single > wmb_pmem(). > > @@ -138,7 +139,7 @@ static inline void arch_clear_pmem(void __pmem *addr, size_t size) > else > memset(vaddr, 0, size); > > - __arch_wb_cache_pmem(vaddr, size); > + arch_wb_cache_pmem(addr, size); > } > reject. I made this arch_wb_cache_pmem(vaddr, size); due to Dan's http://www.ozlabs.org/~akpm/mmots/broken-out/pmem-dax-clean-up-clear_pmem.patch From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 22 Dec 2015 14:44:40 -0800 From: Andrew Morton To: Ross Zwisler Cc: linux-kernel@vger.kernel.org, "H. Peter Anvin" , "J. Bruce Fields" , "Theodore Ts'o" , Alexander Viro , Andreas Dilger , Dave Chinner , Ingo Molnar , Jan Kara , Jeff Layton , Matthew Wilcox , Thomas Gleixner , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-nvdimm@ml01.01.org, x86@kernel.org, xfs@oss.sgi.com, Dan Williams , Matthew Wilcox , Dave Hansen Subject: Re: [PATCH v5 1/7] pmem: add wb_cache_pmem() to the PMEM API Message-Id: <20151222144440.1ad9e076464f4751f3de6a1f@linux-foundation.org> In-Reply-To: <1450502540-8744-2-git-send-email-ross.zwisler@linux.intel.com> References: <1450502540-8744-1-git-send-email-ross.zwisler@linux.intel.com> <1450502540-8744-2-git-send-email-ross.zwisler@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: On Fri, 18 Dec 2015 22:22:14 -0700 Ross Zwisler wrote: > The function __arch_wb_cache_pmem() was already an internal implementation > detail of the x86 PMEM API, but this functionality needs to be exported as > part of the general PMEM API to handle the fsync/msync case for DAX mmaps. > > One thing worth noting is that we really do want this to be part of the > PMEM API as opposed to a stand-alone function like clflush_cache_range() > because of ordering restrictions. By having wb_cache_pmem() as part of the > PMEM API we can leave it unordered, call it multiple times to write back > large amounts of memory, and then order the multiple calls with a single > wmb_pmem(). > > @@ -138,7 +139,7 @@ static inline void arch_clear_pmem(void __pmem *addr, size_t size) > else > memset(vaddr, 0, size); > > - __arch_wb_cache_pmem(vaddr, size); > + arch_wb_cache_pmem(addr, size); > } > reject. I made this arch_wb_cache_pmem(vaddr, size); due to Dan's http://www.ozlabs.org/~akpm/mmots/broken-out/pmem-dax-clean-up-clear_pmem.patch -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (Postfix) with ESMTP id D333529DF5 for ; Tue, 22 Dec 2015 16:44:47 -0600 (CST) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay2.corp.sgi.com (Postfix) with ESMTP id B4F88304032 for ; Tue, 22 Dec 2015 14:44:44 -0800 (PST) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) by cuda.sgi.com with ESMTP id ijMW8cWMOPPvyDgb (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 22 Dec 2015 14:44:42 -0800 (PST) Date: Tue, 22 Dec 2015 14:44:40 -0800 From: Andrew Morton Subject: Re: [PATCH v5 1/7] pmem: add wb_cache_pmem() to the PMEM API Message-Id: <20151222144440.1ad9e076464f4751f3de6a1f@linux-foundation.org> In-Reply-To: <1450502540-8744-2-git-send-email-ross.zwisler@linux.intel.com> References: <1450502540-8744-1-git-send-email-ross.zwisler@linux.intel.com> <1450502540-8744-2-git-send-email-ross.zwisler@linux.intel.com> Mime-Version: 1.0 List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Ross Zwisler Cc: x86@kernel.org, Theodore Ts'o , linux-nvdimm@ml01.01.org, Jan Kara , linux-kernel@vger.kernel.org, Dave Hansen , xfs@oss.sgi.com, "J. Bruce Fields" , linux-mm@kvack.org, Ingo Molnar , Andreas Dilger , Alexander Viro , "H. Peter Anvin" , linux-fsdevel@vger.kernel.org, Matthew Wilcox , Jeff Layton , linux-ext4@vger.kernel.org, Thomas Gleixner , Dan Williams , Matthew Wilcox On Fri, 18 Dec 2015 22:22:14 -0700 Ross Zwisler wrote: > The function __arch_wb_cache_pmem() was already an internal implementation > detail of the x86 PMEM API, but this functionality needs to be exported as > part of the general PMEM API to handle the fsync/msync case for DAX mmaps. > > One thing worth noting is that we really do want this to be part of the > PMEM API as opposed to a stand-alone function like clflush_cache_range() > because of ordering restrictions. By having wb_cache_pmem() as part of the > PMEM API we can leave it unordered, call it multiple times to write back > large amounts of memory, and then order the multiple calls with a single > wmb_pmem(). > > @@ -138,7 +139,7 @@ static inline void arch_clear_pmem(void __pmem *addr, size_t size) > else > memset(vaddr, 0, size); > > - __arch_wb_cache_pmem(vaddr, size); > + arch_wb_cache_pmem(addr, size); > } > reject. I made this arch_wb_cache_pmem(vaddr, size); due to Dan's http://www.ozlabs.org/~akpm/mmots/broken-out/pmem-dax-clean-up-clear_pmem.patch _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs