All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@linux.intel.com>
To: Nadav Amit <nadav.amit@gmail.com>,
	"Anaczkowski, Lukasz" <lukasz.anaczkowski@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	"ak@linux.intel.com" <ak@linux.intel.com>,
	"kirill.shutemov@linux.intel.com"
	<kirill.shutemov@linux.intel.com>,
	"mhocko@suse.com" <mhocko@suse.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Srinivasappa, Harish" <harish.srinivasappa@intel.com>,
	"Odzioba, Lukasz" <lukasz.odzioba@intel.com>,
	"Andrejczuk, Grzegorz" <grzegorz.andrejczuk@intel.com>,
	"Daniluk, Lukasz" <lukasz.daniluk@intel.com>
Subject: Re: [PATCH v2] Linux VM workaround for Knights Landing A/D leak
Date: Wed, 15 Jun 2016 13:10:24 -0700	[thread overview]
Message-ID: <5761B630.7020502@linux.intel.com> (raw)
In-Reply-To: <613007E2-2A88-4934-9364-A5A66A555305@gmail.com>

On 06/15/2016 01:04 PM, Nadav Amit wrote:
> 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.  

Where do you get that?  The SDM says: "they (TLB invalidation operations
invalidate all TLB entries corresponding to the translation specified by
the paging structures."

Here's the full paragraph from the SDM

... some processors may choose to cache multiple smaller-page TLB
entries for a translation specified by the paging structures to use a
page larger than 4 KBytes. There is no way for software to be aware
that multiple translations for smaller pages have been used for a large
page. The INVLPG instruction and page faults provide the same assurances
that they provide when a single TLB entry is used: they invalidate all
TLB entries corresponding to the translation specified by the paging
structures.

WARNING: multiple messages have this Message-ID (diff)
From: Dave Hansen <dave.hansen@linux.intel.com>
To: Nadav Amit <nadav.amit@gmail.com>,
	"Anaczkowski, Lukasz" <lukasz.anaczkowski@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	"ak@linux.intel.com" <ak@linux.intel.com>,
	"kirill.shutemov@linux.intel.com"
	<kirill.shutemov@linux.intel.com>,
	"mhocko@suse.com" <mhocko@suse.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Srinivasappa, Harish" <harish.srinivasappa@intel.com>,
	"Odzioba, Lukasz" <lukasz.odzioba@intel.com>,
	"Andrejczuk, Grzegorz" <grzegorz.andrejczuk@intel.com>,
	"Daniluk, Lukasz" <lukasz.daniluk@intel.com>
Subject: Re: [PATCH v2] Linux VM workaround for Knights Landing A/D leak
Date: Wed, 15 Jun 2016 13:10:24 -0700	[thread overview]
Message-ID: <5761B630.7020502@linux.intel.com> (raw)
In-Reply-To: <613007E2-2A88-4934-9364-A5A66A555305@gmail.com>

On 06/15/2016 01:04 PM, Nadav Amit wrote:
> 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.  

Where do you get that?  The SDM says: "they (TLB invalidation operations
invalidate all TLB entries corresponding to the translation specified by
the paging structures."

Here's the full paragraph from the SDM

... some processors may choose to cache multiple smaller-page TLB
entries for a translation specified by the paging structures to use a
page larger than 4 KBytes. There is no way for software to be aware
that multiple translations for smaller pages have been used for a large
page. The INVLPG instruction and page faults provide the same assurances
that they provide when a single TLB entry is used: they invalidate all
TLB entries corresponding to the translation specified by the paging
structures.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2016-06-15 20:10 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14 15:58 [PATCH] Linux VM workaround for Knights Landing A/D leak Lukasz Anaczkowski
2016-06-14 15:58 ` Lukasz Anaczkowski
2016-06-14 16:31 ` kbuild test robot
2016-06-14 16:31   ` kbuild test robot
2016-06-14 16:47 ` Nadav Amit
2016-06-14 16:47   ` Nadav Amit
2016-06-14 16:54   ` Anaczkowski, Lukasz
2016-06-14 16:54     ` Anaczkowski, Lukasz
2016-06-14 17:01   ` [PATCH v2] " Lukasz Anaczkowski
2016-06-14 17:01     ` Lukasz Anaczkowski
2016-06-14 17:24     ` Dave Hansen
2016-06-14 17:24       ` Dave Hansen
2016-06-14 18:34       ` One Thousand Gnomes
2016-06-14 18:34         ` One Thousand Gnomes
2016-06-14 18:54         ` Dave Hansen
2016-06-14 18:54           ` Dave Hansen
2016-06-14 19:19           ` Borislav Petkov
2016-06-14 19:19             ` Borislav Petkov
2016-06-14 20:20             ` H. Peter Anvin
2016-06-14 20:47               ` Borislav Petkov
2016-06-14 20:54                 ` H. Peter Anvin
2016-06-14 21:02                   ` Borislav Petkov
2016-06-14 21:08                     ` H. Peter Anvin
2016-06-14 21:13                     ` H. Peter Anvin
2016-06-14 18:10     ` Borislav Petkov
2016-06-14 18:10       ` Borislav Petkov
2016-06-15 13:12       ` Anaczkowski, Lukasz
2016-06-15 13:12         ` Anaczkowski, Lukasz
2016-06-14 18:38     ` Nadav Amit
2016-06-14 18:38       ` Nadav Amit
2016-06-15 13:12       ` Anaczkowski, Lukasz
2016-06-15 13:12         ` Anaczkowski, Lukasz
2016-06-15 20:04         ` Nadav Amit
2016-06-15 20:04           ` Nadav Amit
2016-06-15 20:10           ` Dave Hansen [this message]
2016-06-15 20:10             ` Dave Hansen
2016-06-15 20:26             ` Nadav Amit
2016-06-15 20:26               ` Nadav Amit
2016-06-16 15:14     ` [PATCH v3] " Lukasz Anaczkowski
2016-06-16 15:14       ` Lukasz Anaczkowski
2016-06-16 16:43       ` Nadav Amit
2016-06-16 16:43         ` Nadav Amit
2016-06-16 20:23       ` Dave Hansen
2016-06-16 20:23         ` Dave Hansen
2016-06-14 17:18   ` [PATCH] " Dave Hansen
2016-06-14 17:18     ` Dave Hansen
2016-06-14 20:16     ` Nadav Amit
2016-06-14 20:16       ` Nadav Amit
2016-06-14 21:37       ` Dave Hansen
2016-06-14 21:37         ` Dave Hansen
2016-06-15  2:20         ` Andy Lutomirski
2016-06-15  2:20           ` Andy Lutomirski
2016-06-15  2:35           ` Nadav Amit
2016-06-15  2:35             ` Nadav Amit
2016-06-15  2:36             ` Andy Lutomirski
2016-06-15  2:36               ` Andy Lutomirski
2016-06-15  2:44               ` Nadav Amit
2016-06-15  2:44                 ` Nadav Amit
2016-06-15  3:09                 ` Andy Lutomirski
2016-06-15  3:09                   ` Andy Lutomirski
2016-06-15  3:20         ` Nadav Amit
2016-06-15  3:20           ` Nadav Amit
2016-06-14 16:58 ` kbuild test robot
2016-06-14 16:58   ` kbuild test robot
2016-06-14 17:19 ` Dave Hansen
2016-06-14 17:19   ` Dave Hansen
2016-06-15 13:06   ` Anaczkowski, Lukasz
2016-06-15 13:06     ` Anaczkowski, Lukasz
2016-06-14 17:47 ` kbuild test robot
2016-06-14 17:47   ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5761B630.7020502@linux.intel.com \
    --to=dave.hansen@linux.intel.com \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=grzegorz.andrejczuk@intel.com \
    --cc=harish.srinivasappa@intel.com \
    --cc=hpa@zytor.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lukasz.anaczkowski@intel.com \
    --cc=lukasz.daniluk@intel.com \
    --cc=lukasz.odzioba@intel.com \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=nadav.amit@gmail.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.