[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f6f0646d-7acc-0e2e-9aea-3910a5546dd3@huawei.com>
Date: Thu, 21 Apr 2022 14:27:07 +0800
From: Tong Tiangen <tongtiangen@...wei.com>
To: Anshuman Khandual <anshuman.khandual@....com>,
Pasha Tatashin <pasha.tatashin@...een.com>
CC: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Catalin Marinas" <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
"Paul Walmsley" <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
LKML <linux-kernel@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
<linux-riscv@...ts.infradead.org>,
Kefeng Wang <wangkefeng.wang@...wei.com>,
Guohanjun <guohanjun@...wei.com>
Subject: Re: [PATCH -next v4 1/4] mm: page_table_check: move
pxx_user_accessible_page into x86
在 2022/4/21 11:44, Anshuman Khandual 写道:
>
>
> On 4/21/22 08:35, Tong Tiangen wrote:
>>
>>
>> 在 2022/4/21 0:44, Pasha Tatashin 写道:
>>> On Wed, Apr 20, 2022 at 2:45 AM Tong Tiangen <tongtiangen@...wei.com> wrote:
>>>>
>>>>
>>>>
>>>> 在 2022/4/19 17:29, Anshuman Khandual 写道:
>>>>>
>>>>>
>>>>> On 4/18/22 09:14, Tong Tiangen wrote:
>>>>>> --- a/mm/page_table_check.c
>>>>>> +++ b/mm/page_table_check.c
>>>>>> @@ -10,6 +10,14 @@
>>>>>> #undef pr_fmt
>>>>>> #define pr_fmt(fmt) "page_table_check: " fmt
>>>>>>
>>>>>> +#ifndef PMD_PAGE_SIZE
>>>>>> +#define PMD_PAGE_SIZE PMD_SIZE
>>>>>> +#endif
>>>>>> +
>>>>>> +#ifndef PUD_PAGE_SIZE
>>>>>> +#define PUD_PAGE_SIZE PUD_SIZE
>>>>>> +#endif
>>>>>
>>>>> Why cannot PMD_SIZE/PUD_SIZE be used on every platform instead ? What is the
>>>>> need for using PUD_PAGE_SIZE/PMD_PAGE_SIZE ? Are they different on x86 ?
>>>>> .
>>>>
>>>> Hi, Pasha:
>>>> I checked the definitions of PMD_SIZE/PUD_SIZE and
>>>> PUD_PAGE_SIZE/PMD_PAGE_SIZE in x86 architecture and their use outside
>>>> the architecture(eg: in mm/, all used PMD_SIZE/PUD_SIZE), Would it be
>>>> better to use a unified PMD_SIZE/PUD_SIZE here?
>>>
>>> Hi Tong,
>>>
>>> Yes, it makes sense to use PMD_SIZE/PUD_SIZE instead of
>>> PUD_PAGE_SIZE/PMD_PAGE_SIZE in page_table_check to be inline with the
>>> rest of the mm/
>>>
>>> Pasha
>>>
>> Hi Pasha and Anshuman:
>>
>> OK, Functional correctness is not affected here, i plan to optimize this point after this patchset is merged.
>
> As page table check is now being proposed to be supported on multiple platforms i.e
> arm64, riscv besides just x86, it should not have any architecture specific macros
> or functions. Hence please do generalize these PMD/PUD sizes in this series itself.
> .
OK, will resend.
Thank you.
Tong.
Powered by blists - more mailing lists