From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162578AbdEWVOW (ORCPT ); Tue, 23 May 2017 17:14:22 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58206 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161969AbdEWVOR (ORCPT ); Tue, 23 May 2017 17:14:17 -0400 Date: Tue, 23 May 2017 14:14:11 -0700 From: Andrew Morton To: Felix Kuehling Cc: , Takashi Iwai , Harish Kasiviswanathan Subject: Re: [PATCH] kernel: Export mm_access Message-Id: <20170523141411.7e919ef626429d16926ae155@linux-foundation.org> In-Reply-To: <5a9607b4-d2ac-fc7b-e43b-1e73c2651071@amd.com> References: <5a9607b4-d2ac-fc7b-e43b-1e73c2651071@amd.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 23 May 2017 16:17:29 -0400 Felix Kuehling wrote: > From: Harish Kasiviswanathan > > Exporting mm_access, which is required for implementing accelerated > equivalents of process_vm_readv/process_vm_writev for GPU memory in KFD > (AMD's GPU compute driver). This allows us to apply all the same remote > process memory access policies. > > Signed-off-by: Harish Kasiviswanathan > Reviewed-by: Felix Kuehling > --- > Current KFD with AMD discrete GPU support is not yet upstream, but we > are working on getting it upstream for 4.13 or 4.14 depending on how we > line up with Dave Airlie's merge windows. > > For reference, recent releases of ROCm (AMD's Radeon Open Compute > Platform software stack) with fully open-source user mode and kernel > code can be found on GitHub: > https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver/tree/roc-1.5.0 Well if we're going to export it, I suppose we should actually document it. Could you please include some commentary above mm_access() which describes what it does, why it does it, return value, etc? Then please include this patch in whatever tree contains the KFD code, with my Acked-by: Andrew Morton . > --- a/kernel/fork.c > +++ b/kernel/fork.c > @@ -1060,6 +1060,7 @@ struct mm_struct *mm_access(struct task_struct > *task, unsigned int mode) > > return mm; > } > +EXPORT_SYMBOL_GPL(mm_access); > > static void complete_vfork_done(struct task_struct *tsk) > { fyi, your email client is word-wrapping the patches.