Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030581AbcCQPqu (ORCPT ); Thu, 17 Mar 2016 11:46:50 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:21020 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030508AbcCQPqq (ORCPT ); Thu, 17 Mar 2016 11:46:46 -0400 Date: Thu, 17 Mar 2016 15:46:35 +0000 From: Olu Ogunbowale To: Jerome Glisse CC: , , Linus Torvalds , Michel Lespinasse , Andrew Morton , Rik van Riel , Hugh Dickins , Russell King , Ralf Baechle , Paul Mundt , "David S. Miller" , Chris Metcalf , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Jackson DSouza Subject: Re: [PATCH] mm: Export symbols unmapped_area() & unmapped_area_topdown() Message-ID: <20160317154635.GA31608@imgtec.com> References: <1458148234-4456-1-git-send-email-Olu.Ogunbowale@imgtec.com> <1458148234-4456-2-git-send-email-Olu.Ogunbowale@imgtec.com> <20160317143714.GA16297@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20160317143714.GA16297@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [10.60.4.44] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1589 Lines: 33 On Thu, Mar 17, 2016 at 03:37:16PM +0100, Jerome Glisse wrote: > What other driver do for non-buffer region is have the userspace side > of the device driver mmap the device driver file and use vma range you > get from that for those non-buffer region. On cpu access you can either > chose to fault or to return a dummy page. With that trick no need to > change kernel. Yes, this approach works for some designs however arbitrary VMA ranges for non-buffer regions is not a feature of all mobile gpu designs for performance, power, and area (PPA) reasons. > Note that i do not see how you can solve the issue of your GPU having > less bits then the cpu. For instance, lets assume that you have 46bits > for the GPU while the CPU have 48bits. Now an application start and do > bunch of allocation that end up above (1 << 46), then same application > load your driver and start using some API that allow to transparently > use previously allocated memory -> fails. Yes, you are correct however for mobile SoC(s) though current top-end specifications have 4GB/8GB of installed ram so the usable SVM range is upper bound by this giving a fixed base hence the need for driver control of VMA range. > Unless you are in scheme were all allocation must go through some > special allocator but i thought this was not the case for HSA. I know > lower level of OpenCL allows that. Subsets of both specifications allows for restricted implementation AFAIK, this proposed changes are for HSA and OpenCL up to phase 2, where all SVM allocations go via special user mode allocator. Regards, Olu