From: Muchun Song <muchun.song@linux.dev>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Muchun Song <songmuchun@bytedance.com>,
Mike Kravetz <mike.kravetz@oracle.com>,
Linux Memory Management List <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: hugetlb_vmemmap: fix a race between vmemmap pmd split
Date: Sat, 8 Jul 2023 09:40:30 +0800 [thread overview]
Message-ID: <07A5567A-8BED-40DB-88F4-96C37DCD78BF@linux.dev> (raw)
In-Reply-To: <20230707124116.d7be4ba6504a452d11e2629d@linux-foundation.org>
> On Jul 8, 2023, at 03:41, Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Fri, 7 Jul 2023 11:38:59 +0800 Muchun Song <songmuchun@bytedance.com> wrote:
>
>> And inline __split_vmemmap_huge_pmd()
>> since it only has one user.
>
> "open code" would be a better term than "inline" in this situation.
>
> If we are to offer this change to -stable then it would be better to do
> the open-coding of __split_vmemmap_huge_pmd() in a separate, later
> patch.
>
I see. Bug fix is better to "open code" instead of "inline". However, it
is a simpler and cleaner way to fix this bug by using "inline". Because
we must hold init_mm.page_table_lock to get the page table page in __split_vmemmap_huge_pmd(), then it is just a couple of duplicated
code from split_vmemmap_huge_pmd(). Consequently, split_vmemmap_huge_pmd()
is redundant, just remove it. And rename __split_vmemmap_huge_pmd()
to split_vmemmap_huge_pmd(). The result is the same as the "inline" way.
So I keep "inline" to fix this.
Thanks.
next prev parent reply other threads:[~2023-07-08 1:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-07 3:38 Muchun Song
2023-07-07 19:38 ` Andrew Morton
2023-07-08 1:42 ` Muchun Song
2023-07-09 0:46 ` Andrew Morton
2023-07-07 19:41 ` Andrew Morton
2023-07-08 1:40 ` Muchun Song [this message]
2023-08-14 22:28 ` Mike Kravetz
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=07A5567A-8BED-40DB-88F4-96C37DCD78BF@linux.dev \
--to=muchun.song@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--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