From patchwork Sat Feb 17 02:25:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13561205 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 6C519C48260 for ; Sat, 17 Feb 2024 02:26:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C30346B009D; Fri, 16 Feb 2024 21:25:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6B27B6B0098; Fri, 16 Feb 2024 21:25:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4480E6B00A2; Fri, 16 Feb 2024 21:25:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 173236B009D for ; Fri, 16 Feb 2024 21:25:54 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id CB4DA40133 for ; Sat, 17 Feb 2024 02:25:53 +0000 (UTC) X-FDA: 81799705386.10.7694202 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf06.hostedemail.com (Postfix) with ESMTP id 0ED7E180009 for ; Sat, 17 Feb 2024 02:25:50 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=pAFEJ5ZX; spf=none (imf06.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=1708136752; 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=N0E9uz7bGt4jDkC/SlTskrxduZu41qZA+MkWZ6jP464=; b=GsC4kMcNLBAFQ1Vhc7w/vNJSw3lDHNBD2rY79VNRclwA4glPNoDGyGmmVn7zyKC4U3qLbI 3pRIvfsYmNkI0mjq5/Z1mSCWhlRbMNxsLOsk6wM+A/yOBByWef11iL3u3V0oLqtmb+Si8B TOb30XtcWX1PryUMAqdYe1S0h1MR3k0= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=pAFEJ5ZX; spf=none (imf06.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708136752; a=rsa-sha256; cv=none; b=55zvHFAZcuTrw30Nz8IeKzyrOx5WH4FUSGZyKk3gyygXcdZ15oIZr2vYhQ6L7OlnEcnYuA iQZ0rD/l/MJ7uxoohmav0EfjWFuhscVK98Eaygbe7J1hPF5kVnAs3Do/ab/KTSS5C1NP8y 3KHKamaCiP5TnOIeLvfJL7we6iTgDUs= 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=N0E9uz7bGt4jDkC/SlTskrxduZu41qZA+MkWZ6jP464=; b=pAFEJ5ZX3JLkNV5iscOBpMUqh2 9+jssXkC/noCrYPp8FQdAngEaHGcdPOSZRluE8GlPxlprCpKil2iQvm0nGLqfzjF2HApqo2LBfDPo GmhR9sKVKkKztzDLGzHsr+D2GiOwCw0xdfiwotuxGAmAvqgWklsqN8OdSVu65DMMMkDPiLnjCUKeB zBOm2oIL0bK5ZwvEQyMX5YpjzOpUVtjjS1Pgqfo5iJO0LW3gMQd+r1ULJHU8arMW4aUFJJCoh7DfP d87ZQU5N6/4bzWgri1p3Qm7Inb12N8MZ1+0K2wCR8AW5hpYwGKuCOjzVyeCkA4rJJFacnEWpWlymX CZBglKXQ==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rbAOj-00000006HDz-2ZDw; Sat, 17 Feb 2024 02:25:49 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, Ryan Roberts Subject: [PATCH v2 14/18] mm: Remove free_unref_page_list() Date: Sat, 17 Feb 2024 02:25:40 +0000 Message-ID: <20240217022546.1496101-15-willy@infradead.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240217022546.1496101-1-willy@infradead.org> References: <20240217022546.1496101-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 0ED7E180009 X-Rspam-User: X-Stat-Signature: 8a4cdcx1k1d9ir5zxno17ij5qhgu7sng X-Rspamd-Server: rspam01 X-HE-Tag: 1708136750-656048 X-HE-Meta: U2FsdGVkX1+X/MdWPnMPTMcbuTRYiNJixWyGxraSrFHO6jw60MmVtbw516NXRoy3hpicstq2H9s3oINpsaz10yUhcSttTRHEtEx4K3b8gWv+7eLfS4qPUv2lXBN69NADS7JMB3BeO69eo7tvIny84T+b5proxVI3vcPgrq2lk7UVzpupE6pbXTXYRsmJr4P9xzyiJQiT8rg3bo5n8rprf3EcKVy6E0KTl41PONhxsM6egxZgZeoc5Wgk0Mp+TGX4wJ8ZAXRTV6H871nTfSWIX7tZIn1941Eo/tCkZMfpjY8aAgh5yPvXyfR60VIF5D5FFvhFI4fc3rFCty6pQy6bkx6AFRuym51SYsxKSxv3fCj2U4OYZOVROYdOQ/jdPtTSclY8HfTqHsYl9aafG/CQ7qpI908ikERkxqBsjfZtS3cvUuKpQOm9/uVKj36QhWxXjBs86KoujyycG1fIT1FEgELs5V/LnVsM+CDxr3pYfkpbZ+jhl9hZ8vmJI48cAteEjoIR7zj+LAJBlh4apVfVw7GqgGXhmkeL3FJzz0O5hhHQ4Kn9HntI8DLyDEnSqrYM2iwEfsqRlBq4mNZx6L4AgPOz/CVLRK0HKhjV7U4XQYuyJAUEb+btsaIOw/AKSw7NLRtrCP+OdIYCwqZZM+H5LB5n4YAzudXu65PMvIkn7GrxpAnZrZq4cMsUa6Jg64tH7bTuG7mfwWuwbRyNb+W3DGGT9HVsrlGU7v5dD6jaFdPPpidJu2xhuUt9CP8Soi/psz3ZAbT4H5PTU5SXLgXFnY98g9OJ13Ks1jOr4gWNXVV0Tr8zKWe02Rmn0N0OFNFXSyoHfZKoX2IaQqXQ24tq+3Rj3p0/zwRAePHV10O6lYIzvpkXYPAwDxCGe9GGq3M0ct4B3jixU1QjalElMJpzaIXCbhnQiSckZlqnJagN12PO7xa+ZjX/1nxL3+txAaSx3z0ZqhDWQb+MI+H5+QC RsEM1IxY GOeApI+zUzTSx3piz4VTKtQMmnoKpXaaaUdI8g7/orIyyZsQ2OUVKYIfb36uiaMO2U5lqWzdVYMpteHC5f8OEC5fFoKofZr77aQk7SsEEgBZjkMWge+OpxenCyQ8F3t2SfmpkVhsLIanMHHnUNSVneyqx52xgKaQX8fNiJ9GbmjxPXhsiXJ/vxYjD3yi4l1VsrZLbMXeRqqrE1XQBd3yl2KzmS+0wnbIYwaHPQoEZynThFYBuNIImqwhDpnZj01dcHJ+IhVUT7AJz8QfJK7xpMA9XYMXoM/MSXupv 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 now use free_unref_folios() so we can delete this function. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Ryan Roberts --- mm/internal.h | 1 - mm/page_alloc.c | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index 4d45b351e0fd..3e2b478c610f 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -451,7 +451,6 @@ extern int user_min_free_kbytes; void free_unref_page(struct page *page, unsigned int order); void free_unref_folios(struct folio_batch *fbatch); -void free_unref_page_list(struct list_head *list); extern void zone_pcp_reset(struct zone *zone); extern void zone_pcp_disable(struct zone *zone); diff --git a/mm/page_alloc.c b/mm/page_alloc.c index eca5b153f732..7600344b997e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2641,24 +2641,6 @@ void free_unref_folios(struct folio_batch *folios) folios->nr = 0; } -void free_unref_page_list(struct list_head *list) -{ - struct folio_batch fbatch; - - folio_batch_init(&fbatch); - while (!list_empty(list)) { - struct folio *folio = list_first_entry(list, struct folio, lru); - - list_del(&folio->lru); - if (folio_batch_add(&fbatch, folio) > 0) - continue; - free_unref_folios(&fbatch); - } - - if (fbatch.nr) - free_unref_folios(&fbatch); -} - /* * split_page takes a non-compound higher-order page, and splits it into * n (1<