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=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 BCA69C43461 for ; Fri, 11 Sep 2020 19:09:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2CD7D2220D for ; Fri, 11 Sep 2020 19:09:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="Clxn1Qsg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CD7D2220D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 298406B0002; Fri, 11 Sep 2020 15:09:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 247FB6B0003; Fri, 11 Sep 2020 15:09:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1375B6B0037; Fri, 11 Sep 2020 15:09:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0080.hostedemail.com [216.40.44.80]) by kanga.kvack.org (Postfix) with ESMTP id F24516B0002 for ; Fri, 11 Sep 2020 15:09:47 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B1626181AEF10 for ; Fri, 11 Sep 2020 19:09:47 +0000 (UTC) X-FDA: 77251720014.30.quiet61_4d00fb3270f1 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 7F58D180B3AA7 for ; Fri, 11 Sep 2020 19:09:47 +0000 (UTC) X-HE-Tag: quiet61_4d00fb3270f1 X-Filterd-Recvd-Size: 5113 Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Fri, 11 Sep 2020 19:09:46 +0000 (UTC) Received: by mail-lf1-f68.google.com with SMTP id d15so6889709lfq.11 for ; Fri, 11 Sep 2020 12:09:46 -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=Ckr95a3rTfHlI/WnjAXtM326s27f27PY6sNwW1dIJX/mCMyO+2ENl2dw2Gb5uwrP/t SNrmOAxsoaRix8TqhS1nk51XIRgEomz+1oKrPNxSR6zdqcYPfMkawLa6uzJKDn0QOUlS VAcsrw5I0qO5R1w6H0AME399i4xG/7EMSsVYLIrAmJBLVvaIMX6u9U24I70zcn6zbcCD xEfNxcElWBWbWf3nnldrFsNpUit5tMyGfnfmaxFEatnsBrTn/hcmYvOgzbnl2/RVSlM7 pTbrNcf7UfwtTkvcrM/TgwGFZIIbCFQdPGvDZajC98Gp1rz85tij+AMscitdc4M8ALJZ bXFg== X-Gm-Message-State: AOAM533GGSNECYr197/137MBfCRxMK2/obfYpLbNAvVfzvbEAnCPiN9m PIHngtBz5UW+bhmm6ddxoDCC1T383ylcgA== X-Google-Smtp-Source: ABdhPJxkJvfMxSjYrHJpXT6iTE51mbbCBqcUoiYj77xg8A72wtHvkenyU6ITxydLn9cT1LcqdV6jVA== X-Received: by 2002:a05:6512:10d1:: with SMTP id k17mr1235210lfg.179.1599851385101; Fri, 11 Sep 2020 12:09:45 -0700 (PDT) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com. [209.85.167.47]) by smtp.gmail.com with ESMTPSA id a12sm637381ljk.109.2020.09.11.12.09.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Sep 2020 12:09:43 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id u8so6930320lff.1 for ; Fri, 11 Sep 2020 12:09:42 -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" X-Rspamd-Queue-Id: 7F58D180B3AA7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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 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