From patchwork Thu Jul 20 13:01:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Zhang X-Patchwork-Id: 13320492 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 F0FE0EB64DC for ; Thu, 20 Jul 2023 13:02:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 86EAC280101; Thu, 20 Jul 2023 09:02:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 81EDF28004C; Thu, 20 Jul 2023 09:02:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 70DAB280101; Thu, 20 Jul 2023 09:02:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 5D94028004C for ; Thu, 20 Jul 2023 09:02:42 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 20ED3A01B9 for ; Thu, 20 Jul 2023 13:02:42 +0000 (UTC) X-FDA: 81032004564.09.EB130DD Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf16.hostedemail.com (Postfix) with ESMTP id 8435018014A for ; Thu, 20 Jul 2023 13:02:22 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf16.hostedemail.com: domain of zhangpeng362@huawei.com designates 45.249.212.189 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=1689858145; 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=9PY8njO5DSi8k+SB8O6dOlaiqpN/8wMiu35LlGxYziw=; b=B5WKxzVpEp3+68sgCwFEClMzkwqGLcrjaA/jZh1QR1znbelVi+mm9I/XL9NWqrQ/EyC5sK Jgvdy/T/dBDov/zlxscGsGNMGc1IUPEaiCEv5+1IcySJXrmW5CXW5xaZif5FnO0082zqOQ mlJ9W43DFdnO0ksbslhprNSjZwLTghs= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf16.hostedemail.com: domain of zhangpeng362@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=zhangpeng362@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689858145; a=rsa-sha256; cv=none; b=UiQjM14gv3x/RUtbqvvHGPeNfK8TggN1girGiLik1DQkt2DW2x1kPemf/YIscZb7eFY8xj CCVZ5p+5OHBiuzgOY42fZLBktcSnLTJiiY5368LfrM8FojJQ7OJvnH3iFZdL/Y1lv5z98O TFCzb8K6lS0KTac69yn+zv4bJKaJisk= Received: from kwepemm600020.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4R6CSy0jrtzLnts; Thu, 20 Jul 2023 20:59:46 +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; Thu, 20 Jul 2023 21:02:14 +0800 From: Peng Zhang To: , , CC: , , , , , ZhangPeng Subject: [PATCH v3 00/10] Convert several functions in page_io.c to use a folio Date: Thu, 20 Jul 2023 21:01:37 +0800 Message-ID: <20230720130147.4071649-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-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 8435018014A X-Stat-Signature: py7orjk3641quc648xnizhxy1wgp3zms X-Rspam-User: X-HE-Tag: 1689858142-747326 X-HE-Meta: U2FsdGVkX1/KlxBvU5ZrSwvTyU35Cxa82xoSPr2jq1JOtI5SpBv2AN2ELeeQ4S+ZfGfNv935pp2Z10/RMxtfGi40NdvfV69gaHb7HD/i4nlkL/a2/GVzCTVlO7oxMLwzYMq8NXxp2SieVv+pmOcG3BWSGIvDmFuWbARO2I5DAlFxVZTgkc1ytXu+bSZTxME+wLX/q+0zgRKHmQ4unDhff6fwqtNPrc1g4rjC5rO7q4YmCFmwgGTLM/88fMRqHQmSktQmOmr4UC9Sg8scW/uymciJFYHf1kr4qJSceFbVYJwbm+mApOXcGnUl5telAaAW9fb+2Xw3aVl8W7QEaKTjHgljGKk82xIW4g3xnAP97iyfEEcpCbIE+UNR8KENHrv+80+fRqhXRFANTX0azDNCNg2No0a9yPaZUiuBqvlZt8P8/Dam3KVAARdfn5AzEtB8ogMfQV3/TGWiOrcGfXa+rFpBlwvV4o6I5pMbyD+0oyjUXqI0R24IDkicaBt9xhtWCHfTZSWyTsx8T1NnVZB3ddeD7liDrWrUpjgqwtzu06qqE2rRUN+vBBMyno6fhC200+ntTQbpb11pPybLm0upgKl3nU4/Kxwjjh1E1F9NNOJuyP8FBXMeRThJEFEdB8xdtqqUBqfp0nTWT+e6BKXKJQLq89uqMAFXH6Bv4eo26R5+R+kogoi+UKGc28bn3U1sv9bcanPMH4rtUk340olhx4Iz8OL4PB4RiFY57WvDv/eb4tAcpK1Me8gNh6PfoHrzH5YQphLZd4XFMWNSM5mqLWbTcxRyGdzDeALTLwEeAde0YrWh2/yUAgQ6+p11Tv8nR9X//sJUMbku3DnvEJZAklgL2qHxVw6ir2dFDkIw/yuXKkBFptCv16esaiinIGRFN4o1G6qKovL3mHWCBEYTJ0h5fu2XYIVVFL3oIcqSrBhXVrJR9LwYWH5qU26Jj5G1ZmrDWOIvBUOWEL9Dyzb Ez3bDkf7 bc6FxJ2h1qWm7+F8349YfWszeuQWuz6zNb5Qq1Ka/uzu1Z0qfu1QpdvTA6byJ77KtlJa6P4Eze/7sUq3xgE4zvZrVKcpqbbojjIh0mbDBbK1f4jQxcBNK9J0Aq1heDeNuIXEl5Ud42BjN7mlSPNHB9/ztCjAPUyq2o74U4cuAzAO52NxHRmYNVALmr3fOEuSth486 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: v3: - introduce bio_first_folio_all(), rather than replacing bio_first_page_all() per Matthew (patch 3) - use a folio in __end_swap_bio_write() (patch 4) - remove unneeded ifdefs per Matthew (patch 9) v2: - remove unneeded ClearPageUptodate() and SetPageError(), suggested by Matthew Wilcox - convert bio_first_page_all() to bio_first_folio_all() - convert PageTransHuge to folio_test_pmd_mappable per Matthew Wilcox ZhangPeng (10): mm/page_io: remove unneeded ClearPageUptodate() mm/page_io: remove unneeded SetPageError() mm/page_io: introduce bio_first_folio_all() mm/page_io: use a folio in __end_swap_bio_write() 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 | 1 + include/linux/bio.h | 5 +++ mm/page_io.c | 63 +++++++++++++++------------------ 3 files changed, 35 insertions(+), 34 deletions(-)