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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6DC2C77B70 for ; Mon, 17 Apr 2023 10:56:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230476AbjDQK4P (ORCPT ); Mon, 17 Apr 2023 06:56:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230227AbjDQKzn (ORCPT ); Mon, 17 Apr 2023 06:55:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 196701737; Mon, 17 Apr 2023 03:54:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D84AC6223B; Mon, 17 Apr 2023 10:52:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75C41C433EF; Mon, 17 Apr 2023 10:52:36 +0000 (UTC) Date: Mon, 17 Apr 2023 11:52:33 +0100 From: Catalin Marinas To: Lorenzo Stoakes Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Matthew Wilcox , David Hildenbrand , linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-security-module@vger.kernel.org, Will Deacon , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Sven Schnelle , Eric Biederman , Kees Cook , Alexander Viro , Christian Brauner , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Kentaro Takeda , Tetsuo Handa , Paul Moore , James Morris , "Serge E . Hallyn" , Paolo Bonzini Subject: Re: [PATCH v3 3/7] mm/gup: remove vmas parameter from get_user_pages_remote() Message-ID: References: <523f0764f4979276a6d4b89cbad9af9124e4bf0a.1681558407.git.lstoakes@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <523f0764f4979276a6d4b89cbad9af9124e4bf0a.1681558407.git.lstoakes@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On Sat, Apr 15, 2023 at 01:09:24PM +0100, Lorenzo Stoakes wrote: > The only instances of get_user_pages_remote() invocations which used the > vmas parameter were for a single page which can instead simply look up the > VMA directly. In particular:- > > - __update_ref_ctr() looked up the VMA but did nothing with it so we simply > remove it. > > - __access_remote_vm() was already using vma_lookup() when the original > lookup failed so by doing the lookup directly this also de-duplicates the > code. > > This forms part of a broader set of patches intended to eliminate the vmas > parameter altogether. > > Signed-off-by: Lorenzo Stoakes > --- > arch/arm64/kernel/mte.c | 7 ++++--- For arm64: Reviewed-by: Catalin Marinas 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 461B7C77B70 for ; Mon, 17 Apr 2023 10:53:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iIjzvW9fcAzVdf27+6miL8+M7EJHvLbwz4JgAGFNH+M=; b=qRwr4LPsbPxXPj 4IRSZn5rWmfs1j7RQd7mZwvXaB5lf8+yJWsRU+Sdxfl4EHW2vQCGim+0f1IDnS7YrEpLLyrYSO8ZL 9U+1A5bhdcP8WOfhej+U4PP7hOIpgqgEGWqqZpNTK4MtvlHkjARJUiIA4fvQo1qKrtXtmIUdQQBqX rn7kGOCBW8MvqDyWTqLggflnqVeD39IcNGF7wKSId98NB5x921+EQgxWwBOV0ynFTtPPS5YBPvQTt 76aExCv0DsulpmJ4/w0lsEMfjlhxp/joSBf9se7xO+ubzxFTTrsf7iTgsDfEzs+LgOFdiS6jETt2r 0OUwmcL36YRjY+FK7MIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1poMTX-00FuCM-0W; Mon, 17 Apr 2023 10:52:47 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1poMTT-00FuB4-37 for linux-arm-kernel@lists.infradead.org; Mon, 17 Apr 2023 10:52:45 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D44F1621E5; Mon, 17 Apr 2023 10:52:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75C41C433EF; Mon, 17 Apr 2023 10:52:36 +0000 (UTC) Date: Mon, 17 Apr 2023 11:52:33 +0100 From: Catalin Marinas To: Lorenzo Stoakes Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Matthew Wilcox , David Hildenbrand , linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-security-module@vger.kernel.org, Will Deacon , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Sven Schnelle , Eric Biederman , Kees Cook , Alexander Viro , Christian Brauner , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Kentaro Takeda , Tetsuo Handa , Paul Moore , James Morris , "Serge E . Hallyn" , Paolo Bonzini Subject: Re: [PATCH v3 3/7] mm/gup: remove vmas parameter from get_user_pages_remote() Message-ID: References: <523f0764f4979276a6d4b89cbad9af9124e4bf0a.1681558407.git.lstoakes@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <523f0764f4979276a6d4b89cbad9af9124e4bf0a.1681558407.git.lstoakes@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230417_035244_062580_8F4D7FE4 X-CRM114-Status: GOOD ( 17.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Apr 15, 2023 at 01:09:24PM +0100, Lorenzo Stoakes wrote: > The only instances of get_user_pages_remote() invocations which used the > vmas parameter were for a single page which can instead simply look up the > VMA directly. In particular:- > > - __update_ref_ctr() looked up the VMA but did nothing with it so we simply > remove it. > > - __access_remote_vm() was already using vma_lookup() when the original > lookup failed so by doing the lookup directly this also de-duplicates the > code. > > This forms part of a broader set of patches intended to eliminate the vmas > parameter altogether. > > Signed-off-by: Lorenzo Stoakes > --- > arch/arm64/kernel/mte.c | 7 ++++--- For arm64: Reviewed-by: Catalin Marinas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel