From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by kanga.kvack.org (Postfix) with ESMTP id 4588C6B0031 for ; Wed, 2 Oct 2013 12:20:26 -0400 (EDT) Received: by mail-pd0-f174.google.com with SMTP id y13so1107405pdi.19 for ; Wed, 02 Oct 2013 09:20:25 -0700 (PDT) Date: Wed, 2 Oct 2013 09:20:09 -0700 From: Christoph Hellwig Subject: Re: [PATCH 0/26] get_user_pages() cleanup Message-ID: <20131002162009.GA5778@infradead.org> References: <1380724087-13927-1-git-send-email-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1380724087-13927-1-git-send-email-jack@suse.cz> Sender: owner-linux-mm@kvack.org List-ID: To: Jan Kara Cc: LKML , linux-mm@kvack.org, Alexander Viro , Andreas Dilger , Andy Walls , Arnd Bergmann , Benjamin LaHaise , ceph-devel@vger.kernel.org, Dan Williams , David Airlie , dri-devel@lists.freedesktop.org, Gleb Natapov , Greg Kroah-Hartman , hpdd-discuss@ml01.01.org, Jarod Wilson , Jayant Mangalampalli , Jean-Christophe Plagniol-Villard , Jesper Nilsson , Kai Makisara , kvm@vger.kernel.org, Laurent Pinchart , linux-aio@kvack.org, linux-cris-kernel@axis.com, linux-fbdev@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-media@vger.kernel.org, linux-nfs@vger.kernel.org, linux-rdma@vger.kernel.org, linux-scsi@vger.kernel.org, Manu Abraham , Mark Allyn , Mikael Starvik , Mike Marciniszyn , Naren Sankar , Paolo Bonzini , Peng Tao , Roland Dreier , Sage Weil , Scott Davilla , Timur Tabi , Tomi Valkeinen , Tony Luck , Trond Myklebust On Wed, Oct 02, 2013 at 04:27:41PM +0200, Jan Kara wrote: > Hello, > > In my quest for changing locking around page faults to make things easier for > filesystems I found out get_user_pages() users could use a cleanup. The > knowledge about necessary locking for get_user_pages() is in tons of places in > drivers and quite a few of them actually get it wrong (don't have mmap_sem when > calling get_user_pages() or hold mmap_sem when calling copy_from_user() in the > surrounding code). Rather often this actually doesn't seem necessary. This > patch series converts lots of places to use either get_user_pages_fast() > or a new simple wrapper get_user_pages_unlocked() to remove the knowledge > of mmap_sem from the drivers. I'm still looking into converting a few remaining > drivers (most notably v4l2) which are more complex. Even looking over the kerneldoc comment next to it I still fail to understand when you'd want to use get_user_pages_fast and when not. This isn't meant as an argument against your series, but maybe a hint that we'd need further work in this direction. -- 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