[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <2a54d607-6e46-3693-158b-5e8101010ce2@linux.vnet.ibm.com>
Date: Thu, 15 Jun 2017 15:06:49 +0530
From: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
To: "Kirill A. Shutemov" <kirill@...temov.name>
Cc: Will Deacon <will.deacon@....com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>,
Vineet Gupta <vgupta@...opsys.com>,
Russell King <linux@...linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>,
Ralf Baechle <ralf@...ux-mips.org>,
"David S. Miller" <davem@...emloft.net>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Andrea Arcangeli <aarcange@...hat.com>,
linux-arch@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, mark.rutland@....com
Subject: Re: [HELP-NEEDED, PATCH 0/3] Do not loose dirty bit on THP pages
On Thursday 15 June 2017 02:18 PM, Kirill A. Shutemov wrote:
> O
>> I am not suggesting we don't do the invalidate (the need for that is
>> documented in __split_huge_pmd_locked(). I am suggesting we need a new
>> interface, something like Andrea suggested.
>>
>> old_pmd = pmdp_establish(pmd_mknotpresent());
>>
>> instead of pmdp_invalidate(). We can then use this in scenarios where we
>> want to update pmd PTE entries, where right now we go through a pmdp_clear
>> and set_pmd path. We should really not do that for THP entries.
>
> Which cases are you talking about? When do we need to clear pmd and set
> later?
>
With the latest upstream I am finding the usage when we mark pte clean
page_mkclean_one . Also there is a similar usage in
migrate_misplaced_transhuge_page(). I haven't really verified whether
they do cause any race. But my suggestion is, we should avoid the usage
of set_pmd_at() unless we are creating a new pmd PTE entry. If we can
provide pmdp_establish() we can achieve that easily.
-aneesh
Powered by blists - more mailing lists