From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754256AbbHOSF3 (ORCPT ); Sat, 15 Aug 2015 14:05:29 -0400 Received: from mail-io0-f172.google.com ([209.85.223.172]:36539 "EHLO mail-io0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753356AbbHOSF0 (ORCPT ); Sat, 15 Aug 2015 14:05:26 -0400 MIME-Version: 1.0 In-Reply-To: <20150815160055.GB26248@lst.de> References: <1439484671-15718-1-git-send-email-ross.zwisler@linux.intel.com> <1439484671-15718-8-git-send-email-ross.zwisler@linux.intel.com> <20150815091950.GA21487@lst.de> <20150815160055.GB26248@lst.de> Date: Sat, 15 Aug 2015 11:05:26 -0700 Message-ID: Subject: Re: [PATCH v2 7/7] pmem, dax: have direct_access use __pmem annotation From: Dan Williams To: Christoph Hellwig Cc: Ross Zwisler , "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.org" , Jonathan Corbet , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Jens Axboe , Martin Schwidefsky , Heiko Carstens , linux390@de.ibm.com, Alexander Viro , Matthew Wilcox , Jeff Layton , Andrew Morton , Omar Sandoval , Boaz Harrosh , Miklos Szeredi , Jan Kara , Wolfram Sang , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Gerald Schaefer , Ameen Ali , "Martin K. Petersen" , Sagi Grimberg , Mike Snitzer , Tejun Heo , Shaohua Li , Ming Lei , linux-doc@vger.kernel.org, linuxppc-dev , linux-s390@vger.kernel.org, linux-fsdevel , Dave Chinner Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 15, 2015 at 9:00 AM, Christoph Hellwig wrote: > On Sat, Aug 15, 2015 at 08:44:27AM -0700, Dan Williams wrote: >> That said, while we don't need special accessors we do need guarantees >> that anything that has written to a persistent memory address has done >> so in a way that wmb_pmem() is able to flush it. It's more of a "I've >> audited this code path for wmb_pmem() compatibility so use this api to >> write to pmem." > > I'm more worried about things where don't just do plain loads and stores > to a pmem region but DMA, which will end up as a nightmare of casts. > > But we can wait and see how that evolves in the end.. It's already not possible to do something like dma_map_single() on an ioremap()'d address, so there currently are't any __iomem/DMA collisions. As long as DMA setup is relative to a physical address resource I think we're ok. Making sure a DMA is both complete and persistent though is a different problem.