Re: [RFC PATCH v2 2/3] x86/mm/tlb: Defer PTI flushes

2019-08-27 Thread Andy Lutomirski
On Tue, Aug 27, 2019 at 4:55 PM Nadav Amit wrote: > > > On Aug 27, 2019, at 4:13 PM, Andy Lutomirski wrote: > > > > On Fri, Aug 23, 2019 at 11:13 PM Nadav Amit wrote: > >> INVPCID is considerably slower than INVLPG of a single PTE. Using it to > >> flush the user page-tables when PTI is enabled

Re: [RFC PATCH v2 2/3] x86/mm/tlb: Defer PTI flushes

2019-08-27 Thread Nadav Amit
> On Aug 27, 2019, at 4:13 PM, Andy Lutomirski wrote: > > On Fri, Aug 23, 2019 at 11:13 PM Nadav Amit wrote: >> INVPCID is considerably slower than INVLPG of a single PTE. Using it to >> flush the user page-tables when PTI is enabled therefore introduces >> significant overhead. >> >> Instead,

Re: [RFC PATCH v2 2/3] x86/mm/tlb: Defer PTI flushes

2019-08-27 Thread Andy Lutomirski
On Fri, Aug 23, 2019 at 11:13 PM Nadav Amit wrote: > > INVPCID is considerably slower than INVLPG of a single PTE. Using it to > flush the user page-tables when PTI is enabled therefore introduces > significant overhead. > > Instead, unless page-tables are released, it is possible to defer the >

Re: [RFC PATCH v2 2/3] x86/mm/tlb: Defer PTI flushes

2019-08-27 Thread Nadav Amit
> On Aug 27, 2019, at 11:28 AM, Dave Hansen wrote: > > On 8/23/19 3:52 PM, Nadav Amit wrote: >> INVPCID is considerably slower than INVLPG of a single PTE. Using it to >> flush the user page-tables when PTI is enabled therefore introduces >> significant overhead. > > I'm not sure this is worth

Re: [RFC PATCH v2 2/3] x86/mm/tlb: Defer PTI flushes

2019-08-27 Thread Dave Hansen
On 8/23/19 3:52 PM, Nadav Amit wrote: > INVPCID is considerably slower than INVLPG of a single PTE. Using it to > flush the user page-tables when PTI is enabled therefore introduces > significant overhead. I'm not sure this is worth all the churn, especially in the entry code. For large flushes

[RFC PATCH v2 2/3] x86/mm/tlb: Defer PTI flushes

2019-08-24 Thread Nadav Amit
INVPCID is considerably slower than INVLPG of a single PTE. Using it to flush the user page-tables when PTI is enabled therefore introduces significant overhead. Instead, unless page-tables are released, it is possible to defer the flushing of the user page-tables until the time the code returns