From patchwork Fri Apr 5 15:32:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13619218 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 CAFC3CD11C2 for ; Fri, 5 Apr 2024 15:32:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1BACE6B0082; Fri, 5 Apr 2024 11:32:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 143956B009A; Fri, 5 Apr 2024 11:32:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E89C36B009C; Fri, 5 Apr 2024 11:32:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id C47AB6B0082 for ; Fri, 5 Apr 2024 11:32:51 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 8D5791A0479 for ; Fri, 5 Apr 2024 15:32:47 +0000 (UTC) X-FDA: 81975870774.14.0B95E43 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf20.hostedemail.com (Postfix) with ESMTP id E5B6D1C0016 for ; Fri, 5 Apr 2024 15:32:45 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Q1ExQ4+i; spf=none (imf20.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712331166; 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=rYoDqimi7YU7r5KfBSnGRYiZYar44dcdbm7fqhPDG7s=; b=mPx8VvMgIwWtjk+NFnltCQmVc0GsPirsRWju90uTdRMhXVRIsXUX6mB8n4NE8IhINDrpLs HnDQ86/+1MKZ+DBwLlJgB2i+6hnZXWLIs8VCVTunwuC7nvGQo+DQK/KbHeia4JlTVuHLJT hkuymHJLwTPdQdbNIl4Rw1+VxzXLnqc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712331166; a=rsa-sha256; cv=none; b=Y5N7boP4nZJl5aryceTlyrP70A9RG/v+ojG7G4Z2uNGlV0vrYUOEenD88Dy48EZG/1aSv5 Zynu89wArSa8gRSivwnVbejhv6VztEPV4cmm3uIbrfrTLUs+z1KFAyUbv9yqzdMa5b+fEF WZ1AvZ1XspJMCJkd2q4lUPx0/YvBWZs= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Q1ExQ4+i; spf=none (imf20.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none 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=rYoDqimi7YU7r5KfBSnGRYiZYar44dcdbm7fqhPDG7s=; b=Q1ExQ4+ilfRcdeXe5zCqdepl/k c1QMJjbfsPnA0HAWgVzYegB/IlcddXi437vErcHY/J1gQkrX3cWw+Ac+3B2pnywB1JZojISKZS8AQ ep9fJYsDJNIfzIf/BnrAHXgnz5M6pMwYlUPA92EqmvULK5py9gX4qkN6Njh2p2/wB6yvvKbRDFw8D DVeBE+6c52ohWGs1Z2CW4b8J626nC0S9g9Sjg5/WkQnlRxwnQuZ3ZhkR7Ae1pQc4G6iFvh4/sBNck CxdGfUNtjECLxkMBwZC14HOz87Qv279eebFToy7aC7A6IX+IqZVX+L7z6Vr7Zko7uheB3H4kmB3DQ WDajj6YQ==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rslYL-0000000Akx9-3zCZ; Fri, 05 Apr 2024 15:32:29 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH 0/5] Clean up __folio_put() Date: Fri, 5 Apr 2024 16:32:22 +0100 Message-ID: <20240405153228.2563754-1-willy@infradead.org> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-Stat-Signature: 4ii9w4phu7rpgc8mez3gsik8y97a1mkk X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: E5B6D1C0016 X-Rspam-User: X-HE-Tag: 1712331165-652790 X-HE-Meta: U2FsdGVkX1+RMbL0RkIV4wjSxHrAh58t7X9PjDAmQR4mkDWDH2GWK1D0mjB1yLZ/Ju20vpr3wZQIuJtpEdupcycqkY2ynLPN9QEQ9/1UWQXupYvRCuaGMLHfXcqCniZTu+DiZZ+ed4SOsEFWB+Xk9nPH88/zkLEwe7DjWuHP96dzbc92vC97Kn7hf2hoDKD5HT6jtR5ddWIZANk6v/+g4kXWhbW8I4EqKVX+oLW2G5qfaqeHaFKaz+BpUXdN/P7puGYFfrTTyuB1C2MYwiG0Qivw49xudrRMAuHIEdOR34WJVIM3nDPoacaiJO5fNTn96P6PLjfkiLHJHhBsBH0BLgRSGtTeELlYcio2Gru0ENq3G1oeAE/1b7dkFghvH23tpR+nAFD6rLyi9QnYO8rfAZ1VjPyoJDyEbWCkfKtCZ54v20A7Az0JEmiOHaf2VOp7mzqKdDTXQO+g5Pub6ki99lO/wsUycySQnQPos/HB9cKbMVFMGHFLIzwy09fJq+W9+qcMfU3C05ZdVc1Lzmd9HjEp4WmTqUN+/qjB/bRoYpWGoc2MHHjn2S0Ljy9oiXBdDc+ZAge1ERSAZHsqyqhGix33eRO63gyFVfFOYSc3cHmxz36F1XxnYg6e1ymcNR3S6CXXBCetPPrkA1JRvsQ5yfmWV+3XT9FWEmWCssqx36W5ELeBcBKv977y6vCmKGbGpjYHpZkuvwEbXmnZYmnItRVJ917iaEzXqwt9wfqeEv/jWTXJMlBaUze3aJSDGrZXZGA/2m3NBmE2o4fbiFDhpLybrf3hKkb5RMCgwxX8XPY8ZRDWzEoDTTlcXhplyVaCTwi5uQ124gBZR0sqQrx7YdK7XeBfxzvS7tSKV+swPlpwH99KBuFV70h4XxPb9tIUXHvGC1hAWSY9KsgJC0Ru2F7N3khFZtwyJ1qoWBv4TeuRcRoe93Sn4tk5JoSQr2re2dIX+UrWay8v137O0Ni P0C32pd/ d136BqsgKVctI064edDB77UOIOlyO3jyJLfsE9uN/9DrzRmX+0bNZG+7k0xFSwrleNeI3I1oVfgx9Xi+n9VKBbGueRzoRojaJw2yte3bnczlYrfbWwN8ZedeTCrMUxaRfvIChP5kKEpy/kl2Z6MKLbgHUQl649BzT5RDG 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: 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) (5): mm: Free non-hugetlb large folios in a batch mm: Combine free_the_page() and free_unref_page() mm: Inline destroy_large_folio() into __folio_put_large() mm: Combine __folio_put_small, __folio_put_large and __folio_put mm: Convert free_zone_device_page to free_zone_device_folio include/linux/mm.h | 2 -- mm/internal.h | 2 +- mm/memremap.c | 30 ++++++++++++++++-------------- mm/page_alloc.c | 37 ++++++++++--------------------------- mm/swap.c | 44 ++++++++++++++++---------------------------- 5 files changed, 43 insertions(+), 72 deletions(-)