From patchwork Mon Dec 11 16:22:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13487531 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 3AF27C10F05 for ; Mon, 11 Dec 2023 16:22:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5523C6B0089; Mon, 11 Dec 2023 11:22:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 504A56B00CE; Mon, 11 Dec 2023 11:22:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 355D36B00D8; Mon, 11 Dec 2023 11:22:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 1FCA66B0089 for ; Mon, 11 Dec 2023 11:22:26 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id EC4F31207A3 for ; Mon, 11 Dec 2023 16:22:25 +0000 (UTC) X-FDA: 81555055050.30.156FABF Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf23.hostedemail.com (Postfix) with ESMTP id 359E5140011 for ; Mon, 11 Dec 2023 16:22:23 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=sb+Qm9Wi; spf=none (imf23.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=1702311744; 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=le0USapLJTOUpisSmyaKwJhkSbvDdgs9+BngrNFfDug=; b=mj5E7NqKH56FA13btqT74vG0QjeBrrR4HRQZHF3K4nTngzs5zpnla5ipMyLHgQNaOyOtai iL4VpymweGIqsVvg+gRrHSFW2FntYVOr5CiIX3KMCHPJhfYiLaE4GZ97cCyERFCKpmXFN9 Qg0558lxuHt4TmB6xDB9j15w0ww0zOU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702311744; a=rsa-sha256; cv=none; b=lJHy4Mtmfqdlq4yaaB6A986kzC7tEEbiGct1U4OpaLbzddKXvmCpcUrZS22FQ3P/fdMR8e sDbD8XCjnb5mEcYltNAZkG74a/AdHbluArik0z6YTVBr1A+4dVgMDUxxQK6eSe9zy3x2ax Vq+5NzVuJjnOoVQdN2kSmgQCusj8lSY= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=sb+Qm9Wi; spf=none (imf23.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: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=le0USapLJTOUpisSmyaKwJhkSbvDdgs9+BngrNFfDug=; b=sb+Qm9Wic9anOrhNK2hJ7MBiCx 93Tcx3a3pUeMck4UFVlTVZ5OY81c6o2tKW72j8dO1IYYAGt8gfPt9OU+Z7Syi5asiCvNNTD+87+k9 ctoBPzyMPK4Ln/JNd+J+Cc6CETJEuVzsvfpVicfRS26GxD3aeDnhrGFUkXHOpWjAfTZmNYNRItRQ9 /YaiuKqpH6VlowASX3WCee/WVOlcy2zYTo24nH4l/P4pNwymkFaHlRz+qhPKf+8AsImtfsQOjQ20s b+XqH7b+RRuJ5/+NptEPs3SfHCNSEoV/1nnhvVZzwigrXJ1Ft2BeaLQhLWuhpqMdWU8zjm0W5JIiA AmQIdbSA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1rCj2u-0090JZ-Lb; Mon, 11 Dec 2023 16:22:16 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH 9/9] mm: Remove page_add_new_anon_rmap and lru_cache_add_inactive_or_unevictable Date: Mon, 11 Dec 2023 16:22:14 +0000 Message-Id: <20231211162214.2146080-10-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20231211162214.2146080-1-willy@infradead.org> References: <20231211162214.2146080-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 359E5140011 X-Rspam-User: X-Stat-Signature: rtersrz9xmbzu7j4yz7hokhgbbskjjtx X-Rspamd-Server: rspam03 X-HE-Tag: 1702311743-652976 X-HE-Meta: U2FsdGVkX18nDC+U+r8qCday671c/TcIOjz66MGSrPPKzOdX1WBVeD0Pa4w/wA+NKdbZXA9jNCZ64pyKbL683qjZoCWoQy8ysIGtrf7RMtyiiAsAWKoKJ/N91Csox63KxBgum1QJUVAlkUgXv0y8pcy5OHmb4LUsaH9PHujYrZRTMQWFFT6lzD6RbeprJ3n1f7DBnoU09ytAfI0sao+ToGaOl6QyQG9BsZsy1EXGTguZhUUdYf4Bx3Fe3X5Kq0E4qpf4s9mlmQS/SB9fovzZ8UBub7+RTxlIm23HejK5Q2Chb0QVs05VTktpZ3s5P5wD+LK83QubJxDcSwRPZNc/PQqEpV9vt0H2J72thWW10jHJY9UBZDv3qsIqS/fK3IqDEepKID2i3wf8Ww/plJlBwjvZkBgnpzgBXxv7bKGUanyJTnuKsYhx5Gpo14mBd2TVa5ZTWCWVFq5VI3Y8Ud1qojSfRyT3f8uFz6Ua5vvdzJ+gJPaM1xv0cY+niUkUsYU/8doWLARD1+cC8qEBv0aZIO5XGLqDmZuI4nLr5nyXXFTsW5CW7ORrX8wDNjdvBEMolgbbOXqREF5Irx6XDGsvjSXB81i8MlJAoC6A7wmhjH8+8n8Tkb0hGJHCU8xZYn2Pb6zbKBalU6HE4ItUsLc7XwgOgH5VdKj/hWQqB3SBo5yd7PDif6HeafIY7CR6TrBFk0naY/F0OToNQulVboGvaUWSAGez7TbDyI5dT6GhZ13EQmxbWLn4L9PNchPxYUXZ89RnR1YIJSaMRX4Ng+N59rCnrmT7mwM/pXgt37i9bqeTIPSdpxPfXWhNz47+nGXQuHiG0wIDj5hy7QzOtt6qdS9GF1C6nZsS/ozz9Ffq7ftqp+4BTSLCz02LGFsylrNbcu48I9nKK5Wnz/puD/8/qh6BXYGWiug9Pnm2LH2NJ7vu8aul4CYW9lipCZ2KCaPoNJOiK4aKUcdzlKxrA3T HDhyYQWP Q1VdS5jqvPkXLbsx4P2Bokcx4oxqHdDUbngpAjbb5gS1VLfOfagTDWjp3MAc8KYMjSv3D+/pOohoS+SA4RHgdIqltwK2zId+VuaCak3UczaudlYhnouJJnTydhkK+y7pqVRMUkwtLX8DhVbckM0XSnL5lTgJJHVcVkU3s6Vn6znVu7rUjswF7RNsNEDPTxcrJqJdYKowxK8aUnwT21pz/sxVVSisI3Q7USVbK 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: All callers have now been converted to folio_add_new_anon_rmap() and folio_add_lru_vma() so we can remove the wrapper. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand --- include/linux/rmap.h | 2 -- include/linux/swap.h | 3 --- mm/folio-compat.c | 16 ---------------- 3 files changed, 21 deletions(-) diff --git a/include/linux/rmap.h b/include/linux/rmap.h index af6a32b6f3e7..0ae2bb0e77f5 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -197,8 +197,6 @@ typedef int __bitwise rmap_t; void folio_move_anon_rmap(struct folio *, struct vm_area_struct *); void page_add_anon_rmap(struct page *, struct vm_area_struct *, unsigned long address, rmap_t flags); -void page_add_new_anon_rmap(struct page *, struct vm_area_struct *, - unsigned long address); void folio_add_new_anon_rmap(struct folio *, struct vm_area_struct *, unsigned long address); void page_add_file_rmap(struct page *, struct vm_area_struct *, diff --git a/include/linux/swap.h b/include/linux/swap.h index 4f25b1237364..edc0f2c8ce01 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -397,9 +397,6 @@ void folio_deactivate(struct folio *folio); void folio_mark_lazyfree(struct folio *folio); extern void swap_setup(void); -extern void lru_cache_add_inactive_or_unevictable(struct page *page, - struct vm_area_struct *vma); - /* linux/mm/vmscan.c */ extern unsigned long zone_reclaimable_pages(struct zone *zone); extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, diff --git a/mm/folio-compat.c b/mm/folio-compat.c index aee3b9a16828..50412014f16f 100644 --- a/mm/folio-compat.c +++ b/mm/folio-compat.c @@ -77,12 +77,6 @@ bool redirty_page_for_writepage(struct writeback_control *wbc, } EXPORT_SYMBOL(redirty_page_for_writepage); -void lru_cache_add_inactive_or_unevictable(struct page *page, - struct vm_area_struct *vma) -{ - folio_add_lru_vma(page_folio(page), vma); -} - int add_to_page_cache_lru(struct page *page, struct address_space *mapping, pgoff_t index, gfp_t gfp) { @@ -122,13 +116,3 @@ void putback_lru_page(struct page *page) { folio_putback_lru(page_folio(page)); } - -#ifdef CONFIG_MMU -void page_add_new_anon_rmap(struct page *page, struct vm_area_struct *vma, - unsigned long address) -{ - VM_BUG_ON_PAGE(PageTail(page), page); - - return folio_add_new_anon_rmap((struct folio *)page, vma, address); -} -#endif