From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD0FEC433E0 for ; Sat, 13 Jun 2020 15:41:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8011E207BC for ; Sat, 13 Jun 2020 15:41:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8011E207BC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0C21D6B0002; Sat, 13 Jun 2020 11:41:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 09A3D6B0003; Sat, 13 Jun 2020 11:41:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F171A6B0005; Sat, 13 Jun 2020 11:41:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0131.hostedemail.com [216.40.44.131]) by kanga.kvack.org (Postfix) with ESMTP id D69786B0002 for ; Sat, 13 Jun 2020 11:41:27 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 96555180AD815 for ; Sat, 13 Jun 2020 15:41:27 +0000 (UTC) X-FDA: 76924603014.16.guide30_3309a1c26de6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 5C93B100E690B for ; Sat, 13 Jun 2020 15:41:27 +0000 (UTC) X-HE-Tag: guide30_3309a1c26de6 X-Filterd-Recvd-Size: 2610 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [195.92.253.2]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Sat, 13 Jun 2020 15:41:27 +0000 (UTC) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.93 #3 (Red Hat Linux)) id 1jk8HW-008ELI-J8; Sat, 13 Jun 2020 15:41:18 +0000 Date: Sat, 13 Jun 2020 16:41:18 +0100 From: Al Viro To: afzal mohammed Cc: Arnd Bergmann , Russell King - ARM Linux admin , Linus Walleij , "linux-kernel@vger.kernel.org" , Linux-MM , Linux ARM , Nicolas Pitre , Catalin Marinas , Will Deacon Subject: Re: [RFC 1/3] lib: copy_{from,to}_user using gup & kmap_atomic() Message-ID: <20200613154118.GH23230@ZenIV.linux.org.uk> References: <9e1de19f35e2d5e1d115c9ec3b7c3284b4a4e077.1591885760.git.afzal.mohd.ma@gmail.com> <20200612135538.GA13399@afzalpc> <20200613120432.GA5319@afzalpc> <20200613125126.GE23230@ZenIV.linux.org.uk> <20200613125615.GF23230@ZenIV.linux.org.uk> <20200613134236.GA4086@afzalpc> <20200613153102.GG23230@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200613153102.GG23230@ZenIV.linux.org.uk> X-Rspamd-Queue-Id: 5C93B100E690B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Jun 13, 2020 at 04:31:02PM +0100, Al Viro wrote: > On Sat, Jun 13, 2020 at 07:12:36PM +0530, afzal mohammed wrote: > > Hi, > > > > On Sat, Jun 13, 2020 at 01:56:15PM +0100, Al Viro wrote: > > > > > Incidentally, what about get_user()/put_user()? _That_ is where it's > > > going to really hurt... > > > > All other uaccess routines are also planned to be added, posting only > > copy_{from,to}_user() was to get early feedback (mentioned in the > > cover letter) > > Sure, but what I mean is that I'd expect the performance loss to be > dominated by that, not by copy_from_user/copy_to_user on large amounts > of data. Especially on the loads like kernel builds - a lot of stat() > and getdents() calls there. To clarify: stat() means small copy_to_user(), getdents() - a mix of put_user() and small copy_to_user(). I would be very surprised if it does not hurt a lot.