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.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 BF994C3526D for ; Fri, 4 Sep 2020 18:10:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 16239206E7 for ; Fri, 4 Sep 2020 18:10:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="r1v1pA5D" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16239206E7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4CCA16B006E; Fri, 4 Sep 2020 14:10:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 47CB38E0003; Fri, 4 Sep 2020 14:10:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 36D3F6B0071; Fri, 4 Sep 2020 14:10:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0081.hostedemail.com [216.40.44.81]) by kanga.kvack.org (Postfix) with ESMTP id 1358C6B006E for ; Fri, 4 Sep 2020 14:10:42 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id C64D6181AC9C6 for ; Fri, 4 Sep 2020 18:10:41 +0000 (UTC) X-FDA: 77226169482.13.drum17_4b0fda1270b4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id 974B218140B67 for ; Fri, 4 Sep 2020 18:10:41 +0000 (UTC) X-HE-Tag: drum17_4b0fda1270b4 X-Filterd-Recvd-Size: 3085 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Sep 2020 18:10:40 +0000 (UTC) Received: from X1 (unknown [162.218.216.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A381121548; Fri, 4 Sep 2020 17:23:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599240220; bh=Yubo4gWGfAMgXsuIdbjf5JseVfcJ3exwl/EQIwY1s+4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=r1v1pA5DBFLh8x5URIxKpQAsV1Gg6Tm6VzIbGmpL6kbkrw0n+HgWn5ci52EcdbCaB +2nVi/Eu5b/QPyEfqI8y95pRFRoIto70WDo0VBQ+Ae2tCxrXkHtZ/z1Z2BdlUQKDap 3jncTruJP7dsmWgwahaJEitSLJxBeICqVkf89HGI= Date: Fri, 4 Sep 2020 10:23:36 -0700 From: Andrew Morton To: "Matthew Wilcox (Oracle)" Cc: linux-mm@kvack.org, Song Liu , "Kirill A . Shutemov" , Qian Cai Subject: Re: [PATCH 0/3] Fix read-only THP for non-tmpfs filesystems Message-Id: <20200904102336.9ac7fd0ce0956b177cd760c9@linux-foundation.org> In-Reply-To: <20200903183029.14930-1-willy@infradead.org> References: <20200903183029.14930-1-willy@infradead.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 974B218140B67 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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: On Thu, 3 Sep 2020 19:30:26 +0100 "Matthew Wilcox (Oracle)" wrote: > 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=206569 > 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. ERROR: modpost: "xa_get_order" [lib/test_xarray.ko] undefined! ERROR: modpost: "xas_split_alloc" [lib/test_xarray.ko] undefined! xarray is an odd mixture of EXPORT_SYMBOL() and EXPORT_SYMBOL_GPL(). I did this: --- a/lib/xarray.c~xarray-add-xas_split-fix +++ a/lib/xarray.c @@ -1025,6 +1025,7 @@ nomem: xas_destroy(xas); xas_set_err(xas, -ENOMEM); } +EXPORT_SYMBOL_GPL(xas_split_alloc); /** * xas_split() - Split a multi-index entry into smaller entries. _ and --- a/lib/xarray.c~xarray-add-xa_get_order-fix +++ a/lib/xarray.c @@ -1631,6 +1631,7 @@ unlock: return order; } +EXPORT_SYMBOL(xa_get_order); #endif /* CONFIG_XARRAY_MULTI */ /** _