Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753331AbbD0QRu (ORCPT ); Mon, 27 Apr 2015 12:17:50 -0400 Received: from resqmta-ch2-01v.sys.comcast.net ([69.252.207.33]:44097 "EHLO resqmta-ch2-01v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753103AbbD0QRr (ORCPT ); Mon, 27 Apr 2015 12:17:47 -0400 Date: Mon, 27 Apr 2015 11:17:43 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@gentwo.org To: Jerome Glisse cc: "Paul E. McKenney" , Benjamin Herrenschmidt , linux-kernel@vger.kernel.org, linux-mm@kvack.org, jglisse@redhat.com, mgorman@suse.de, aarcange@redhat.com, riel@redhat.com, airlied@redhat.com, aneesh.kumar@linux.vnet.ibm.com, Cameron Buschardt , Mark Hairgrove , Geoffrey Gerfin , John McKenna , akpm@linux-foundation.org Subject: Re: Interacting with coherent memory on external devices In-Reply-To: <20150427154728.GA26980@gmail.com> Message-ID: References: <20150424150829.GA3840@gmail.com> <20150424164325.GD3840@gmail.com> <20150424171957.GE3840@gmail.com> <20150424192859.GF3840@gmail.com> <20150425114633.GI5561@linux.vnet.ibm.com> <20150427154728.GA26980@gmail.com> Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1591 Lines: 29 On Mon, 27 Apr 2015, Jerome Glisse wrote: > > Improvements to the general code would be preferred instead of > > having specialized solutions for a particular hardware alone. If the > > general code can then handle the special coprocessor situation then we > > avoid a lot of code development. > > I think Paul only big change would be the memory ZONE changes. Having a > way to add the device memory as struct page while blocking the kernel > allocation from using this memory. Beside that i think the autonuma changes > he would need would really be specific to his usecase but would still > reuse all of the low level logic. Well lets avoid that. Access to device memory comparable to what the drivers do today by establishing page table mappings or a generalization of DAX approaches would be the most straightforward way of implementing it and would build based on existing functionality. Page migration currently does not work with driver mappings or DAX because there is no struct page that would allow the lockdown of the page. That may require either continued work on the DAX with page structs approach or new developments in the page migration logic comparable to the get_user_page() alternative of simply creating a scatter gather table to just submit a couple of memory ranges to the I/O subsystem thereby avoiding page structs. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/