From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [RFC PATCH 00/13] Introduce first class virtual address spaces Date: Wed, 15 Mar 2017 09:57:36 -0700 Message-ID: <20170315165736.GE4033@bombadil.infradead.org> References: <20170314161229.tl6hsmian2gdep47@arch-dev> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+gldm-linux-mtd-36=gmane.org@lists.infradead.org To: Andy Lutomirski Cc: Linux MIPS Mailing List , "linux-s390@vger.kernel.org" , Rich Felker , "linux-ia64@vger.kernel.org" , "linux-sh@vger.kernel.org" , Peter Zijlstra , Benjamin Herrenschmidt , Heiko Carstens , ALSA development , USB list , "James E.J. Bottomley" , "J. Bruce Fields" , Max Filippov , Paul Mackerras , Laurent Pinchart , "H. Peter Anvin" , sparclinux@vger.kernel.org, linux-hexagon@vger.kernel.org, Cyrille Pitchen , Linux API , Jeff List-Id: linux-arch.vger.kernel.org On Wed, Mar 15, 2017 at 09:51:31AM -0700, Andy Lutomirski wrote: > > VAS segments on the other side allow sharing of pure in memory data by > > arbitrary related tasks without the need of a file. This becomes especially > > interesting if one combines VAS segments with non-volatile memory since one can keep > > data structures in the NVM and still be able to share them between multiple tasks. > > What's wrong with regular mmap? I think it's the usual misunderstandings about how to use mmap. >From the paper: Memory-centric computing demands careful organization of the virtual address space, but interfaces such as mmap only give limited control. Some systems do not support creation of address regions at specific offsets. In Linux, for example, mmap does not safely abort if a request is made to open a region of memory over an existing region; it simply writes over it. The correct answer of course, is "Don't specify MAP_FIXED". Specify the 'hint' address, and if you don't get it, either fix up your data structure pointers, or just abort and complain noisily. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/