Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1670017
| From | Nadav Amit <nadav.amit@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 10/10] x86/mm: Try to preserve old TLB entries using PCID |
| Date | 2017-06-20 01:00 +0200 |
| Message-ID | <tUdOh-m9-1@gated-at.bofh.it> (permalink) |
| References | <tS8zn-C4-9@gated-at.bofh.it> <tS8zp-C4-43@gated-at.bofh.it> <tTBSF-1wF-5@gated-at.bofh.it> <tUd1T-8vL-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Andy Lutomirski <luto@kernel.org> wrote: > On Sat, Jun 17, 2017 at 11:26 PM, Nadav Amit <nadav.amit@gmail.com> wrote: >>> On Jun 13, 2017, at 9:56 PM, Andy Lutomirski <luto@kernel.org> wrote: >>> >>> PCID is a "process context ID" -- it's what other architectures call >>> an address space ID. Every non-global TLB entry is tagged with a >>> PCID, only TLB entries that match the currently selected PCID are >>> used, and we can switch PGDs without flushing the TLB. x86's >>> PCID is 12 bits. >>> >>> This is an unorthodox approach to using PCID. x86's PCID is far too >>> short to uniquely identify a process, and we can't even really >>> uniquely identify a running process because there are monster >>> systems with over 4096 CPUs. To make matters worse, past attempts >>> to use all 12 PCID bits have resulted in slowdowns instead of >>> speedups. >>> >>> This patch uses PCID differently. We use a PCID to identify a >>> recently-used mm on a per-cpu basis. An mm has no fixed PCID >>> binding at all; instead, we give it a fresh PCID each time it's >>> loaded except in cases where we want to preserve the TLB, in which >>> case we reuse a recent value. >>> >>> In particular, we use PCIDs 1-3 for recently-used mms and we reserve >>> PCID 0 for swapper_pg_dir and for PCID-unaware CR3 users (e.g. EFI). >>> Nothing ever switches to PCID 0 without flushing PCID 0 non-global >>> pages, so PCID 0 conflicts won't cause problems. >> >> Is this commit message outdated? > > Yes, it's old. Will fix. Just to clarify: I asked since I don’t understand how the interaction with PCID-unaware CR3 users go. Specifically, IIUC, arch_efi_call_virt_teardown() can reload CR3 with an old PCID value. No?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/10] PCID and improved laziness Andy Lutomirski <luto@kernel.org> - 2017-06-14 07:00 +0200
[PATCH v2 09/10] x86/mm: Enable CR4.PCIDE on supported systems Andy Lutomirski <luto@kernel.org> - 2017-06-14 07:00 +0200
Re: [PATCH v2 09/10] x86/mm: Enable CR4.PCIDE on supported systems Juergen Gross <jgross@suse.com> - 2017-06-14 07:40 +0200
[PATCH v2 06/10] x86/mm: Stop calling leave_mm() in idle code Andy Lutomirski <luto@kernel.org> - 2017-06-14 07:00 +0200
[PATCH v2 04/10] x86/mm: Track the TLB's tlb_gen and update the flushing algorithm Andy Lutomirski <luto@kernel.org> - 2017-06-14 07:00 +0200
[PATCH v2 02/10] x86/mm: Remove reset_lazy_tlbstate() Andy Lutomirski <luto@kernel.org> - 2017-06-14 07:00 +0200
Re: [PATCH v2 02/10] x86/mm: Remove reset_lazy_tlbstate() Rik van Riel <riel@redhat.com> - 2017-06-15 21:30 +0200
[PATCH v2 10/10] x86/mm: Try to preserve old TLB entries using PCID Andy Lutomirski <luto@kernel.org> - 2017-06-14 07:00 +0200
Re: [PATCH v2 10/10] x86/mm: Try to preserve old TLB entries using PCID Nadav Amit <nadav.amit@gmail.com> - 2017-06-18 08:30 +0200
Re: [PATCH v2 10/10] x86/mm: Try to preserve old TLB entries using PCID Andy Lutomirski <luto@kernel.org> - 2017-06-20 00:10 +0200
Re: [PATCH v2 10/10] x86/mm: Try to preserve old TLB entries using PCID Nadav Amit <nadav.amit@gmail.com> - 2017-06-20 01:00 +0200
Re: [PATCH v2 10/10] x86/mm: Try to preserve old TLB entries using PCID Nadav Amit <nadav.amit@gmail.com> - 2017-06-20 01:10 +0200
Re: [PATCH v2 00/10] PCID and improved laziness Dave Hansen <dave.hansen@intel.com> - 2017-06-15 00:20 +0200
Re: [PATCH v2 00/10] PCID and improved laziness Andy Lutomirski <luto@kernel.org> - 2017-06-15 00:50 +0200
Re: [PATCH v2 00/10] PCID and improved laziness "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-06-18 23:40 +0200
Re: [PATCH v2 00/10] PCID and improved laziness Andy Lutomirski <luto@kernel.org> - 2017-06-19 06:50 +0200
csiph-web