Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934628AbdC3Ssy (ORCPT ); Thu, 30 Mar 2017 14:48:54 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:53434 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933891AbdC3Ssv (ORCPT ); Thu, 30 Mar 2017 14:48:51 -0400 Date: Thu, 30 Mar 2017 19:48:24 +0100 From: Al Viro To: Linus Torvalds Cc: Russell King - ARM Linux , "linux-arch@vger.kernel.org" , Linux Kernel Mailing List , Richard Henderson , Will Deacon , Haavard Skinnemoen , Vineet Gupta , Steven Miao , Jesper Nilsson , Mark Salter , Yoshinori Sato , Richard Kuo , Tony Luck , Geert Uytterhoeven , James Hogan , Michal Simek , David Howells , Ley Foon Tan , Jonas Bonn , Helge Deller , Martin Schwidefsky , Ralf Baechle , Benjamin Herrenschmidt , Chen Liqin , "David S. Miller" , Chris Metcalf , Richard Weinberger , Guan Xuetao , Thomas Gleixner , Chris Zankel Subject: Re: [RFC][CFT][PATCHSET v1] uaccess unification Message-ID: <20170330184824.GS29622@ZenIV.linux.org.uk> References: <20170329055706.GH29622@ZenIV.linux.org.uk> <20170330162241.GG7909@n2100.armlinux.org.uk> <20170330164342.GR29622@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Content-Length: 877 Lines: 19 On Thu, Mar 30, 2017 at 10:18:23AM -0700, Linus Torvalds wrote: > This is all going in the wrong direction entirely. This is not going into the tree - it's just a "let's check your theory about might_fault() overhead being the source of slowdown you are seeing" quick-and-dirty patch. Speaking of the checks in there - if anything, might_fault() in those suckers belongs outside of the loop; note that even on the kmap_atomic() side of copy_page_to_iter_iovec() we do stuff like fault_in_pages_writeable(). BTW, ..._inatomic is a very unfortunate name, IMO - it's *not* safe to use in atomic contexts as-is, to start with; the caller needs to take care of pagefault_disable(). If anything, __copy_from_user_nofault() would probably be better... I really wonder about the low dispersion in those tests - IME on amd64 boxen it tends to be ~5% or so; what's normal for arm?