From: Mike Kravetz <mike.kravetz@oracle.com>
To: Muchun Song <songmuchun@bytedance.com>
Cc: muchun.song@linux.dev, akpm@linux-foundation.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: hugetlb_vmemmap: remove redundant list_del()
Date: Thu, 27 Oct 2022 11:53:11 -0700 [thread overview]
Message-ID: <Y1rTl/1lgpKwVE8T@monkey> (raw)
In-Reply-To: <20221027033641.66709-1-songmuchun@bytedance.com>
On 10/27/22 11:36, Muchun Song wrote:
> The ->lru field will be assigned to a new value in __free_page().
> So it is unnecessary to delete it from the @list. Just remove it
> to simplify the code.
>
> Signed-off-by: Muchun Song <songmuchun@bytedance.com>
> ---
> mm/hugetlb_vmemmap.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Thanks,
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
--
Mike Kravetz
>
> diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c
> index 20f414c0379f..c98805d5b815 100644
> --- a/mm/hugetlb_vmemmap.c
> +++ b/mm/hugetlb_vmemmap.c
> @@ -231,10 +231,8 @@ static void free_vmemmap_page_list(struct list_head *list)
> {
> struct page *page, *next;
>
> - list_for_each_entry_safe(page, next, list, lru) {
> - list_del(&page->lru);
> + list_for_each_entry_safe(page, next, list, lru)
> free_vmemmap_page(page);
> - }
> }
>
> static void vmemmap_remap_pte(pte_t *pte, unsigned long addr,
> --
> 2.11.0
>
prev parent reply other threads:[~2022-10-27 18:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 3:36 Muchun Song
2022-10-27 18:53 ` Mike Kravetz [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=Y1rTl/1lgpKwVE8T@monkey \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=songmuchun@bytedance.com \
/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