Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp743343yba; Thu, 18 Apr 2019 08:51:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdCeaTFRLMimQHUNO4wTCWDATLe5nQ0TxHh7N9ItdHDY+miGdAFgTkdoAA+MqKOoREOp3R X-Received: by 2002:a63:fe0a:: with SMTP id p10mr88622511pgh.86.1555602669647; Thu, 18 Apr 2019 08:51:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555602669; cv=none; d=google.com; s=arc-20160816; b=dkHVOXvjplwGZjRks1BCHv9B3JRFfQ3gaH3MBkiYi42cBTUgZgkTWYTyx5Skyq9448 OPqJV7oz0wIKEJfqVxkkuZuU2vhKaLFMWhx8SSnDHZGI2/mTUeClM4h9Plkgvm8PjYw/ bOqeacj6Xfz4XempD3+5eT+JfL4t6m1sqnb2JYTpHpyh+rSMA/5aCSYFd8JCJJrJdJyD IpDZlr/LBQUxoEDqKqlEEy+DZ49j77nBav4g/4p5uK9rrykJfZyvw0ccXcwMbNHtPCQV MCnHZ0E7cwXFTQCHZLKUnvKKBHgmknaUIsc9J+GHVxrj7x9mj9U9BG9g/uAfl/VghaTh 15pQ== 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=q3aXbW/8DQW79hhHpCT8m/hV2hycpbj+kUy1/X2/AUI=; b=luoTv5/iIYIOjMrByy4m5dMeXmnjgQgnJrLei+zyMbjdEMHStqB5fJtCpE+uMJB+3w ICSgVhp2KTKrC4yBIXrQVUt0taI+UaQg1jXmU8DQO+aTzzMQfjB1ls0HDjNVx4Uy48SE ezayMg0zrduyECrr3x9rqHlDnsRb5px/OpdOBxLbvLAGVpSdviyQ3iFd80BSZm+PPDFQ Muh9gJzsqcBu/5NlZSr1s72yQOAp+xCfGafLkroD9HcWJwxMtC12gci8I94/AQv1DO83 PluQTZ3GGcd3JJkkWshQ7CkVpqYfc1UYhoTR+bEr5Lhxw1FFchMeROyQff1Teu3Iux3H 42pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=b+i+BhJe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si2485066plo.101.2019.04.18.08.50.54; Thu, 18 Apr 2019 08:51:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=b+i+BhJe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389562AbfDRPtx (ORCPT + 99 others); Thu, 18 Apr 2019 11:49:53 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:40725 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387519AbfDRPtw (ORCPT ); Thu, 18 Apr 2019 11:49:52 -0400 Received: by mail-lj1-f196.google.com with SMTP id q66so2337602ljq.7 for ; Thu, 18 Apr 2019 08:49:51 -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=q3aXbW/8DQW79hhHpCT8m/hV2hycpbj+kUy1/X2/AUI=; b=b+i+BhJe93MaypvGfbqiHpFPfPoYO2L3LME38H627HLcuvOmeR8rABcBpC8sFzqKvJ TBvEYbogeiTQzUd7M3b+pFIWQ9sh7J5DZi3hLAu44P+IW/8nZSj57OAXzNk0yxYc0qWu 3h3eqnLHWJHX9GL+hJS44OY8Mw7n4RA9Rqa/M= 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=q3aXbW/8DQW79hhHpCT8m/hV2hycpbj+kUy1/X2/AUI=; b=ryYbGLovskGz5vrAGjru3LLGi3bUkjj71q66oJj+EzV4hCfj4KnqcPL6damy4nLUl3 8HsEdcFKd7KedrxYhWjQxcpR15wG9A1qurUzcAUY2Sf5I/OJKMafnnWNhh0y1qaMJTsW IGmok6GjG7vbLbz0JzZj3EjEUbk4NCN1iog0AichE+QBfZGIWs9T+IJTUoXfeeL40C5d E6TeeGK0ALpWq/jHIC8jryVTgijn+kSTKYlB19SV0Y/YglTKDecBOVIp1vt8nMLZT35S XwUD1yDwLeNs4TpxB5dFcXHCsWNgo3cxM+lxodaJC6nEzFxZMo1od0zZOdhrBT20e1ug qHLg== X-Gm-Message-State: APjAAAUR/le7bHw9Q6NAranYcaE2E+Lbx6MGubju0xxKKuV/nVcs+uc9 u3Nu5O82DdGlIP4oqjL/afnqxAJ8BJE= X-Received: by 2002:a2e:8149:: with SMTP id t9mr54253482ljg.2.1555602590147; Thu, 18 Apr 2019 08:49:50 -0700 (PDT) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id f15sm519321lfa.89.2019.04.18.08.49.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 08:49:49 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id t11so1982541lfl.12 for ; Thu, 18 Apr 2019 08:49:49 -0700 (PDT) X-Received: by 2002:ac2:547a:: with SMTP id e26mr11547187lfn.148.1555602588563; Thu, 18 Apr 2019 08:49:48 -0700 (PDT) MIME-Version: 1.0 References: <20190415051919.GA31481@infradead.org> <20190416110906.6c773aff@mschwideX1> <20190416140658.2cb73a3f@mschwideX1> <20190417094637.51ad4c67@mschwideX1> <20190417100244.42e29736@mschwideX1> <20190418100218.0a4afd51@mschwideX1> In-Reply-To: <20190418100218.0a4afd51@mschwideX1> From: Linus Torvalds Date: Thu, 18 Apr 2019 08:49:32 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Linux 5.1-rc5 To: Martin Schwidefsky Cc: Christoph Hellwig , Linux List Kernel Mailing , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-s390 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 Thu, Apr 18, 2019 at 1:02 AM Martin Schwidefsky wrote: > > The problematic lines in the generic gup code are these three: > > 1845: pmdp = pmd_offset(&pud, addr); > 1888: pudp = pud_offset(&p4d, addr); > 1916: p4dp = p4d_offset(&pgd, addr); > > Passing the pointer of a *copy* of a page table entry to pxd_offset() does > not work with the page table folding on s390. Hmm. I wonder why. x86 too does the folding thing for the p4d and pud case. The folding works with the local copy just the same way it works with the orignal value. But I see that s390 does some other kind of folding and does that addition of the p*d_index() unconditionally. I guess that does mean that s390 will just have to have its own walker. For the issue of the page refcount overflow it really isn't a huge deal. Adding the refcount checking is simple (see the example patch I gave for powerpc - you'll just have a couple of extra cases since you do it all, rather than just the special hugetlb cases). Obviously in general it would have been nicer to share as much code as possible, but let's not make things unnecessarily complex if s390 is just fundamentally different.. Linus