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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39B52CD128A for ; Wed, 3 Apr 2024 11:06:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9E5DF6B0089; Wed, 3 Apr 2024 07:06:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 996886B008A; Wed, 3 Apr 2024 07:06:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8852C6B008C; Wed, 3 Apr 2024 07:06:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 6A5126B0089 for ; Wed, 3 Apr 2024 07:06:37 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 8561DA1337 for ; Wed, 3 Apr 2024 11:06:34 +0000 (UTC) X-FDA: 81967942308.23.2D8703C Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf07.hostedemail.com (Postfix) with ESMTP id BF32F40007 for ; Wed, 3 Apr 2024 11:06:32 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf07.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712142392; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JBFKl5zcfnefAfmZDijHisodbjHPH+XP0DaSDhmlL70=; b=hOgmCx6Z5EjIYIvyfSDWhrwCnRmD9xh+SUftrbwVlXbbKr/CygDHWAGac1pOcxV7p3zCqg buUA9E3LtQfyqpmDrz7+NrVLIjjEwmztymSzorch3pbgvTEXeFakamWRMgzdx71VqWCuh4 9hJ9TJQGr8Uw8o8niEVma5GiAADE6jg= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf07.hostedemail.com: domain of ryan.roberts@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=ryan.roberts@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712142392; a=rsa-sha256; cv=none; b=SUcQgCe3MsvN63Wmtply5DPy9tVwvu9JPBk8iSJoO+lHXk0YS+XB2WSXtqtiwHVQudlmYw i4UdsGrVcILuDobcE+tRjrNDhjnHmryYslT/2rwkOyAL2DllBJQHNoGsicDNgaBmn57GYt pDZ66Ml49XyRDdNAsQsvBbt1CRqyuK0= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D30E21595; Wed, 3 Apr 2024 04:07:02 -0700 (PDT) Received: from [10.57.72.245] (unknown [10.57.72.245]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 38F4C3F64C; Wed, 3 Apr 2024 04:06:30 -0700 (PDT) Message-ID: Date: Wed, 3 Apr 2024 12:06:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/3] mm/gup: fixups for hugetlb gup rework series Content-Language: en-GB To: peterx@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Huacai Chen , David Hildenbrand , Jason Gunthorpe , Nathan Chancellor , Andrew Morton , Matthew Wilcox , WANG Xuerui , loongarch@lists.linux.dev References: <20240403013249.1418299-1-peterx@redhat.com> From: Ryan Roberts In-Reply-To: <20240403013249.1418299-1-peterx@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspam-User: X-Stat-Signature: 336g8mhkwn57u6y7znduutsr3q7kwpwa X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: BF32F40007 X-HE-Tag: 1712142392-916225 X-HE-Meta: U2FsdGVkX1/tep4bU422cC6URrrp1KotED3DQ8cNBxSQ2bKooPbSqsQaH68UP7j6Bx/y53JY0Ww+K8QXOaBY0vfwfvR4YJ5ovmpDeOYb9b33M6o+vGhHUWTtHw1q9U4tnVUEp7KPis4J9jt/jWnLZkpiDpOlsQPy1JBl/SItApTr5L7/sAwjKB24VZNAxqWj1prAEh0b+twOY3/vjbymJnmx3jOTgxToGMmDy9xi6C2aFd9AV23L7UdhXcYsccUqZVOvtTFGYNTEheamWnOlaHJrnXISE4ho8eOfVcc1OOPYOcxYBykgJ4LAlNMch3QvY0BA2BF3MD7yj9Jow70g/PA32lLHrjUrWZDbz8QrYP79xGVkOaLvItCmer+uuUFNVBeGJj7ZkgqkV1Gr5Iy7CEG2of8OFp3CuNybmVWygEVFtunOirSbrRXUJHDI0QIHrBNixgwJpjMehAlmRo5ojp54AepLmZHgxNqiwG3oUOklgUgQNA33g8NXn1kiuur9N0x9DE6nGOxoDNPfmdEbt7EEXNcqw3qM1vkg8lYuqn/2NtHUtOEQKSDHSrp8NIgFGDjw6RXcBBH74CSfhgEWiKby/WirhXl/BINGLSjVaOnEtnpbcvLcBCz/VEs6J1HcJxXWQRm0qqSOBQIIomgxBC8Njgk4FExho6c8v3t2IN6o7Brs7X5LRxfXVK6u2yrK4lMS7uXlUjW0SpXC/m73lfbenzIR361I1RrGqCUAZIcxnaKjWwrAzr7Xj3pdbLb+DAdfuUCFS5YBiux3pRecMx9U7Iasl60YQR03cTG3VLQHP6aBsGjT0DwxgY2vUl/5PsmMeZ2LhP8D3tiDtDaSrxbpmveFrNt0jK+xR76TTdC05nDI8PZ2GxjGWVsazy5JZRZ/DJhNFQyTe3lu7JsAxYIfRpotQlISAHS3wBboM/mkHsZ2shIQVb9heqVOm6T/7UdnY9klEULTY/Nj7HU 88N8UrHZ 0M914NHdJmxXG4EF2GBQgRrEIdezeq7WpEwCsfPP3xke655JRP5MSmyCvJzibDzKtLqa07znNEUXs91nfTZsrdWb2ert8nTfL460lH2H7vkLdkLB9jPpHoegn0VRamEQ8RwRTNjisOoGDV6dTmz/CIdiftyCfNw3sZsui/hbHBUgNOQbiaWwWfKRIejMSxSOPQCDaYKqmzWqsgJiFtJ5/Ei2piG5vPXWHqFPPR76LGQjewd1GN0sgVzsulQOLHp5Solc4A77hr7PFxpGKykqza9Z15/bqFVJY0DuLSeBVWr/RRLSnIVvVJvTQ6w== 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: List-Subscribe: List-Unsubscribe: On 03/04/2024 02:32, peterx@redhat.com wrote: > From: Peter Xu > > Hi, > > This is a small patchset that will fix two known issues that got reported > today on the previous hugetlb unification series on slow gup [1]. > > The first issue was reported by Ryan Roberts [2] on a test failure over > gup_longterm. Patch 1-2 should fix it. Tested with 32MB hugepages on > arm64 VM. > > The second issue was reported by Nathan Chancellor [3] on a build issue > over loongson's defconfig (loongson3_defconfig). It can be easily > reproduced with my own build setup [4], while patch 3 fixes it, and should > hopefully fix similar archs where pud_pfn() is not defined even if > pud_leaf() can return true. > > For the 2nd issue, it's debatable whether it's an arch issue, because > logically speaking pud_pfn() and pud_leaf() should either be both defined > or both not. But since the current fix will be the simplest and still safe > (I at least checked loongarch doesn't support either pud dax or pud > hugetlb), I think we can consider having this to unbreak the build first, > assuming this could also happen to other archs. > > One note is that the last 2 patches should be squashed into corresponding > patch, while the 1st patch should be kept standalone. > > Thanks, > > [1] https://lore.kernel.org/r/20240327152332.950956-1-peterx@redhat.com > [2] https://lore.kernel.org/r/adfdd89b-ee56-4758-836e-c66a0be7de25@arm.com > [3] https://lore.kernel.org/r/ZgyKLLVZ4vN56uZE@x1n > [4] https://gitlab.com/peterx/lkb-harness/-/blob/main/config.json?ref_type=heads#L32 > > Peter Xu (3): > mm: Allow anon exclusive check over hugetlb tail pages > fixup! mm/gup: handle huge pmd for follow_pmd_mask() > fixup! mm/arch: provide pud_pfn() fallback > > include/linux/page-flags.h | 8 +++++++- > include/linux/pgtable.h | 6 +++++- > mm/gup.c | 3 --- > mm/internal.h | 10 ---------- > 4 files changed, 12 insertions(+), 15 deletions(-) > With these applied, gup_longterm is now passing for me on arm64. So for the series: Tested-by: Ryan Roberts