From: Muchun Song <songmuchun@bytedance.com>
To: Barry Song <21cnbao@gmail.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Oscar Salvador <osalvador@suse.de>,
Michal Hocko <mhocko@suse.com>,
Barry Song <song.bao.hua@hisilicon.com>,
David Hildenbrand <david@redhat.com>,
Chen Huang <chenhuang5@huawei.com>,
"Bodeddula, Balasubramaniam" <bodeddub@amazon.com>,
Jonathan Corbet <corbet@lwn.net>,
Matthew Wilcox <willy@infradead.org>,
Xiongchun duan <duanxiongchun@bytedance.com>,
fam.zheng@bytedance.com, Muchun Song <smuchun@gmail.com>,
Qi Zheng <zhengqi.arch@bytedance.com>,
linux-doc@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Linux-MM <linux-mm@kvack.org>
Subject: Re: [PATCH RESEND v2 3/4] mm: sparsemem: use page table lock to protect kernel pmd operations
Date: Sat, 18 Sep 2021 18:51:07 +0800 [thread overview]
Message-ID: <CAMZfGtW1_U2d=zQFCYBEDfKWB=EkoYTGgVcCHauX-iv4VD7U8Q@mail.gmail.com> (raw)
In-Reply-To: <CAGsJ_4yWZTcRqnBmLrYJ3Z1Yo_7oWRgR4B3qK5m570xgpeJ-5Q@mail.gmail.com>
On Sat, Sep 18, 2021 at 1:07 PM Barry Song <21cnbao@gmail.com> wrote:
>
> On Sat, Sep 18, 2021 at 12:09 AM Muchun Song <songmuchun@bytedance.com> wrote:
> >
> > The init_mm.page_table_lock is used to protect kernel page tables, we
> > can use it to serialize splitting vmemmap PMD mappings instead of mmap
> > write lock, which can increase the concurrency of vmemmap_remap_free().
> >
>
> Curious what is the actual benefit we get in user scenarios from this patch,
> 1. we set bootargs to reserve hugetlb statically
> 2. we "echo" some figures to sys or proc.
>
> In other words, Who is going to care about this concurrency?
Actually, It increase the concurrency between allocations of
HugeTLB pages. But it is not my first consideration. There are
a lot of users of mmap read lock of init_mm. The mmap write
lock is holding through vmemmap_remap_free(), I want to make
it does not affect other users of mmap read lock.
I suppose a lot of developers are trying to avoid using mmap write
lock. I am also one of them.
> Can we have some details on this to put in the commit log?
For sure. Those judgments above should be placed in the
commit log.
Thanks.
next prev parent reply other threads:[~2021-09-18 10:51 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 3:48 [PATCH RESEND v2 0/4] Free the 2nd vmemmap page associated with each HugeTLB page Muchun Song
2021-09-17 3:48 ` [PATCH RESEND v2 1/4] mm: hugetlb: free " Muchun Song
2021-09-18 4:38 ` Barry Song
2021-09-18 10:06 ` Muchun Song
2021-09-21 6:43 ` Muchun Song
2021-09-21 10:22 ` Muchun Song
2021-09-21 0:11 ` Barry Song
2021-09-21 13:46 ` Muchun Song
2021-09-21 20:43 ` Barry Song
2021-09-22 2:38 ` Muchun Song
2021-09-22 7:36 ` Barry Song
2021-09-17 3:48 ` [PATCH RESEND v2 2/4] mm: hugetlb: replace hugetlb_free_vmemmap_enabled with a static_key Muchun Song
2021-09-18 4:55 ` Barry Song
2021-09-18 10:30 ` Muchun Song
2021-09-18 11:14 ` Barry Song
2021-09-18 11:47 ` Muchun Song
2021-09-18 12:27 ` Barry Song
2021-09-17 3:48 ` [PATCH RESEND v2 3/4] mm: sparsemem: use page table lock to protect kernel pmd operations Muchun Song
2021-09-18 5:06 ` Barry Song
2021-09-18 10:51 ` Muchun Song [this message]
2021-09-18 11:01 ` Barry Song
2021-09-17 3:48 ` [PATCH RESEND v2 4/4] selftests: vm: add a hugetlb test case Muchun Song
2021-09-18 5:20 ` Barry Song
2021-09-20 14:26 ` Muchun Song
2021-09-21 0:28 ` Barry Song
2021-09-21 13:18 ` Muchun Song
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='CAMZfGtW1_U2d=zQFCYBEDfKWB=EkoYTGgVcCHauX-iv4VD7U8Q@mail.gmail.com' \
--to=songmuchun@bytedance.com \
--cc=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bodeddub@amazon.com \
--cc=chenhuang5@huawei.com \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=duanxiongchun@bytedance.com \
--cc=fam.zheng@bytedance.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=mike.kravetz@oracle.com \
--cc=osalvador@suse.de \
--cc=smuchun@gmail.com \
--cc=song.bao.hua@hisilicon.com \
--cc=willy@infradead.org \
--cc=zhengqi.arch@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;
as well as URLs for NNTP newsgroup(s).