Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp23174pxk; Wed, 2 Sep 2020 13:15:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8e39aM1bUySVYKxjgB3Z8Kn1vB2M8ShjX1hAV/JzqkaG3xTggAkLHtqyqn71bJPqmCcy+ X-Received: by 2002:a17:906:f2d3:: with SMTP id gz19mr1710517ejb.377.1599077706085; Wed, 02 Sep 2020 13:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599077706; cv=none; d=google.com; s=arc-20160816; b=rVKYg9Ju5gIba2GCivk6pGpvAZWLkiHdsa8xzQYa9iNuuPJ6biEd8pJy8ibIbNNhVf Iq9n8vr87pjJzuhsUjSWJReijfSDHRFTMeNwGCtD/hLtn2EK/L0hIeOaWeyoZOTB8GOz K6bHdFW4jf2QZd99J+3SC7HVSNNZOL016v8shaQd20xUf+V+MHZsbm1IoBlABcrWnfsa 6mjU0kawgrpLEWhQUWU1pGLWZ7w9Fv+tHGzgo5CJpwyuKObS/1GcIhn1x2gnhGTRGmRX EQOe9lRBV4E+kgEzoVRNWNPvPMldTl1KazyrhQFOxZ+chtJ4RDN+QfUNWaCn6YBMZiF1 yZ8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=VtKLlAudRnA2vKDoZNQw5csEIPXvQwIKm3VyTbaIKFY=; b=LvagcOvVFIp+Gv2Qs2BOFW+Vx9M5VlTbPjnC2SfuQf0mJG9Ru+f72efBDxxY5j61s7 e0Iok7z2AGROiW/EnzexqATeIwLSbOLBzsxdxCSqULPVIWanC1KTcbNTRWV255kFCvzs +QoL2YGsqdMb2DshFyxkD2AIY2la7+/ET5vbbGpN9t87CcwwIraQOnsTdDyZNLZvdAdi 29fbnye4VjmNDJKWDNCs70OR6q8byZ+tFvyEDef4yOVWg7GxmAnCLF97FU0vfaS8F1jm yL6z4Lr5SP35/V7EadeZS8VCZI+8w5g/L7q6f/nwNtesXdg5DKkzDLiFom1FnWNjhJhT 7M8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b="Qwf6X/kG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b18si370112eju.731.2020.09.02.13.14.42; Wed, 02 Sep 2020 13:15:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b="Qwf6X/kG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726323AbgIBUOA (ORCPT + 99 others); Wed, 2 Sep 2020 16:14:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726226AbgIBUN6 (ORCPT ); Wed, 2 Sep 2020 16:13:58 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D335EC061244 for ; Wed, 2 Sep 2020 13:13:57 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id w186so1005315qkd.1 for ; Wed, 02 Sep 2020 13:13:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=VtKLlAudRnA2vKDoZNQw5csEIPXvQwIKm3VyTbaIKFY=; b=Qwf6X/kGgSmY9tKp7Kmk3c8MgxIjvqFpEQAe+tb1+XOXXgvyehDPKeYG7dZ/Yg3IX6 htTDkWFcqvo513Hi/a7qgs846lJoqXVAXRLY91hdU61Y6OJwM73W0pMKYYASAJzRG86+ Dg/4lQzFDbgl69fZkKJw7LZwiwF3cwnrxKfHjCVxdDezuLssdPD1RCUPY998/GHXvD66 vXdCC47ctdTSW43mZLLck7PEVdwrveAum6OrxzF6kuLEFcjT+1LtRvd1cwQbcz8kXeCO 1YqtVf246V4JoEYZACerGXbT/EI/gGjAeg6BCbC2etnr610vhlV/2Mf9s7fG3C/sl3Zf cwzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=VtKLlAudRnA2vKDoZNQw5csEIPXvQwIKm3VyTbaIKFY=; b=jMBew3d6EqurLalpRfA3SNWid1byjuLbpo+9z7eHaQLowdTHaGnNeptGvPgHjmJAjG R5KfMUKQDDV7KI9kS7JRbFw8EMzX86P99culhyd+YJa3Htmtsb6KM/+HRTHBwxCu0M6e IQKQKxJ1/hotcNpfXKsqzUQpWXZC7Li/5dZtKAYN/5toLM2UxJGMWAZsyg2KPTpCDVRS nsvcy+ZpeZ/SyMO4o1uCWsWOs5cIafz4BmaBydmF3pvHxVUti/rawola0/4df7KaloNM pWaYRKQvKAczeBDseOgexiD50JdLadbnA+Pg2DNaBr5wT/lVpVJ8UlVojOY/5LQnCxIu exvw== X-Gm-Message-State: AOAM533aw7ehg+1yeLhSyiwu1xcRhJgc5f7K7aMUKBKWQSDUyUbiosW/ PxYkbn5qg1xKmisln/fzsAFKpw== X-Received: by 2002:a37:a484:: with SMTP id n126mr8834583qke.5.1599077636904; Wed, 02 Sep 2020 13:13:56 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id g18sm347980qtu.69.2020.09.02.13.13.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 13:13:56 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kDZ8l-0068s3-Em; Wed, 02 Sep 2020 17:13:55 -0300 Date: Wed, 2 Sep 2020 17:13:55 -0300 From: Jason Gunthorpe To: Gerald Schaefer Cc: John Hubbard , Andrew Morton , Christian Borntraeger , Linus Torvalds , linux-mm , LKML , Vasily Gorbik , Alexander Gordeev , linux-s390@vger.kernel.org, Heiko Carstens , Claudio Imbrenda Subject: Re: [RFC PATCH 0/2] mm/gup: fix gup_fast with dynamic page table folding Message-ID: <20200902201355.GJ24045@ziepe.ca> References: <20200828140314.8556-1-gerald.schaefer@linux.ibm.com> <9071c9fa-ba6a-90dc-2d7a-8b155141d890@de.ibm.com> <20200831121553.8be5dcdbdbc5256846ac513e@linux-foundation.org> <20200901194020.418da486@thinkpad> <91988792-069c-31a6-7840-0122357538c7@nvidia.com> <20200902142437.5f39b4bb@thinkpad> <20200902170958.09be0c3e@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200902170958.09be0c3e@thinkpad> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 02, 2020 at 05:09:58PM +0200, Gerald Schaefer wrote: > I guess we *could* assume that all the extra pXd_offset() calls and > also the de-referencing would be optimized out by the compiler for other > archs, but it is one example where my gut tells me that this might not > be so trivial and w/o unwanted effects after all. Assigning to a variable that is never read should be eliminated.. If things are very complex then the pXX_offset function might need to be marked with attribute pure, but I think this should be reliable? Jason