From patchwork Sat Mar 2 07:00:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13579440 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 DE88AC5478C for ; Sat, 2 Mar 2024 07:00:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E43776B009E; Sat, 2 Mar 2024 02:00:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DF3AD6B009F; Sat, 2 Mar 2024 02:00:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C961C6B00A0; Sat, 2 Mar 2024 02:00:45 -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 B595B6B009E for ; Sat, 2 Mar 2024 02:00:45 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 45716140642 for ; Sat, 2 Mar 2024 07:00:45 +0000 (UTC) X-FDA: 81851201250.16.C9463D7 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf17.hostedemail.com (Postfix) with ESMTP id EB4B140018 for ; Sat, 2 Mar 2024 07:00:43 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="aSK7/eXM"; dmarc=none; spf=none (imf17.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709362844; 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:references:dkim-signature; bh=0O6IHACEDS8EwS7UOLiXsGddraiDlH+UtFNDZPeiZHM=; b=5nhyCUlJZwMgoHusg9NDRpgogGZLs2QohjHKEN9E2Fspi2+hIvrdEp0cAYZX8KBjkeQvJI wJdpefuPlv+Ps06p9G1CJpxqUX/qNYpI1veNhNtFIYK3/SJjGrxjhzi/nh6JptQjQkqyuU tbAEbT2XoXVTBFo6XpW2HN2ZzGRg3yM= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="aSK7/eXM"; dmarc=none; spf=none (imf17.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709362844; a=rsa-sha256; cv=none; b=rjikv3Gd+/mRzm/fcqY/5r4t1M5ItkxScTeJMtgtxQv57mvx6VS3AwyrE+0Yt5bHvgX6fn AxHVwlClaxgq8OrVvQQKZ9km9tcmbxKSmUiHu19ulb/xhQ9+uWa6inbabdpjJOYIFfVDJb haG2Per1m+6lhqodDgBJqAjbJU+YZMI= 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=0O6IHACEDS8EwS7UOLiXsGddraiDlH+UtFNDZPeiZHM=; b=aSK7/eXMhd7uo91Td7AiHNZF0B 28SXCRJK6TgX6g6JZnSgw05lxOHoTLJFSo8dJWaKYJlROa25cMVNDaoIC1ceCwrgfcgO6ExBEtwrA lyGHLEhMjJ2EozRvVrCggeYQHqREw5xjkMrVYeDc5DOpikBlbvMQpv8F8ZhxvvAzpuNY+A7Hs4GfY ic9D0u4nDHr01cXrjqbX8pkTAFyYZYmpQ4I6pnQMjFfdabnXzgmyCWnkwPrHiJcWcJAk/VWWe9PzO K53fhSc+5sqYiR3HaZoLQzZHaCNkppq9y236wbuIJ1EuK2GZ37iPpCeKC2rqSCoS68kVMECLJmewq JcfsGEvg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rgJMH-0000000D2fc-15XQ; Sat, 02 Mar 2024 07:00:33 +0000 From: "Matthew Wilcox (Oracle)" To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" , Kent Overstreet Subject: [PATCH 0/4] Clean up __folio_put() Date: Sat, 2 Mar 2024 07:00:26 +0000 Message-ID: <20240302070031.3108523-1-willy@infradead.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Rspamd-Queue-Id: EB4B140018 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: h6ah1hte3imnsypiu5uomib3cse7kz4t X-HE-Tag: 1709362843-189190 X-HE-Meta: U2FsdGVkX19Sdu9BuYDEEmJxqILfOBWiZJrjkRW8Wy4P9pSDoYpXbG97jqXgBpwPgkUWzSVTmTVdhuZy83mrrjYKHY6Czta2DtMBPaZTl5mnZ4Xa8AJ3clJphn1bkyaf+1d3Gqb1bU5HSkygpKbUHEMLwhBxp/IwAn6k0DEO45tczTYYIv7Lz6Y/RcjKzKvzA9vLbjNNaep433Op+ynw0C9LIDmfvlpXmOX58R3zL5r7a/3pQcR1+L5k+ijnBkmuC82v5KeXYo8o8gXqaevZhbW3HGaJ34e9u7EcvFzOhbGvNFHqkb6J6pg0Vl7k21lMt4veQaokfR+1xLF0m2rBTRiskMGww2v76E+p9Tmjli71AxbbuaMIP8yJnUFVRGEwROZrzfAe9K0roMWOhVwnbfkbytwMGx5p/QhZyfVJrDq+xj7JlNWRSdCifRV1uNglJPJwqDtfaTcaFCXYtZQM5sn/J6tfH0SdXnhiaiDzRB5/npHYeU+uUSHqyLsznNqsi6wFn6D4OeCJyKmt322YKZ6tkXen441IpbJw3khjisbUkyB0ZDTygtTl++T32w0PF3HiQ9tR7P0OAv0oEg0Zd4amqAhsXxC42zKxXAKhWc4x8rC5dd5tRUwYLB4ArSDCAvxLNcSLXaJJgHOEA1RA6yK6qgUCZUBWikN14PYwD0nHs+LOH9u7oSiAtbhr8BY7I+9ePkFwG0s/+qc/mVo6d1nztLycosxxpsOqz2/4JGuBzkHTzjCw/Jd9gtCx1haiDRW0+Tefi7v0qy+ZERG88nzMVB/rmEIvQQ/j//5cYGtehPbQW+P6SMAAWMjUz+PUgTfXQfvhmmZceALfRcqk7YGo5v57xsuhZPH6c8k2DaWiB6vIhO+p6MQBgqNyteiG/HwQzIMhpqzcAKcmiAzwseixdsY46tVs X-Bogosity: Ham, tests=bogofilter, spamicity=0.000091, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: With all the changes over the last few years, __folio_put_small and __folio_put_large have become almost identical to each other ... except you can't tell because they're spread over two files. Rearrange it all so that you can tell, and then inline them both into __folio_put(). Matthew Wilcox (Oracle) (4): mm/swap: Free non-hugetlb large folios in a batch page_alloc: Combine free_the_page() and free_unref_page() page_alloc: Inline destroy_large_folio() into __folio_put_large() swap: Combine __folio_put_small, __folio_put_large and __folio_put include/linux/mm.h | 2 -- mm/page_alloc.c | 37 ++++++++++--------------------------- mm/swap.c | 41 ++++++++++++++--------------------------- 3 files changed, 24 insertions(+), 56 deletions(-)