Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp60398pxy; Wed, 21 Apr 2021 18:30:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybT6CElmnQBn9ZcXQwqhm7AYNdJPpAd26dho0Pkd/IXFtWOeQGv8XIqFvv/942L8VA5O/A X-Received: by 2002:a63:2c81:: with SMTP id s123mr972619pgs.168.1619055039324; Wed, 21 Apr 2021 18:30:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619055039; cv=none; d=google.com; s=arc-20160816; b=ay7tvyKJanGPpAKduTZ2ENLaGM3eOfqI3FSwRsxmI5VQZb5Vaciy9KAPXs1EWqJRIp GOdQc1CopGYxLOdEKvkFjcsj8Dfe4OQoXTPly/1vvhbCEgR0cyoaCJIPTIhbwWE0G0DP nXkKq/QcMt4/DwHflgWh7EXixbXbaM3C+yMATDsOp/SeugNJ7FyoF2RRdVGBXUHU4z4r gE1hiFg/1YOaniaaXJeoCNNhn296Yl+5x8ECSZg9r9+aiD8U6kX8sc2ExqWxJdGmjHN7 YhM32RPYkoGHJC5enSo6w5H75DtAa5sr5ZbYoC1wur+7buVXK+v6IGs1MHXCPjLiE7Df BbHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:subject:cc:to :from:date:dkim-signature; bh=6Bo/151Dx6SDWNJTYqVzspMT+/EPJItqGJiDq5IFPhE=; b=gQ5i5zcugVud9AoLyJmK+G++4QffeuzcOC0zL1BCLPgOucv5wSgbuj/psmH401ehSj yJX+U1nLgM5LkjxpRN3OOwFtgCjKigTR83BS+fgIiSVYpWFu9zd1JOMXRiB4G6rQPO9G 6HVnt2SdWgqakoP59l4hfGFDnneja78jT2OOsdzm1a0otVkggqKpIQXRDuBbjynb4/a5 /Grjqrzwbdnh6+O5v0GqQirTYDpeQlDpukVjs5m2BW43kAQKajQ2tjxQCMwenElfSsrC oxR+g0QpNq9rT1cuHaX4yEpF6nWTIl3XErjqExyADdKIbPhaBEPhvp3uoXOvWiWKGjMC nCWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lZQSVZ93; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m189si1087838pfb.79.2021.04.21.18.30.27; Wed, 21 Apr 2021 18:30:39 -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=@google.com header.s=20161025 header.b=lZQSVZ93; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343927AbhDVAgA (ORCPT + 99 others); Wed, 21 Apr 2021 20:36:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343924AbhDVAf7 (ORCPT ); Wed, 21 Apr 2021 20:35:59 -0400 Received: from mail-oo1-xc2a.google.com (mail-oo1-xc2a.google.com [IPv6:2607:f8b0:4864:20::c2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A489C06138A for ; Wed, 21 Apr 2021 17:35:25 -0700 (PDT) Received: by mail-oo1-xc2a.google.com with SMTP id i25-20020a4aa1190000b02901bbd9429832so9605123ool.0 for ; Wed, 21 Apr 2021 17:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:user-agent:mime-version; bh=6Bo/151Dx6SDWNJTYqVzspMT+/EPJItqGJiDq5IFPhE=; b=lZQSVZ93U5rlTaerOyCDp4WG8GDFqrv9GVEloGw69RwcLC0p+ynNriAAKh5cZDNNXx CAsk+uxmxIfAIl7Wsg1oFEbCHaU1TWUHOr3cj2p+741eCW2yUgwyWyzG3UoCAxw/EC1U aAj653CNTXmYfHx4RdS2hgqpaDLUe29SnqfUf+798jlihuK4S1MWHUJRv57Osz46TJU3 Rm5Gq/Dfqq280Hg20VRpEyq9kshF1QKKyaJo7+nc9AzzVgmvqvOImJYlGcQqQtW597zj 8ZZM4vdDmKael5jMXrnDl8FMdarffo0VnJb6CoJQpbA+MRsEwoR8rCa4TQhcbh/hvifp 1arA== 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:user-agent :mime-version; bh=6Bo/151Dx6SDWNJTYqVzspMT+/EPJItqGJiDq5IFPhE=; b=Ci/NZfBkhCgLBxDigtTuBODX3XvAbZOAI0jPFVj1HRPctv2tMiRtvlURqEKbyfZlUz VB73MW5fqUv1CSUttRsoAx+hAi1Ogz5YZLoaUCXr6T7IiRZuQP/408EJnWvRgwyTiaWO L5sjGCiqoDWZjwZArLcMtQDHPOgEGZ+2oVV3dRMFeYIXE2EaZ5IDt1oafIogbhOy38VX geMGNPsFXvrFdZe9kvpeIXEb7d9EhzHLp3yCpQrVVfULAzgnoxIQoawo5Cwf4XBLpmbL 5ZBRwMlwK+nEAI8HGRrwvc3uj51MoInprghDaQXcUl31+XCY3LSZaQoeXBJejxarjhJq iPrw== X-Gm-Message-State: AOAM5308Khm0qWhD2irGeTg/tpRY8/ErqFJBQC8BP8jy9RZQIeWeIT54 G1lCRNyxvKZqhMnA8asAk56brA== X-Received: by 2002:a4a:851a:: with SMTP id k26mr395631ooh.27.1619051724106; Wed, 21 Apr 2021 17:35:24 -0700 (PDT) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id h28sm255325oof.47.2021.04.21.17.35.22 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Wed, 21 Apr 2021 17:35:23 -0700 (PDT) Date: Wed, 21 Apr 2021 17:35:11 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Andrew Morton cc: Matthew Wilcox , William Kucharski , Christoph Hellwig , Jan Kara , Dave Chinner , Hugh Dickins , Johannes Weiner , "Kirill A. Shutemov" , Yang Shi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 0/2] mm/filemap: fix 5.12-rc regressions Message-ID: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-897914698-1619051723=:3299" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-897914698-1619051723=:3299 Content-Type: TEXT/PLAIN; charset=US-ASCII Andrew, I'm very sorry, this is so late: I thought we had already tested 5.12-rc's mm/filemap changes earlier, but running xfstests on 32-bit huge tmpfs last weekend revealed a hang (fixed in 1/2); then looking closer at test results, found SEEK_HOLE/SEEK_DATA discrepancies that I'd previously assumed benign (surprises there not surprising when huge pages get used) were in fact indicating regressions in the new seek_hole_data implementation (fixed in 2/2). Complicated by xfstests' seek_sanity_test needing some adjustments to work correctly on huge tmpfs; but not yet submitted because I've more to do there. seek_sanity combo patch attached, to allow anyone here to verify the fixes on generic 308 285 286 436 445 448 490 539. Up to you and Matthew whether these are rushed last minute into 5.12, or held over until the merge window, adding "Cc: stable"s. 1/2 mm/filemap: fix find_lock_entries hang on 32-bit THP 2/2 mm/filemap: fix mapping_seek_hole_data on THP & 32-bit mm/filemap.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) Thanks, Hugh --0-897914698-1619051723=:3299 Content-Type: TEXT/x-patch; name=seek_sanity.patch Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=seek_sanity.patch eGZzdGVzdHM6IHNlZWtfc2FuaXR5X3Rlc3QgYWRqdXN0bWVudHMNCg0KSHVn ZSB0bXBmcyBoYWJpdHVhbGx5IGZhaWxlZCBnZW5lcmljLzI4NSBzZWVrX3Nh bml0eV90ZXN0IDExLjA4IGFuZA0KMTIuMDggYmVjYXVzZSB0aGUgbmVhci1F T0YgZGF0YSB3YXMgd3JpdHRlbiBhdCBhbiBvZmZzZXQgb2YgMU1pQiBpbnRv DQp0aGUgeDg2XzY0IDJNaUIgaHVnZSBwYWdlIGFsbG9jYXRlZCBmb3IgaXQs IHNvIFNFRUtfREFUQSB0aGVuIGZvdW5kDQphbiBvZmZzZXQgMU1pQiBsb3dl ciB0aGFuIGV4cGVjdGVkLiAgV29yayBhcm91bmQgdGhpcyBieSBleHRlbmRp bmcNCnRoYXQgZXh0cmEgMU1pQiBhdCBFT0YgdG8gYWxsb2Nfc2l6ZSBpbiB0 ZXN0MTEoKSBhbmQgdGVzdDEyKCkuDQoNCkh1Z2UgdG1wZnMgb24gaTM4NiB3 aXRob3V0IFBBRSBoYWJpdHVhbGx5IGZhaWxlZCBnZW5lcmljLzQ5MA0Kc2Vl a19zYW5pdHlfdGVzdCAyMC4wMyBhbmQgMjAuMDQ6IGJlY2F1c2UgaXRzIDRN aUIgYWxsb2Nfc2l6ZSwgdXNlZA0KZm9yIGJ1ZnN6LCBoYXBwZW5zIHRvIHNj cmFwZSB0aHJvdWdoIHRoZSBpbml0aWFsIGZpbHN6IEVGQklHIGNoZWNrLA0K YnV0IGl0cyBvdmVyZmxvd3MgZmFpbCBvbiB0aG9zZSB0d28gdGVzdHMuIHRt cGZzIGRvZXMgbm90IHVzZSBleHRbMjNdDQp0cmlwbHkgaW5kaX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