[Feature] Cristal Ridge: x86 Process Context IDentifiers (PCID) support for OSV

Bug #1718825 reported by quanxian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
intel
Won't Fix
Undecided
Unassigned
linux (Ubuntu)
Incomplete
Medium
Seth Forshee

Bug Description

Description:

The mapping from virtual address to physical address will be stored in someplace called TLB,
CPU need to occasionally flush TLB for different reasons, the flush will impact all process address mapping,
with PCID support, the impact will be minimal, this will bring overcall performance boost.

The commits comes from Andy Lutomirski(not Intel), which is quite recent, on July 5 2017.
Part1:
660da7c9228f x86/mm: Enable CR4.PCIDE on supported systems
0790c9aad849 x86/mm: Add the 'nopcid' boot option to turn off PCID
cba4671af755 x86/mm: Disable PCID on 32-bit kernels
43858b4f25cf x86/mm: Stop calling leave_mm() in idle code
94b1b03b519b x86/mm: Rework lazy TLB mode and TLB freshness tracking
b0579ade7cd8 x86/mm: Track the TLB's tlb_gen and update the flushing algorithm
f39681ed0f48 x86/mm: Give each mm TLB flush generation a unique ID
Part2:
10af6235e0d3 x86/mm: Implement PCID based optimization: try to preserve old TLB entries using PCID

Target Release: 17.10
Kernel: 4.14

Revision history for this message
quanxian (quanxian-wang) wrote :

@Canonical if the effort is little, just backport it. Thx

Seth Forshee (sforshee)
information type: Proprietary → Public
Changed in linux (Ubuntu):
assignee: nobody → Seth Forshee (sforshee)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Seth Forshee (sforshee) wrote :

Right away I notice some commits which look to be fixes for commits in this series:

f34902c5c6c0 "x86/hibernate/64: Mask off CR3's PCID bits in the saved CR3"
c7ad5ad297e6 "x86/mm/64: Initialize CR4.PCIDE early"
a2105f8a9c38 "tools headers: Sync cpu features kernel ABI headers with tooling headers"
72c0098d92ce "x86/mm: Reinitialize TLB state on hotplug and resume"

Revision history for this message
quanxian (quanxian-wang) wrote :

Thanks

If possible,just take it.

Revision history for this message
Seth Forshee (sforshee) wrote :

It's really not clear to me whether some of the changes to arch/x86/mm/tlb.c should be applied without additional prerequisite patches. Can you please advise? Thanks.

Changed in linux (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
quanxian (quanxian-wang) wrote :

@Canonical
if the backporting works is not easy, we just move it into 18.04.
If the backporting is fine for you, just do it.

The patches are from outside who is not from Intel. we just find that and list the patches here.

Revision history for this message
Seth Forshee (sforshee) wrote :

Let's defer to 18.04.

Revision history for this message
quanxian (quanxian-wang) wrote :

The changes are too invasive (they will not backport cleanly), they are not stable yet (there are still bugs being found in 4.14-rcX). The performance implications are also not well-documented across the platforms that we care about.

The opinion is that it is not practical or a good idea to pursue putting this code back into old distributions, closing this.

Changed in intel:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.