From patchwork Sat Jan 21 06:57:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13110983 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 557B3C38159 for ; Sat, 21 Jan 2023 06:58:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 47D656B0074; Sat, 21 Jan 2023 01:58:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3FD286B0073; Sat, 21 Jan 2023 01:58:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C5066B0074; Sat, 21 Jan 2023 01:58:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 1DBA56B0072 for ; Sat, 21 Jan 2023 01:58:11 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id D9EBA40F94 for ; Sat, 21 Jan 2023 06:58:10 +0000 (UTC) X-FDA: 80377901940.09.EC44CA0 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf15.hostedemail.com (Postfix) with ESMTP id BA1D2A0011 for ; Sat, 21 Jan 2023 06:58:06 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=SDkUBU1W; spf=none (imf15.hostedemail.com: domain of BATV+1651c3ebed9361b307e7+7090+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+1651c3ebed9361b307e7+7090+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674284287; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=B8D0bWeotdFdx7oIYHTSXz6cye3hjLZS5m2/hvamHXo=; b=FqXGg3D58b6wo5u+6UnDUlH1BT+cYUe6YjzJzQlNCvYjA/sj0x3XbuQgeUHcz9KvcwupLX JXm63e20ITeWedWUdEsP0tOqMRrd3K0gHgtsgRug+cH+Bu2Cl/yuLxMbx4UZ0sjREt9JtQ T1zP0GW47XcG5VUvBNQj9wW1lBy5tBU= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=SDkUBU1W; spf=none (imf15.hostedemail.com: domain of BATV+1651c3ebed9361b307e7+7090+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+1651c3ebed9361b307e7+7090+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1674284287; a=rsa-sha256; cv=none; b=LUotAB6yZ3jIxuPgW6wHGhFzkugRtle7k9Ru9cw2pVAKImPI1GunOFblZu0W/DBCTS32Rd ZC8yIoTzVxepBEFQ3Hio+Y8vV+a487ZmpbFbayHj1GWCwkOrHaIssnYMUGo/RhkQWjXgNj /BpstEnJ3y+x+evOOJPBgbx/Ez9pDmw= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=B8D0bWeotdFdx7oIYHTSXz6cye3hjLZS5m2/hvamHXo=; b=SDkUBU1WsXxnF7FBjrDRJ4xZZ8 TP3/Mu5FLI87eWKaj4CbwLn/sCwMzyOAC/rrj97FZ/LQomNPWkqgUgmWd/7kDho1tK5yhdhyfsyRQ bIT6z4zRDSoyIta29wHgJFACKI7JJfa2HvSBLOuGiYOCdn0yoQrEQ/qMjGro/wX78HdLrvaIa+sn4 1340LweDytR9Qfhq4madCwpHeJ2oRGbLCDV5eEv/JIHKlFKiqC1gpvhXYQ6PrfYFg4gBpcUMsT9Tr UJLgfO+msrUhr9nmvs+j0mVysX5SCFr897BNqOhJ+cYqiRwv4bOlm3DNEF20F9fUO/dtZoZFLisPN TxKzpxzA==; Received: from [2001:4bb8:19a:2039:6754:cc81:9ace:36fc] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pJ7pA-00DSMD-AR; Sat, 21 Jan 2023 06:58:00 +0000 From: Christoph Hellwig To: Andrew Morton , Matthew Wilcox , Hugh Dickins Cc: linux-afs@lists.infradead.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, cluster-devel@redhat.com, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nilfs@vger.kernel.org Subject: [PATCH 1/7] mm: don't look at xarray value entries in split_huge_pages_in_file Date: Sat, 21 Jan 2023 07:57:49 +0100 Message-Id: <20230121065755.1140136-2-hch@lst.de> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230121065755.1140136-1-hch@lst.de> References: <20230121065755.1140136-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Queue-Id: BA1D2A0011 X-Stat-Signature: xwhbfc4qgghd3y4uzjtinuhjcxoi1jsf X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1674284286-312994 X-HE-Meta: U2FsdGVkX1/pkocdquIbsPzKUQPT9fzi9KFZzjancBPTIOIonbHoxNyYbTy5V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gted8Yz1Th1UCH7tra8U/pVeCR0TtM6Kkfb9sNFGfgnv3o4zHf5pva0kz5KKF6CiBpo+TUiwywTBes5NgXO5aVfF0dZASZ7aKAyYCwI87gx3ZqZYgGKf7VhuIDz+GAd6ZNqgdVsurIrDt4kG4SfBdwFY/88wZ062rIsbv8qM76gD8ehWjO9asRO9bPpvPXPC0gq7EyE3C23UC2HrhfAK42B4tW3BGo16DI+YpsMNrIfYQdKrjasknjo+0lxoq1oVoNA47T9V0HI7M7kZt/x+MAJr5P2rFg/4KV8oqUVKVDUZ6IQuHeu4Aq6ww4K5MbY19HUg1uLTTyXklB3ALO/8LaaO6NT1ZUe/BeO4Xp5DZBwZc8dn7LioWBlLEqAn72DD6NDi36bEv2UJ4 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: split_huge_pages_in_file never wants to do anything with the special value enties. Switch to using filemap_get_folio to not even see them. Signed-off-by: Christoph Hellwig Reviewed-by: Matthew Wilcox (Oracle) --- mm/huge_memory.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 1d6977dc6b31ba..a2830019aaa017 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -3100,11 +3100,10 @@ static int split_huge_pages_in_file(const char *file_path, pgoff_t off_start, mapping = candidate->f_mapping; for (index = off_start; index < off_end; index += nr_pages) { - struct folio *folio = __filemap_get_folio(mapping, index, - FGP_ENTRY, 0); + struct folio *folio = filemap_get_folio(mapping, index); nr_pages = 1; - if (xa_is_value(folio) || !folio) + if (!folio) continue; if (!folio_test_large(folio))