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=-6.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT 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 471BBC433E9 for ; Thu, 3 Sep 2020 18:30:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0557320709 for ; Thu, 3 Sep 2020 18:30:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="BMYDqkwh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0557320709 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 638066B0078; Thu, 3 Sep 2020 14:30:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5C24E900004; Thu, 3 Sep 2020 14:30:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4892B6B007D; Thu, 3 Sep 2020 14:30:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id 2F1A46B0078 for ; Thu, 3 Sep 2020 14:30:48 -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 E7BFC181AC553 for ; Thu, 3 Sep 2020 18:30:47 +0000 (UTC) X-FDA: 77222591334.30.fly59_4917a66270ab Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id B8D37180B3AA7 for ; Thu, 3 Sep 2020 18:30:47 +0000 (UTC) X-HE-Tag: fly59_4917a66270ab X-Filterd-Recvd-Size: 2783 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Thu, 3 Sep 2020 18:30:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=HbVfAWRgWK4mVqwUEEB26V5egoyr5DV8CuRXDJgrnFw=; b=BMYDqkwhHpVNscVW0JpPHQpTcj DSKU8/ATwskfQrITq0WkmgjTKDbk1ZxCxqyV7cVIJsbRNecD2Cha3TjX3TeUlL2PrEckkS88bPTHc g4jt1bWAU3Cwo78+8T3Jl/FkvQ3W9rKTw03IbMs98YWLYITZ49DIzUYb/BJSS33fxOsXP9Mzi6CMO SK/s+J9S0OgiNRaEBypIAV8JHrml3dP+Crt7MaSITwSE0KGJFwo1PNJYqetqGeHhfga18NchbYsqb GRGaN2Zzz13LuoBq0JGCiYsPt/i4+9hn1gO5Ih5HBHMazGoh1ihwmbT+fRZ08EGuNUdpAS1I5kW+Z 2xMyHlkA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDu0Q-0003to-4Q; Thu, 03 Sep 2020 18:30:42 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, Song Liu , "Kirill A . Shutemov" , Qian Cai Subject: [PATCH 0/3] Fix read-only THP for non-tmpfs filesystems Date: Thu, 3 Sep 2020 19:30:26 +0100 Message-Id: <20200903183029.14930-1-willy@infradead.org> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 X-Rspamd-Queue-Id: B8D37180B3AA7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000023, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: As described more verbosely in the [3/3] changelog, we can inadvertently put an order-0 page in the page cache which occupies 512 consecutive entries. Users are running into this if they enable the READ_ONLY_THP_FOR_FS config option; see https://bugzilla.kernel.org/show_bug.cgi?id=3D206569 and Qian Cai has also reported it here: https://lore.kernel.org/lkml/20200616013309.GB815@lca.pw/ This is a rather intrusive way of fixing the problem, but has the advantage that I've actually been testing it with the THP patches, which means that it sees far more use than it does upstream -- indeed, Song has been entirely unable to reproduce it. It also has the advantage that it removes a few patches from my gargantuan backlog of THP patches. Matthew Wilcox (Oracle) (3): XArray: Add xa_get_order XArray: Add xas_split mm/filemap: Fix storing to a THP shadow entry Documentation/core-api/xarray.rst | 16 +-- include/linux/xarray.h | 22 ++++ lib/test_xarray.c | 62 ++++++++++ lib/xarray.c | 196 ++++++++++++++++++++++++++++-- mm/filemap.c | 42 +++++-- 5 files changed, 311 insertions(+), 27 deletions(-) --=20 2.28.0