From patchwork Tue Feb 27 17:42:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13574212 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 94D38C54798 for ; Tue, 27 Feb 2024 17:43:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4AB566B0105; Tue, 27 Feb 2024 12:43:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id ED3F86B0108; Tue, 27 Feb 2024 12:43:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 840806B00FE; Tue, 27 Feb 2024 12:43:06 -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 086066B00FE for ; Tue, 27 Feb 2024 12:43:06 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 88909140AC8 for ; Tue, 27 Feb 2024 17:43:05 +0000 (UTC) X-FDA: 81838304730.19.6B63AE4 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf06.hostedemail.com (Postfix) with ESMTP id 036C818001F for ; Tue, 27 Feb 2024 17:43:03 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Z2r+qljn; 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=1709055784; 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=Py6+s19ldATppZRQG9f/uEiEQuQwyRI9PUiiL1ghTdQ=; b=eLtg2NMrzLgXOdeT3fxvEomjQ7Q3wSFTjhHOoy6Vn1W9JR1i0b5rcW+IN65J9G6gQMHr+U OX3NijFbctlbQtpG+l6c9l99/WkCLoInJq5oJY326XqIYT7Cf/kZi00lCtTbn5y0RFGaNN SYG9F6D/Wal+efolR5mljcvyb/+Ndhw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709055784; a=rsa-sha256; cv=none; b=kNM03ZlFs4KBx3KMiCSrJKaiT4wvqnv2Jy+5/iqF74rQIvx+piPspMzkiSTOSY5shJI+T+ TSR5rR6bgFGqh4HmHbotCIwi4yIGmLfE5Iw8lBHBv8KuWvrGYGIZ754QJUzNXg/JnKXjQ9 ndXXpy4tcq6RyLWxKejIcbJD0mUjCGs= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Z2r+qljn; 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 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=Py6+s19ldATppZRQG9f/uEiEQuQwyRI9PUiiL1ghTdQ=; b=Z2r+qljnJGeWWGMNsO6CycXZNe ahhEPG2WD7F4Nm6OUMGayGiLJCSl26yrgnH9t2HjgwTVvssfXKkDkGdIwudYriGXGWeKbNIvBk3g7 ZTZsu5adl+mP7QYgeTUo4cTcXuE/A98xtkx+Q0sytXcpHjZXNYLqcNGDpLll8MIBD9k7GFzzkcJlw 1NdUflVllPnyWVG0yYtiUWI8Nps6Pp01cq+o1Bkdg+S0xt/Su/7hlpRMu8DiA5YVsojg+gvGezMbj Na/xNIZcHtBz3W+JKcFCsybbu3ne7yLr2Ezwul/ktMnuCt7ej5tuTMqpBBbBxABfC7qnOxtydRH+1 e7zXtpww==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rf1Tn-00000002yrx-1rLP; Tue, 27 Feb 2024 17:42:59 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, Ryan Roberts Subject: [PATCH v3 14/18] mm: Remove free_unref_page_list() Date: Tue, 27 Feb 2024 17:42:48 +0000 Message-ID: <20240227174254.710559-15-willy@infradead.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240227174254.710559-1-willy@infradead.org> References: <20240227174254.710559-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 036C818001F X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: kcdjtrz9hfwgioxqkgs77xjzjynypsr8 X-HE-Tag: 1709055783-707896 X-HE-Meta: U2FsdGVkX19dGv8IPmxRKc115kkoCQJGjIMXR0LBET9ypAyhVjEVM9TPQIJk6EgFJIITJtRAOb4zLgj47B387HaWjZ8VsQyw/Gm+LLkUGUZeij2DgtADZLUfxDKk4behOvbWh2SP93vJFHwv7bGy1vCX4WZoA6Y7hmXZO3BQ7v1qdgvN4ssdKpgut2SoJ017YP+pv2ofsZdaOjhVeyaegYPtsPB7cFiwQWbweF3APMhA2ZUZ/xuy9l1ghUabUBHjQ+ysipCwxGFKggF5nlUytZ+kyVWFeqFZCELBPXwQzrXWeyocO3ey2Du8yDOB3f7d7qrLtYuRnCn9U066qrtYqwoLiFMEZWe+Q7vML19mhHUL8qNvnRb65pCfB0t7wlnwExNP31NRc7E6vjrKYl5lI/85j+gxQs9EsiYAbCL7sWhhNQ8wrDX6VQ634uRglLTUSWvr1mwXjXEhDrEElRqzetb4WRy2mIC6dLzDAEZw5uuRc2bEj3im40sN4+enWZg7VNMy9Uvox7r6811S58d+u8Hz5ZV/r4fXcQLNwtdXST8VHqYua17rCoQLVxld3TeLvj9r4iGFqWWGyqgIqpgJJ4n8efXOzq6xQCWxf5BS1MY3E17Mzee1y7vws3UQRZE+QxLfC8Q8rgJjgh4FEhG1SDBlJaUEpDRjABZWboRFTFSGV479LJ9UZBzE+8j2ZOKPU0Z/yHQw8Dt3Eq7/4wdEVEvG/DEeiaXr8s4O4nqybP/kJB9KQ7EAAG5qELIkadVB8FLvOImtNKRkVnhZ78lBwSNmFgCo9eEWz0WNRoBOXH5xoOUEW57h10qocf1Fxxilqi4mjZ5NsBGVaHutjiDVt3wcFQNJB9ZdurZCtSpW2gr00L/h55ckSjfLjZICEeC3LyLgtaZ9e5ToCVau+fuoV4YWECZUlIjO 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 3ca7e9d45b33..cc91830f6eae 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -454,7 +454,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 aa7026d81d07..01b60769726e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2641,24 +2641,6 @@ void free_unref_folios(struct folio_batch *folios) folio_batch_reinit(folios); } -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<