[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b7514329-7ae4-b78e-a4f1-4208c9cfe802@redhat.com>
Date: Thu, 16 Sep 2021 10:30:21 +0200
From: David Hildenbrand <david@...hat.com>
To: Qi Zheng <zhengqi.arch@...edance.com>,
Jason Gunthorpe <jgg@...pe.ca>
Cc: akpm@...ux-foundation.org, tglx@...utronix.de, hannes@...xchg.org,
mhocko@...nel.org, vdavydov.dev@...il.com,
kirill.shutemov@...ux.intel.com, mika.penttila@...tfour.com,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, songmuchun@...edance.com
Subject: Re: [PATCH v2 0/9] Free user PTE page table pages
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.
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists