Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp514469pxk; Wed, 9 Sep 2020 11:09:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwW3LRGW+Rkcu8aDHJZzC+O2W+lxNJRXMG8WOP+GWmU6+fXmkTjQH9lUivyLeRCpii8YKGp X-Received: by 2002:a17:906:2786:: with SMTP id j6mr4779518ejc.73.1599674945617; Wed, 09 Sep 2020 11:09:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674945; cv=none; d=google.com; s=arc-20160816; b=UE3a6W5he7gkb7mXKwSfcTGwXY2v7vco5Ag0nJhIa55G8maAnHY5e6DT3/OihC1mV1 oqmrT2zdvY4srVWN3HQhBpBa3K+d/GQTnCY28in+dPFWTFpUErM6ZS9dzrhsGZxZez4L yUHEIMpKWlA7rjTauj0CFzMqbPgj1KkT8wFXJKbZhkMrCQoXfI8btfczp16Bsd7+J8pj XmCtvi1Ok3xoJVX3N72LBRBdsPJBzHIXVQclW8FI+MKCmfSVFQJf9sLqFz0hu1Xc3psz 4sbTtuccApJ0npW9i9kZvsMOT2mfGv4NZiR3nxQU7J6a6SMO3ieO7kx9xZAnhPxjyfAk xVZg== 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=UQgQ1jWE5sEaZp188M6nTz8t9kSh4aamz6SSlq8ptfM=; b=rL6Znq7OjuUEu043ridJwugathKka2uFs4rTubttCRN7qIF2wGhgX+vVsgAYMkbRjH CQHX6iJFTzR1LarjfTNEoWAWahGqatfKGsO3+L/8qK2At41zGbMoHiysnw1GvA2BKp2u 89ULGADuAojNFJh1xX7sa65J7ZkgwK7pRXbOItLoa21yMLb0Lbrd7SH/0BxODgbz8EmI uUw8e8+Jp+m9tyUCSU7o7grQ2/UpIG9LKXPEe6iR3AUDU+oVZw52HDgBW7QK+1b+APEi y8LwT2gRgxF/zyWfOQrUMgK+7I9ARlU2rs226sy99tECALWGb5bcLrtuOhGFoMi7F0iN +WCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=A1EztTr1; 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 v10si1965851ejx.195.2020.09.09.11.08.42; Wed, 09 Sep 2020 11:09:05 -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=A1EztTr1; 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 S1730099AbgIISGG (ORCPT + 99 others); Wed, 9 Sep 2020 14:06:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728936AbgIISDa (ORCPT ); Wed, 9 Sep 2020 14:03:30 -0400 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1D47C061757 for ; Wed, 9 Sep 2020 11:03:26 -0700 (PDT) Received: by mail-qv1-xf42.google.com with SMTP id b13so2006945qvl.2 for ; Wed, 09 Sep 2020 11:03:26 -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=UQgQ1jWE5sEaZp188M6nTz8t9kSh4aamz6SSlq8ptfM=; b=A1EztTr153mgaOQzg71QrWYh4iR+/GKjXrKqg1rHHwyCQEu/IERkUOuYsKvQkOl1+C 6eEp+cnjHSrQGtueAOf9pTHLleNwrHI+seHLvaQHFTcxMdSMW5tN7OgJMFx+soMlUkUR eYjHVlgNYm626JzDRfys6jbvYB1TI08s8VAfVz2V9RqGqoB/GOGYcY/+rYj5qrggDmLx K4fu1a4UZ5Rnlb/xtt4Vdy+434DxWnYfGu+HQ3SBS7LpF1L/tfeGSDCPAfZt0eW1xmOI vZmyUl7Hz6/Q8m3UTevIXqwOJHuaAn4ywsKXM3r0kORYKH6pbqnoX/h8gtw1ia3Np5f7 fmIA== 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=UQgQ1jWE5sEaZp188M6nTz8t9kSh4aamz6SSlq8ptfM=; b=PRE8mk6xFDQ0esVJtwxf9MkGhQEyQuFO1nkk0Zxmq2ZYEzyqAbQQyXpV0vowhtDQMa pS73Iuyj1RJtGfq0lpsRQZdGQoGS4ATegXtZ+T9BLqtclrGM5ooxxWaofIqrxDqCZEaN CkKHpuR6YfanDp3FrSq+GEE/Xx7Q298Wy31iyNm2a12FzEl5pvOcygKlVyOcoE8ddgh+ b7STWNNarf4mfwwUP8W9eNaWmiJS/vVZSYUoFa+sAB3Q6KMSTjQ5CaIbfC+T8qPuBSZy xI2yjoAULAgDEEUPF5jM2/IKkkbOMbOTRDLsxF3mjo+7jfLghEmVd83ExuTwkLrt6hKZ O+/w== X-Gm-Message-State: AOAM530NErZOeZMkei7F/Ya+OrZKe/4FShFIRnNjUSkn4eCBxu8PwhWg vaW9Ri2jPKbxIteAeTx0IEeieQ== X-Received: by 2002:a05:6214:5c8:: with SMTP id t8mr5410996qvz.67.1599674606034; Wed, 09 Sep 2020 11:03:26 -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 d16sm4004982qte.19.2020.09.09.11.03.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 11:03:25 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kG4RI-003r3t-JU; Wed, 09 Sep 2020 15:03:24 -0300 Date: Wed, 9 Sep 2020 15:03:24 -0300 From: Jason Gunthorpe To: Gerald Schaefer Cc: Dave Hansen , John Hubbard , LKML , linux-mm , linux-arch , Andrew Morton , Linus Torvalds , Russell King , Mike Rapoport , Catalin Marinas , Will Deacon , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Jeff Dike , Richard Weinberger , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Arnd Bergmann , Andrey Ryabinin , linux-x86 , linux-arm , linux-power , linux-sparc , linux-um , linux-s390 , Alexander Gordeev , Vasily Gorbik , Heiko Carstens , Christian Borntraeger , Claudio Imbrenda Subject: Re: [RFC PATCH v2 1/3] mm/gup: fix gup_fast with dynamic page table folding Message-ID: <20200909180324.GI87483@ziepe.ca> References: <20200907180058.64880-1-gerald.schaefer@linux.ibm.com> <20200907180058.64880-2-gerald.schaefer@linux.ibm.com> <0dbc6ec8-45ea-0853-4856-2bc1e661a5a5@intel.com> <20200909142904.00b72921@thinkpad> <20200909192534.442f8984@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200909192534.442f8984@thinkpad> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 09, 2020 at 07:25:34PM +0200, Gerald Schaefer wrote: > I actually had to draw myself a picture to get some hold of > this, or rather a walk-through with a certain pud-crossing > range in a folded 3-level scenario. Not sure if I would have > understood my explanation above w/o that, but I hope you can > make some sense out of it. Or draw yourself a picture :-) What I don't understand is how does anything work with S390 today? If the fix is only to change pxx_addr_end() then than generic code like mm/pagewalk.c will iterate over a *different list* of page table entries. It's choice of entries to look at is entirely driven by pxx_addr_end(). Which suggest to me that mm/pagewalk.c also doesn't work properly today on S390 and this issue is not really about stack variables? Fundamentally if pXX_offset() and pXX_addr_end() must be consistent together, if pXX_offset() is folded then pXX_addr_end() must cause a single iteration of that level. Jason