From: Qi Zheng <zhengqi.arch@bytedance.com>
To: David Hildenbrand <david@redhat.com>, Jason Gunthorpe <jgg@ziepe.ca>
Cc: akpm@linux-foundation.org, tglx@linutronix.de,
hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com,
kirill.shutemov@linux.intel.com, mika.penttila@nextfour.com,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, songmuchun@bytedance.com
Subject: Re: [PATCH v2 0/9] Free user PTE page table pages
Date: Thu, 16 Sep 2021 16:41:57 +0800 [thread overview]
Message-ID: <a8b3c8b1-43da-d2ad-505b-46ca7624238f@bytedance.com> (raw)
In-Reply-To: <b7514329-7ae4-b78e-a4f1-4208c9cfe802@redhat.com>
On 9/16/21 4:30 PM, David Hildenbrand wrote:
> On 16.09.21 07:32, Qi Zheng wrote:
>>
>>
>> On 9/15/21 10:59 PM, Jason Gunthorpe wrote:
>>> On Wed, Sep 15, 2021 at 10:52:40PM +0800, Qi Zheng wrote:
>>>> I am going to split this patch series as follows:
>>>>
>>>> 1. Introduce the new dummy APIs, which is an empty implementation.
>>>> But I will explain its semantics.
>>>> 2. Merge #6, #7 and #8, and call these dummy APIs in any necessary
>>>> location, and split some special cases into single patches,
>>>> such as
>>>> pagefault and gup, etc. So that we can explain in more detail the
>>>> concurrency in these cases. For example, we don't need to hold any
>>>> pte_refcount in the fast path in gup on the x86_64 platform.
>>>> Because
>>>> the PTE page can't be freed after the local CPU interrupt is
>>>> closed
>>>> in the fast path in gup.
>>>> 3. Introduce CONFIG_FREE_USER_PTE and implement these empty dummy APIs.
>>>> 4. Add a description document.
>>>>
>>>> And I try to add a function that combines pte_offset_map() and
>>>> pte_try_get(). Maybe the func name is pte_try_map() recommended by
>>>> Jason, or keep the pte_offset_map() unchanged?
>>>
>>> It is part of the transformation, add a
>>> pte_try_map()/pte_undo_try_map() and replace all the pte_offset_map()
>>> callsites that can use the new API with it. The idea was that try_map
>>> would incorporate the pmd_trans_unstable/etc mess so searching for
>>> trans_unstable is a good place to start finding candidates. Some are
>>> simple, some are tricky.
>>
>> Yes, I will search pte_offset_map()/pmd_trans_unstable/etc, and then
>> analyze the specific situation.
>
> Maybe propose the new API first, before doing the actual implementation.
> Might safe you from doing some additional back-and-forth
> work eventually.
>
OK, I prepare to propose all the dummy APIs in the step 1.
Thanks,
Qi
>
prev parent reply other threads:[~2021-09-16 8:42 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-19 3:18 Qi Zheng
2021-08-19 3:18 ` [PATCH v2 1/9] mm: introduce pmd_install() helper Qi Zheng
2021-08-24 16:26 ` David Hildenbrand
2021-08-25 16:20 ` Qi Zheng
2021-08-25 16:32 ` David Hildenbrand
2021-08-26 3:04 ` Qi Zheng
2021-08-19 3:18 ` [PATCH v2 2/9] mm: remove redundant smp_wmb() Qi Zheng
2021-08-19 3:18 ` [PATCH v2 3/9] mm: rework the parameter of lock_page_or_retry() Qi Zheng
2021-08-19 3:18 ` [PATCH v2 4/9] mm: move pte_alloc{,_map,_map_lock}() to a separate file Qi Zheng
2021-08-19 3:18 ` [PATCH v2 5/9] mm: pte_refcount infrastructure Qi Zheng
2021-08-19 3:18 ` [PATCH v2 6/9] mm: free user PTE page table pages Qi Zheng
2021-08-19 7:01 ` David Hildenbrand
2021-08-19 10:18 ` [External] " Qi Zheng
2021-09-01 13:53 ` Jason Gunthorpe
2021-09-01 13:57 ` David Hildenbrand
2021-09-01 15:32 ` Jason Gunthorpe
2021-09-01 16:13 ` David Hildenbrand
2021-09-01 16:16 ` Jason Gunthorpe
2021-09-01 16:19 ` David Hildenbrand
2021-09-01 17:10 ` Jason Gunthorpe
2021-09-01 17:49 ` David Hildenbrand
2021-09-01 17:55 ` Jason Gunthorpe
2021-09-01 17:58 ` David Hildenbrand
2021-09-01 18:09 ` Jason Gunthorpe
2021-09-01 18:10 ` David Hildenbrand
2021-09-02 7:04 ` Qi Zheng
2021-09-02 6:53 ` Qi Zheng
2021-08-19 3:18 ` [PATCH v2 7/9] mm: add THP support for pte_ref Qi Zheng
2021-08-19 3:18 ` [PATCH v2 8/9] mm: free PTE page table by using rcu mechanism Qi Zheng
2021-08-19 3:18 ` [PATCH v2 9/9] mm: use mmu_gather to free PTE page table Qi Zheng
2021-09-01 12:32 ` [PATCH v2 0/9] Free user PTE page table pages David Hildenbrand
2021-09-01 16:07 ` Jason Gunthorpe
2021-09-01 16:10 ` David Hildenbrand
2021-09-02 3:37 ` Qi Zheng
2021-09-15 14:52 ` Qi Zheng
2021-09-15 14:59 ` Jason Gunthorpe
2021-09-16 5:32 ` Qi Zheng
2021-09-16 8:30 ` David Hildenbrand
2021-09-16 8:41 ` Qi Zheng [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=a8b3c8b1-43da-d2ad-505b-46ca7624238f@bytedance.com \
--to=zhengqi.arch@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=jgg@ziepe.ca \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mika.penttila@nextfour.com \
--cc=songmuchun@bytedance.com \
--cc=tglx@linutronix.de \
--cc=vdavydov.dev@gmail.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