back

by LinuxBender·8y ago·view on hn ↗
Someone please correct me if I am incorrect, but that would be any mainstream linux not using the 4.14 kernel. Redhat, CentOS, Suse at least. Looks like CoreOS that is on 4.14 is on a minor release just prior to the PCID patch.

It looks like Ubuntu 18 Bionic Beaver may have it. (4.15) I suppose some folks use Ubuntu in a datacenter, but more likely the LTS releases and 18 is not likely in many production datacenters.

Can you confirm that Redhat backported that newer PCID code into the 3.10 kernel branch? If so, people should not be seeing a performance hit on the KPTI patch.

1 comments
Ah, I didn't realize Linux was so behind in supporting PCID here. Thanks! For what it's worth, Fedora Linux is on kernel 4.14.11 already.

Curiously enough, FreeBSD has had PCID support since 2013 (r255060). We found it improved performance in microbenchmarks:

> In the microbenchmarks, using the PCID decreased latency of the context switches by ~30% on SandyBridge class desktop CPUs, measured with the lat_ctx program from lmbench.

> If available, use INVPCID instruction when a TLB entry in non-current address space needs to be invalidated. The instruction is typically available on the Haswell.

You're welcome! We were trying to unravel that post about PCID as well.

It appears the first PCID code was merged in 4.14.12 so you will probably have that in the coming days / weeks. CoreOS is also 4.14.11.

For those on LTS releases, we may have to venture into uncharted waters. The first that came to mind was elrepo.org, as they apply some of the same build options that Redhat uses against the latest upstream. Their kernel packages are meant to provide support for newer laptop hardware...