[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5e148194-58c2-89c2-2cd8-9f2086f1e090@nvidia.com>
Date: Thu, 3 Sep 2020 10:31:44 -0700
From: Ralph Campbell <rcampbell@...dia.com>
To: Catalin Marinas <catalin.marinas@....com>,
Anshuman Khandual <anshuman.khandual@....com>
CC: <linux-mm@...ck.org>, <linux-arm-kernel@...ts.infradead.org>,
<will@...nel.org>, <akpm@...ux-foundation.org>,
Mark Rutland <mark.rutland@....com>,
Marc Zyngier <maz@...nel.org>,
Suzuki Poulose <suzuki.poulose@....com>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] arm64/mm: Change THP helpers to comply with generic
MM semantics
On 9/3/20 9:56 AM, Catalin Marinas wrote:
> On Mon, Aug 17, 2020 at 02:49:43PM +0530, Anshuman Khandual wrote:
>> pmd_present() and pmd_trans_huge() are expected to behave in the following
>> manner during various phases of a given PMD. It is derived from a previous
>> detailed discussion on this topic [1] and present THP documentation [2].
>>
>> pmd_present(pmd):
>>
>> - Returns true if pmd refers to system RAM with a valid pmd_page(pmd)
>> - Returns false if pmd does not refer to system RAM - Invalid pmd_page(pmd)
>
> The second bullet doesn't make much sense. If you have a pmd mapping of
> some I/O memory, pmd_present() still returns true (as does
> pte_present()).
>
>> diff --git a/arch/arm64/include/asm/pgtable-prot.h b/arch/arm64/include/asm/pgtable-prot.h
>> index 4d867c6446c4..28792fdd9627 100644
>> --- a/arch/arm64/include/asm/pgtable-prot.h
>> +++ b/arch/arm64/include/asm/pgtable-prot.h
>> @@ -19,6 +19,13 @@
>> #define PTE_DEVMAP (_AT(pteval_t, 1) << 57)
>> #define PTE_PROT_NONE (_AT(pteval_t, 1) << 58) /* only when !PTE_VALID */
>>
>> +/*
>> + * This help indicate that the entry is present i.e pmd_page()
>
> Nit: add another . after i.e
Another nit: "This help indicate" => "This helper indicates"
Maybe I should look at the series more. :-)
Powered by blists - more mailing lists