From patchwork Fri Aug 25 13:59:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13365805 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 0BCF0C3DA6F for ; Fri, 25 Aug 2023 13:59:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1EDB42800C4; Fri, 25 Aug 2023 09:59:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 97E452800C2; Fri, 25 Aug 2023 09:59:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE48F8E0017; Fri, 25 Aug 2023 09:59:27 -0400 (EDT) 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 A96C32800C8 for ; Fri, 25 Aug 2023 09:59:27 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 8A5C3806F5 for ; Fri, 25 Aug 2023 13:59:27 +0000 (UTC) X-FDA: 81162784374.30.115A762 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf12.hostedemail.com (Postfix) with ESMTP id D086F40003 for ; Fri, 25 Aug 2023 13:59:25 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="PpiVS/4D"; spf=none (imf12.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=1692971966; 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=7uQnZSGn1BFpbxl4yWPTOmGkXbYPGr0+sIYyneFBp5k=; b=yob3gqnPpQewGOQMHmAuXfbZ76v405yozQbcsP4vlBJQvBwnlKcp/R/is+bSq5jC/oovJ6 VAgSh71HRHAFrB7NY1e/+WzJB46BAPrBOVV6HFW7EqZZu7aZ0/1UOCRBQZcGLi90twQeD9 XGQiuqFt+mlmNFT+/MevEJtD+dq4/II= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692971966; a=rsa-sha256; cv=none; b=WxLkKdtZCtiOhcG5B0w1BCJVgQey+G4stBMvERuatMWB9KiN+925cQSHgASkX+qsQqy+P9 w7lKpdgRUeSeCw+zeyHve2dKMxkUhYWvDQt8q36NqvxiavRfi15aHvvRZ8xFWYHY9UXT5+ pWAmlQ/q952Keo8bbYb9ugGWK/FIg7E= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="PpiVS/4D"; spf=none (imf12.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=7uQnZSGn1BFpbxl4yWPTOmGkXbYPGr0+sIYyneFBp5k=; b=PpiVS/4DF2byb7Wyv1fIX3IB4a kzbnO4OH91GwXh4in4Cp3BG6iHKQdw+gkNGN24I1y4iRkB11eNiOG4hBxzF/R1Yu3ZWV7VHJGryxR H/KhyaFwFsaW1SvZ8a/RJ7Fu+nuE4t16jXetnnoXeeZxx08TrdzuSAUgZSypZ2L+iL8e77U3w7Rh0 m8xh2mWgb4kY15fOtN+xNhmmq9s4p3ilhyEugPvXZvIe5EpYdaj/wC8RKfkxwTcnu8RfeSH3XuKC8 VEh0vMyjN71+FDzuLGkbnTrxBEFmucCQD3Vho+wf/h7qCpzIPq6PumcwKbSmiIVMlXEpvdkoPB8qq 2hYGeSmw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qZXLO-00HTRZ-Is; Fri, 25 Aug 2023 13:59:22 +0000 From: "Matthew Wilcox (Oracle)" To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" Subject: [RFC PATCH 14/14] mm: Remove free_unref_page_list() Date: Fri, 25 Aug 2023 14:59:18 +0100 Message-Id: <20230825135918.4164671-15-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230825135918.4164671-1-willy@infradead.org> References: <20230825135918.4164671-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: D086F40003 X-Rspam-User: X-Stat-Signature: 8yn31x1ah1dwizweqi3hkmq5f3f4acf3 X-Rspamd-Server: rspam03 X-HE-Tag: 1692971965-717278 X-HE-Meta: U2FsdGVkX19H2S0pgaaUzi+mS6qesJFPoquhhUABTDrNEq2bK3MYUuO5hpERhMQ2PNXQykK3ZE/HSDuvkcgW4rOI8m48e0iUmtx7cCSR+pr85ULKGRpO3D8b63dm0YhWHcsNCVz4rsH+Pqve99J44uPiXok2Gs70ifrABcjLwh2X/c68Md3uR3pjBsq8avfeSVTAULAMQEooHzUQhFW8bbOO05e6ktFUaMRM4+EQoFwusObOMewv/SGoK2Ew2N72DeX104QEY4RSjzxE5y1q4RSr2cyM6DTml9vbJi+n6bcrTpqSvAiLQLaMg5SvmpzjkggTjvy456Yu0FPV+XUGnaxMaWs0eknXtkYz0SW1TSkeAG/td4nCQipBO1tUBf1CvBCkcTtc+AEWkHl1uT/pzd0NnkwWgg7Nz2F7pNTmr6JaGPj09VJA4+AGHm3r1W4yRTEfjImbUXHP3O5jrR3aOt3alUNC7SvlgR2BBRIcD7nrmPJERnhYep9HKdPphqlxy94PqXNF1hgJhrF37MaF2QEqvwqpyc1Z3p+/z9GrGpAApps8zH5G5trCrFIeg+THyI4efgvqn81fvBtQg5HQz04qsni9qV8GE08IO62xqyQUX43tKyyshBsZvCddccthoxbKbSjHx411+Sh/SjiNZjznxjz4j3LJqdljJgfGSLx4mjuybJHfldu8NANp0tlchNNr0nVh8chgti41RWHgeUhSLh+MwafNla16j0GteYlIl4enbE5qhR/JT6paGG92xyJWZFyCA11/oobtNmNLlSYTofn0qCMXQM49tOLiDznn+hzN2GmeA/xytkVKCd/c4p6XbckwuHCZpktoQifsOJqxl27df/Egx+bTW/OKW9oI+FM54YIVmSAcCbkOSXMwJ9eZwZ039y9pd5Mpp91FbBxUPCPdPfwTgt2guCmmjUDzacFsYWsC2h/w3TN6S1cYoUfoEVZdPc+CWDxAe/Z Nvm7Tiyo mGUwNb+oomdoBl95/dzwZ2tHNrF/lj/2eoNlgVSlsppnYjkH7D5OXyCL5Tctwlffm8RCxEJq5i4cCM9DltqJn3uXMvBIt8xuobpGdAizii2mdwT2nxrLQ1gI58wLJjz7g6aC6vc69o0nLFy/jsjKSWcXRFEMRXYT6vzjS/jtriCOoi0L9Qb9XP4XweUVu8fdJmKqNKlmu+8QObd2/MXga3yGiCP+ztsSyNNOd 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: 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 5c6a53371aeb..42feb3f59ee5 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -443,7 +443,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 e586d17fb7f2..496304014ec0 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2554,24 +2554,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<