From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752007AbdB1Tg5 (ORCPT ); Tue, 28 Feb 2017 14:36:57 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:42516 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751782AbdB1Tfn (ORCPT ); Tue, 28 Feb 2017 14:35:43 -0500 Date: Tue, 28 Feb 2017 19:35:39 +0000 From: Al Viro To: Lorenzo Stoakes , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mm@kvack.org Subject: Re: [PATCH RESEND] drm/via: use get_user_pages_unlocked() Message-ID: <20170228193539.GT29622@ZenIV.linux.org.uk> References: <20170227215008.21457-1-lstoakes@gmail.com> <20170228090110.m4pxtjlbgaft7oet@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170228090110.m4pxtjlbgaft7oet@phenom.ffwll.local> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 28, 2017 at 10:01:10AM +0100, Daniel Vetter wrote: > > + ret = get_user_pages_unlocked((unsigned long)xfer->mem_addr, > > + vsg->num_pages, vsg->pages, > > + (vsg->direction == DMA_FROM_DEVICE) ? FOLL_WRITE : 0); Umm... Why not ret = get_user_pages_fast((unsigned long)xfer->mem_addr, vsg->num_pages, vsg->direction == DMA_FROM_DEVICE, vsg->pages); IOW, do you really need a warranty that ->mmap_sem will be grabbed and released? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f71.google.com (mail-wm0-f71.google.com [74.125.82.71]) by kanga.kvack.org (Postfix) with ESMTP id 135996B0388 for ; Tue, 28 Feb 2017 14:35:46 -0500 (EST) Received: by mail-wm0-f71.google.com with SMTP id w67so8447792wmd.3 for ; Tue, 28 Feb 2017 11:35:46 -0800 (PST) Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk. [195.92.253.2]) by mx.google.com with ESMTPS id c15si3637400wrd.188.2017.02.28.11.35.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Feb 2017 11:35:43 -0800 (PST) Date: Tue, 28 Feb 2017 19:35:39 +0000 From: Al Viro Subject: Re: [PATCH RESEND] drm/via: use get_user_pages_unlocked() Message-ID: <20170228193539.GT29622@ZenIV.linux.org.uk> References: <20170227215008.21457-1-lstoakes@gmail.com> <20170228090110.m4pxtjlbgaft7oet@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170228090110.m4pxtjlbgaft7oet@phenom.ffwll.local> Sender: owner-linux-mm@kvack.org List-ID: To: Lorenzo Stoakes , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mm@kvack.org On Tue, Feb 28, 2017 at 10:01:10AM +0100, Daniel Vetter wrote: > > + ret = get_user_pages_unlocked((unsigned long)xfer->mem_addr, > > + vsg->num_pages, vsg->pages, > > + (vsg->direction == DMA_FROM_DEVICE) ? FOLL_WRITE : 0); Umm... Why not ret = get_user_pages_fast((unsigned long)xfer->mem_addr, vsg->num_pages, vsg->direction == DMA_FROM_DEVICE, vsg->pages); IOW, do you really need a warranty that ->mmap_sem will be grabbed and released? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org