From patchwork Sun Oct 27 20:14:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 13852734 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 20164D13582 for ; Sun, 27 Oct 2024 20:15:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8B7806B009C; Sun, 27 Oct 2024 16:15:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 868C66B009D; Sun, 27 Oct 2024 16:15:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 707F66B009E; Sun, 27 Oct 2024 16:15:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 5064E6B009C for ; Sun, 27 Oct 2024 16:15:27 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id CEBC380354 for ; Sun, 27 Oct 2024 20:15:07 +0000 (UTC) X-FDA: 82720486842.29.ADDE335 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by imf05.hostedemail.com (Postfix) with ESMTP id 8BB11100004 for ; Sun, 27 Oct 2024 20:14:42 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=O0r0Adab; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf05.hostedemail.com: domain of hughd@google.com designates 209.85.216.52 as permitted sender) smtp.mailfrom=hughd@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730059997; a=rsa-sha256; cv=none; b=UgF3rNjSe9yjYTvZ4hOMGYAFO6710bQPlf62JLTlvK1eSq0BbMfhgA/A+kpKvV6N178KQW uAki5ulOOKvKfDqC8UUJJzbPDJfNlwALjtpjO0o9sS4FC71AwFZhBYq5yT4C39EowPa5+E Q59ivJt1Uu4uyFK9DP+MlC+xh/udmZc= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=O0r0Adab; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf05.hostedemail.com: domain of hughd@google.com designates 209.85.216.52 as permitted sender) smtp.mailfrom=hughd@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730059997; 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-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=N4tEyw4MScQ6/1KM0T2xQJOWBYB6ifsf58BJRWfhinQ=; b=i7ICI5n4LQSGI095UsEYyqrkj46PI6E7UuG3f1/2lY7F83MJJLvfaj5VX57vdz4eDzhCdB 9TA9tgRr5/zxdgTQs7xpEqxY/BXK6yJYDNODfrXBNXNZ45WAQP0Ezy9WxKhIlyZNAVNHhn 3qgBwZQhCOE8uESkW/zsRTbqXvGv4zE= Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-2e2cc47f1d7so2411674a91.0 for ; Sun, 27 Oct 2024 13:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1730060124; x=1730664924; darn=kvack.org; h=mime-version:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=N4tEyw4MScQ6/1KM0T2xQJOWBYB6ifsf58BJRWfhinQ=; b=O0r0Adab0Cd/dWnfZUY0WBMgWgnjFg3E1pvUHmDLmN785Ugk4exiW9GYgwHGfYTJyB 62GxAClB4+B3C01mlAjQHajYi1AiRDbe9d/gu++cFyYbe2end3oi9j0DFAoDdGZMujoS d/DyTaC+oqa42mc/K8ENo0ii4k4sTMMa/m63o7wNvb1Hn+WQnCQwLT39pwomLV6mBo81 C7MH2VwcQVfmYoESLEyuqMEYU3MHwyVp/065V5wLJfCXdwXoAmbn6oiL8PnJcID4gVDz HbIjmOc1rEPm41NO4DsHAWsb/cxojEU6YzYu7rwqlCV6paurZ/NWhJ7upAyK4ww/sjLG 8nhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730060124; x=1730664924; h=mime-version:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=N4tEyw4MScQ6/1KM0T2xQJOWBYB6ifsf58BJRWfhinQ=; b=TCkZGuKTPBDYauLkrmGGkXkv5L/Spv4haLJ8LFsAAI9H3oXhwZWEHIl21SWz353Z9u M8tQdgmLhg1EohFtOseqRdbJVPRcr8i8yDka250QquLJN5USHmCkMcK0tMT3yjdany6x yed4MVk7jaIbcgKMnjaDrf34k7xtFQyecAColxIXYnRaVk9AKvEoNCqofhSgfMZjThIA HDSdQa5/VqtyfvaskIbqK9GucZIviMWuFlRD1nwJRZUMhOjobStdVUOyXjZ7K5vTXPJF K6WHfn/JO7sldmAR9sFFiLNdVExmUeG3wdyXM9S1hfnn0mt4dCUUAXX76HW41xZkcRQP 5F7w== X-Forwarded-Encrypted: i=1; AJvYcCX73O7JmpkPVx5t7SUQqwazadaUY9IqUKyJ6FcwspmhO5rBqnffX4Ctvl8t2n32Uft+SCfu0+mhZw==@kvack.org X-Gm-Message-State: AOJu0Yz2jGqwFDX0GZwKm00LsjsmnlW1bgfgYJ/UmQsGTSN3J8ZoWqF1 GOLpVNaKKP7wYbjzJkbDTpfJGWVvhBG5ZG+NXXuYC1i5SqItr8kk0fgnEzKrFw== X-Google-Smtp-Source: AGHT+IFuajBXTEjfZxgeX70hHYbqnSQ4RILHo5TwtobW0qjDHdOdgvn8GMN9BJnBmzaVyVwmXW8WhA== X-Received: by 2002:a17:90a:4d87:b0:2e0:7e80:2011 with SMTP id 98e67ed59e1d1-2e77e828515mr18864590a91.16.1730060123662; Sun, 27 Oct 2024 13:15:23 -0700 (PDT) Received: from darker.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e77e56f3f8sm7537828a91.40.2024.10.27.13.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2024 13:15:22 -0700 (PDT) Date: Sun, 27 Oct 2024 13:14:42 -0700 (PDT) From: Hugh Dickins To: Andrew Morton cc: Pasha Tatashin , Yang Shi , Matthew Wilcox , David Hildenbrand , Peter Xu , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH] mm: delete the unused put_pages_list() Message-ID: MIME-Version: 1.0 X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 8BB11100004 X-Stat-Signature: ewd6x65m6qbsib5gyfroz3ojg95y653c X-Rspam-User: X-HE-Tag: 1730060082-606075 X-HE-Meta: U2FsdGVkX19ovXkGz87dzB/6+wmwnxtEFYw+h+OSAFsS55gWfCbY2jRqZ2sNXsEf8Xg0SWUEZ4Mc/z22hLCwGkZOpa/RddY/XbfJY1Jl5js2k3nvEHf55vwgB+TXtLNooO0ZS/kDUCJ366Idy5aMVawHTgbOKWwQDr0SdF8jXOLj0F67I8lLkXUjdvCEk5EeQhtb0jIxqtVzG6IvbyRLMjzlRe0ycA+RpucAh8D4ZGxnjr2ssEdAGpkwoNcAMPmPye+NDsgUuapm8oab4Njv4LVO5e8poqAdCb/HINT5UIMufKTAfUPrAMs02vfgkGevCWIVPiBYoUbU/TgMv48xvZRrWdbtmz8yhx+WrcfbDPO29z08DP7EJxKhHoFb3wu8HKYRqffPM7pTyZwq6pXZhB3+FE26GrHKbPjCfKkPUYDxizfz48fwKTwh3CH7XIFaTeWc2W32SYtdAXyJ9wr0YMmm400dEtghokgI6s226sQ6pe09I60DqS9U1iPimKSlp2tClBBc6hPXkW8jBULrutqD+mCESATojJOpmyKU/HmWXRu99ciQiXgtO1UJPeNJceFMB0UBANX9XpSISs0IntHNKfNyHrSlrUwkZ5vKfDhPjmrSUGLbusUe8BwSAFSzoBqk1eoTM+UNASKeRBf3pf/Zjbm8dDZcef6M3xjL8UOP4966aYpTZHrqAaPW0sopZahV4qVLA/nBgVgmYQ8fr4x6Jc3zT6nSj5ECNuiFwBFcQbJdLkbtOC31vUZbODEiQv+fT/A4Z7sPE/ntvzA8NTm1lXTVyDX3zcYvkH5Xhb1VDb04pD/IFu274o5ta+qI5pJoo5XmOAXZOBr1xgdyO5bCHUll2vkXAPDCcp+VMGtQQSuuI0RvHRnb0pAKzf6iaTPOS4Xi5qeuUf882jPCVXJxqb4UMwRSztek8Ts26tfIIEyu47N0VH37A8eI48Ijx0Gqxr+OhLUMGIePWk/ QfHDJFk+ cC9/diXPaUnDKpdVtobH2EjjHRyykBzK9EEWNoZGYNeGAOGosVNUO0BEU6+WroLE5ftXMmiobB2yXdPmKeJ/NDLR68cbeVFBgzani1vxp05p/0n7LZQ9jgKWNOD8mmnfV0U6uX9SV3aP6YHz57T7jPQyBQ5m4iCDmXzSS92JhvAQC4OfPge7dC8YqcNQUSExjaN/egrnQoelbbQUpjv20M7UsO/4EVeBNsKpNoPG4EFnYInj5YMLC6zhxKA/3mMA74nDyzix56DQQBz3vtlY5v/uBCFvD2mYAImLMBfFIxc8WuYQLglyr80qhX+Pp3Uu2zzYzpJA+4JYXWgEZDGZHO8kIlEOfvAM9Joji/weKmLomKm4XVgEdPvj01j/C1av/GDRZGgH0OYnhlB0= 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: The last user of put_pages_list() converted away from it in 6.10 commit 06c375053cef ("iommu/vt-d: add wrapper functions for page allocations"): delete put_pages_list(). Signed-off-by: Hugh Dickins Acked-by: Peter Xu Acked-by: David Hildenbrand Reviewed-by: Yang Shi --- include/linux/mm.h | 2 -- mm/swap.c | 31 ------------------------------- 2 files changed, 33 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index ecf63d2b0582..8524bf86dd74 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1286,8 +1286,6 @@ static inline struct folio *virt_to_folio(const void *x) void __folio_put(struct folio *folio); -void put_pages_list(struct list_head *pages); - void split_page(struct page *page, unsigned int order); void folio_copy(struct folio *dst, struct folio *src); int folio_mc_copy(struct folio *dst, struct folio *src); diff --git a/mm/swap.c b/mm/swap.c index b8e3259ea2c4..638a3f001676 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -127,37 +127,6 @@ void __folio_put(struct folio *folio) } EXPORT_SYMBOL(__folio_put); -/** - * put_pages_list() - release a list of pages - * @pages: list of pages threaded on page->lru - * - * Release a list of pages which are strung together on page.lru. - */ -void put_pages_list(struct list_head *pages) -{ - struct folio_batch fbatch; - struct folio *folio, *next; - - folio_batch_init(&fbatch); - list_for_each_entry_safe(folio, next, pages, lru) { - if (!folio_put_testzero(folio)) - continue; - if (folio_test_hugetlb(folio)) { - free_huge_folio(folio); - continue; - } - /* LRU flag must be clear because it's passed using the lru */ - if (folio_batch_add(&fbatch, folio) > 0) - continue; - free_unref_folios(&fbatch); - } - - if (fbatch.nr) - free_unref_folios(&fbatch); - INIT_LIST_HEAD(pages); -} -EXPORT_SYMBOL(put_pages_list); - typedef void (*move_fn_t)(struct lruvec *lruvec, struct folio *folio); static void lru_add(struct lruvec *lruvec, struct folio *folio)