Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757350AbcJXHIl (ORCPT ); Mon, 24 Oct 2016 03:08:41 -0400 Received: from b.ns.miles-group.at ([95.130.255.144]:44723 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757241AbcJXHIS (ORCPT ); Mon, 24 Oct 2016 03:08:18 -0400 Subject: Re: UBIFS with dma on 4.6 kernel is not working To: Christoph Hellwig References: <519a83bf-1244-5151-b873-bb8e1f2db3c6@nod.at> <20161021125313.GA16754@infradead.org> <20161021131505.GA25942@infradead.org> Cc: Naga Sureshkumar Relli , "dwmw2@infradead.org" , "computersforpeace@gmail.com" , "dedekind1@gmail.com" , "adrian.hunter@intel.com" , "michal.simek@xilinx.com" , Punnaiah Choudary Kalluri , "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Boris Brezillon From: Richard Weinberger Message-ID: <3de2ca29-120b-b7a6-da55-47fe5e056f73@nod.at> Date: Mon, 24 Oct 2016 09:08:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <20161021131505.GA25942@infradead.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 965 Lines: 25 Christoph, On 21.10.2016 15:15, Christoph Hellwig wrote: > On Fri, Oct 21, 2016 at 03:07:57PM +0200, Richard Weinberger wrote: >> Hmm, thought this is still problematic on VIVT architectures. >> Boris tried to provide a solution for that some time ago: >> http://www.spinics.net/lists/arm-kernel/msg494025.html > > Things have been working fine for approx 10 years when using > flush_kernel_vmap_range before doing I/O using the physical addresses and > then invalidate_kernel_vmap_range when completing the I/O and going back > to using the virtual mapping for XFS. > > Of course all this assumes at least the higher level that did the > vm_map_ram operation knows about this dance between virtually mapped and > physiscal addresses. Good to know, I was clearly wrong. Let's see whether the costs of flush_kernel_vmap_range and invalidate_kernel_vmap_range are smaller than the speedup by DMA on embedded platforms. We'll have to test it. Thanks, //richard