From patchwork Wed Jul 19 09:58:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Zhang X-Patchwork-Id: 13318700 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 3BF0CC001B0 for ; Wed, 19 Jul 2023 09:59:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B6A5028003D; Wed, 19 Jul 2023 05:59:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B1565280045; Wed, 19 Jul 2023 05:59:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 85780280046; Wed, 19 Jul 2023 05:59:03 -0400 (EDT) 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 7381328003D for ; Wed, 19 Jul 2023 05:59:03 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 3618712025A for ; Wed, 19 Jul 2023 09:59:03 +0000 (UTC) X-FDA: 81027912966.09.93D2FA9 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf21.hostedemail.com (Postfix) with ESMTP id E5D3B1C000D for ; Wed, 19 Jul 2023 09:59:00 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf21.hostedemail.com: domain of zhangpeng362@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=zhangpeng362@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689760741; 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: references; bh=jsvLKxOx8Uh/+CuaUoeZ2OcTItbqLN4RUBF6nnA74rU=; b=msPJI9gOE2k0T9GdltXcL/0xEWJJE3X4hvk7eSXAMibCX1txX6cfzx4yyNKjTBHUGz/Vs0 XX4TIrlsDL89xL8H4WH/KhXRrLG4r+vn1rPrdHDKjzDQ3H4fHKG0cRuu9OlPs1hYAA1T7q 1+/hZ0YcFMk93yR8r5TmXj0078LLC/s= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf21.hostedemail.com: domain of zhangpeng362@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=zhangpeng362@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689760741; a=rsa-sha256; cv=none; b=lrA4BjU3Jf0mqwAvuYUkR6Wq+/sg30bbWBZQDMBWdZS5MGOf5z/v+D4ByVk27vcThgwU2i crf36WTNKpPuGrmc9RevXrnV7UMBLjP4LdSpLW7cv7wk2798lqGjjXO215p+zujwe9IxeG vvzm7tF+BhWdFUGhadz7b5g6NzzR2OQ= Received: from kwepemm600020.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4R5WQt2mKTzNmS6; Wed, 19 Jul 2023 17:55:34 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by kwepemm600020.china.huawei.com (7.193.23.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 19 Jul 2023 17:58:53 +0800 From: Peng Zhang To: , , CC: , , , , ZhangPeng Subject: [PATCH v2 0/9] Convert several functions in page_io.c to use a folio Date: Wed, 19 Jul 2023 17:58:39 +0800 Message-ID: <20230719095848.3422629-1-zhangpeng362@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600020.china.huawei.com (7.193.23.147) X-CFilter-Loop: Reflected X-Rspam-User: X-Stat-Signature: 43wqqncmtu1b8i4fhspges95ajx3czfb X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: E5D3B1C000D X-HE-Tag: 1689760740-153140 X-HE-Meta: U2FsdGVkX1/0lQASsxxefmd0x9TMOy8N84FbTsZGYVCpaHAMbcC66zNEcaS2dOdH7j7rikJnz+MAq4ULJZzSJdPEZ/BnLydyp3D9QjwxYeQLtN7PrFzwlYv8RypXKvvoMx5H0d7yzlGeUh7HJCmZH7Ba513PmKWnl5CmOJtS5y5Kv5rOOl1r14k0F9HHR41fea/fiommKWy4Tc9xO5DEy/fzgW1qQOgXB6gxgbIoc+VnuoYSWb31rDCk2cdKCrrCbmkStIFkHfMnkT1OeKnOv8kCWTPkLNf63YoThLHlinP07SftqfGu9/Zg17QqZQzkVopYujaIMFGOpqi4qVNr/lwpxbVO+lw/GbGIYbc9mRtK3yCUJCJsecVNcPzMpqEl63SCgJEZOdtNF2QFRoxpPZdYidNECzbibDt+4DPxA4bggPNQUwcuHDL1ZOc+gbpLhxjStanhz5XNYCSUgskiYQP5XU1d/U62hiBPrJ+Vf2pke910++pnDvQPqSbdZ5yFk260+rzsjVUEhcDU1GWXwpEwtds5I3n/Txo9EsT8AFeIM/EK5ymTtmKVY7DsgNppzskZrNbJlAj2A/vuuxI4I31F0RiBha6czMPXGP1filOeQ3Vuluyq2az5daNlVDNhRSmp/OH/noZK23SwOFUzxDtyuFw9ReTIwMxlYZufh+aa3RR11G8Mvz2kPM2BVSrsqs5s/Klq1pygbFbQDaXpU76qi1mSs2rbeoL393yEKojgd/HaMIS8UE1OxaY2sqc3yeYZNwJcVN6YnLS/L39tuNoY3L60oLhldNJExhCZdBSSUy5aYmqYfZa9F+YbOvq6cVDpHYI0RabPCKzcbuFLRrGLjvSOXEAysAss3J4AHrufFQH0OlMobILRJYrbZ5xii+xJfIAlzAxR7rCwMVXHQ5DuJJ6TzW39KPzs4RyJHKtEy5Hvq+8MYTXjpKKc8tAfIcyK2pBdlx3MZjATB/J CnjMZKwN zdtCh3Nt2z/pdANYbRTqX9Gr9ip+gQTLPXrJ7mpzkS4pZM2a+dL1LEe+V4Kgu+UrBlUD/LRohnrnk8ImWQwy4XsHejKXT7HsE24FuTybCNP3tHMO4KswHibEstu3o1SKheypdnKoG/wKbwu3NqN5MqI+DSSM/beeUpXFnfjrCRl/xyWs46UHPEMfnZAzHkL39xKTd 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: From: ZhangPeng This patch series converts several functions in page_io.c to use a folio, which can remove several implicit calls to compound_head(). Changelog: v2: - remove unneeded ClearPageUptodate() and SetPageError(), suggested by Matthew Wilcox - convert bio_first_page_all() to bio_first_folio_all(), suggested by Matthew Wilcox - convert PageTransHuge to folio_test_pmd_mappable per Matthew Wilcox ZhangPeng (9): mm/page_io: remove unneeded ClearPageUptodate() mm/page_io: remove unneeded SetPageError() mm/page_io: convert bio_first_page_all() to bio_first_folio_all() mm/page_io: use a folio in __end_swap_bio_read() mm/page_io: use a folio in sio_read_complete() mm/page_io: use a folio in swap_writepage_bdev_sync() mm/page_io: use a folio in swap_writepage_bdev_async() mm/page_io: convert count_swpout_vm_event() to take in a folio mm/page_io: convert bio_associate_blkg_from_page() to take in a folio Documentation/block/biovecs.rst | 2 +- drivers/block/drbd/drbd_bitmap.c | 2 +- fs/f2fs/data.c | 2 +- include/linux/bio.h | 4 +-- kernel/power/swap.c | 2 +- mm/page_io.c | 55 +++++++++++++++----------------- 6 files changed, 32 insertions(+), 35 deletions(-)