Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp490771pxk; Fri, 11 Sep 2020 12:15:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6BdcGcdCHrzlrA2Sht2vHYHCiM8C7fQl+m7VWz26jqh1qZKoumzKmBXdgWQhkhVU0FO9Q X-Received: by 2002:a17:906:24d2:: with SMTP id f18mr3406959ejb.510.1599851749714; Fri, 11 Sep 2020 12:15:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599851749; cv=none; d=google.com; s=arc-20160816; b=G1SDywXMIxFNj4Sra/ds1vDkQQNdkl7zvUwNMWO653sxGpgTems/VbswPiUGbXdbtR duVZ83Lu211tCfTz5U7KUs3UB8u04VVIq6OSeq2iYmDOZajLPUFhLgEZthsVDjJFz1kZ HG9FVOZ4vMT9vEqJ9FHlwF+SM6gC6GjNzUUMV5r6B9IvyVqJbx8Di6dvZgN8hvSGSDwm 23yrTrhZ5Y6Otdc+BF8eXC6f0Qx56TIIf68+CJ72FWKiYkTfaE/FIlFzyLdfeVNNAaR6 sWYy9ayX10TjUZDWfk4vpSEAP4sVm+71Ou09c2NAcfexMhbBvYR8DrS2q7AmRu0uQYpU Ry8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=lUTLfTAHN/JEc/vY2NZSlPv25B0eM9+I2UvpN7fipvE=; b=eXIfJRiQMyYkOOcvHvcm3cAPk8Y49yVb1g0w7/bXIWzQEYgbKqWxRUfvjEpOQwaqic C/17GIoSpQAEHxFK0YuDOnfOIqht2bZmADFqj8b1eD8p1XrBZmFIkNMs3UqwWB0MHeHV ApodFTo5H5lnuY7ctuQ4TC3PGxjf6k69lRj4V0YrRlXsBmVGWYzphNBriu0E94JKnfM2 znCQHXopONOamyj7gg4ooPsv7fkXYai80hgI6YUVs7G9DkzXtZwCtg9XgNA26RdWKtr7 B6rAwAnfNy9887JpVg7Fogp59wsmuqrPqI3eJOROKihVqnzGgLlDHcSHlui3U3GVeaKL eiBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Clxn1Qsg; 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 g23si1960720edy.179.2020.09.11.12.15.26; Fri, 11 Sep 2020 12:15:49 -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=@linux-foundation.org header.s=google header.b=Clxn1Qsg; 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 S1725835AbgIKTOt (ORCPT + 99 others); Fri, 11 Sep 2020 15:14:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbgIKTOr (ORCPT ); Fri, 11 Sep 2020 15:14:47 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F43BC061573 for ; Fri, 11 Sep 2020 12:14:47 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id o8so15161737ejb.10 for ; Fri, 11 Sep 2020 12:14:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lUTLfTAHN/JEc/vY2NZSlPv25B0eM9+I2UvpN7fipvE=; b=Clxn1QsgKc2lKUePPSN2NAL/bI5bjfBFRul7KsPI2uaRRhC0MOrKjvIFIZdRmVowg5 Sj/tT1SzRVgDZ+3t3dHFGme2ZZ2AzNzf/iHPNpa3Fuz0WH5hvvP/wmiJL+the/L7uCVO 8PyXw3Q3ZjkkDqlxpbtvaLMr+QGOuNdWTmuIw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lUTLfTAHN/JEc/vY2NZSlPv25B0eM9+I2UvpN7fipvE=; b=XK3/DsbOQ0e77ajJ4ws7o0O8IL5kx+phSfoV8JIOUw9WqSmbr9OjSCbvkVPgGFqLW1 zp4ZtCZRoTDIMTNXkRpjjp0p8LjM+rAmf46g3bOMnNd749JMsmUELOrZeB6sWHaubac6 6D5Z1lY+BLnx1TfFhbQcBlvw/tNTC6sCoVIe+C/VfvHQRRM5zInS73swmF5J34QNMwDR jJaHGg/FtDI/X49QIttBktz61zpEkDvUlVD9acd+QtJ18aSdPXpddXg9X3jiOJdU9KdO PaCE1ehDNfPXce4WQLJ7CcaAxFRhbBnK43o6WlL7Urmar7Nai7qcpFry+PH2lFBNEZk9 m75A== X-Gm-Message-State: AOAM530hA3W6jL9pcZNmUAqiZGAZ8sq5D3Q2SLib7iKfPoL1OLgUhtud igRhXTw5y75i4ssLeVsJLsD/UTgMgxa9AA== X-Received: by 2002:a17:906:660f:: with SMTP id b15mr3622559ejp.333.1599851685538; Fri, 11 Sep 2020 12:14:45 -0700 (PDT) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com. [209.85.208.53]) by smtp.gmail.com with ESMTPSA id g10sm2092755ejp.34.2020.09.11.12.14.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Sep 2020 12:14:45 -0700 (PDT) Received: by mail-ed1-f53.google.com with SMTP id w1so11227387edr.3 for ; Fri, 11 Sep 2020 12:14:45 -0700 (PDT) X-Received: by 2002:ac2:4ec7:: with SMTP id p7mr651524lfr.352.1599851382451; Fri, 11 Sep 2020 12:09:42 -0700 (PDT) MIME-Version: 1.0 References: <20200911070939.GB1362448@hirez.programming.kicks-ass.net> In-Reply-To: From: Linus Torvalds Date: Fri, 11 Sep 2020 12:09:25 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm/gup: fix gup_fast with dynamic page table folding To: Vasily Gorbik Cc: Jason Gunthorpe , John Hubbard , Gerald Schaefer , Alexander Gordeev , Peter Zijlstra , Dave Hansen , LKML , linux-mm , linux-arch , Andrew Morton , Russell King , Mike Rapoport , Catalin Marinas , Will Deacon , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Jeff Dike , Richard Weinberger , Dave Hansen , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Arnd Bergmann , Andrey Ryabinin , linux-x86 , linux-arm , linux-power , linux-sparc , linux-um , linux-s390 , Heiko Carstens , Christian Borntraeger , Claudio Imbrenda Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 11, 2020 at 12:04 PM Vasily Gorbik wrote: > > Currently to make sure that every page table entry is read just once > gup_fast walks perform READ_ONCE and pass pXd value down to the next > gup_pXd_range function by value e.g.: [ ... ] Ack, this looks sane to me. I was going to ask how horrible it would be to convert all the other users, but a quick grep convinced me that yeah, it's only GUP that is this special, and we don't want to make this interface be the real one for everything else too.. Linus