linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yang Shi <shy828301@gmail.com>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	 Matthew Wilcox <willy@infradead.org>,
	David Hildenbrand <david@redhat.com>,
	Peter Xu <peterx@redhat.com>,
	 linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm: delete the unused put_pages_list()
Date: Mon, 28 Oct 2024 11:37:46 -0700	[thread overview]
Message-ID: <CAHbLzkq+0GPckUWXZ0-DLkOhVv7JyuKfdUbXWGVEn5fcBfGmHQ@mail.gmail.com> (raw)
In-Reply-To: <d9985d6a-293e-176b-e63d-82fdfd28c139@google.com>

On Sun, Oct 27, 2024 at 1:15 PM Hugh Dickins <hughd@google.com> wrote:
>
> 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 <hughd@google.com>

Reviewed-by: Yang Shi <shy828301@gmail.com>

> ---
>  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)
> --
> 2.35.3


      parent reply	other threads:[~2024-10-28 18:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-27 20:14 Hugh Dickins
2024-10-28 14:24 ` Peter Xu
2024-10-28 14:28 ` David Hildenbrand
2024-10-28 18:37 ` Yang Shi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHbLzkq+0GPckUWXZ0-DLkOhVv7JyuKfdUbXWGVEn5fcBfGmHQ@mail.gmail.com \
    --to=shy828301@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=peterx@redhat.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox