[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <613007E2-2A88-4934-9364-A5A66A555305@gmail.com>
Date: Wed, 15 Jun 2016 13:04:48 -0700
From: Nadav Amit <nadav.amit@...il.com>
To: "Anaczkowski, Lukasz" <lukasz.anaczkowski@...el.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
"mhocko@...e.com" <mhocko@...e.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"H. Peter Anvin" <hpa@...or.com>,
"Srinivasappa, Harish" <harish.srinivasappa@...el.com>,
"Odzioba, Lukasz" <lukasz.odzioba@...el.com>,
"Andrejczuk, Grzegorz" <grzegorz.andrejczuk@...el.com>,
"Daniluk, Lukasz" <lukasz.daniluk@...el.com>
Subject: Re: [PATCH v2] Linux VM workaround for Knights Landing A/D leak
Lukasz <lukasz.anaczkowski@...el.com> wrote:
> From: Nadav Amit [mailto:nadav.amit@...il.com]
> Sent: Tuesday, June 14, 2016 8:38 PM
>
>>> + pte_t pte = ptep_get_and_clear(mm, addr, ptep);
>>> +
>>> + if (boot_cpu_has_bug(X86_BUG_PTE_LEAK))
>>> + fix_pte_leak(mm, addr, ptep);
>>> + return pte;
>>> }
>>
>> I missed it on the previous iteration: ptep_get_and_clear already calls
>> fix_pte_leak when needed. So do you need to call it again here?
>
> You're right, Nadav. Not needing this. Will be removed in next version of the patch.
Be careful here. According to the SDM when invalidating a huge-page,
each 4KB page needs to be invalidated separately. In practice, when
Linux invalidates 2MB/1GB pages it performs a full TLB flush. The
full flush may not be required on knights landing, and specifically
for the workaround, but you should check.
Regards,
Nadav
Powered by blists - more mailing lists