Web lists-archives.com

Re: [RFC PATCH v2 08/12] x86/tlb: Privatize cpu_tlbstate

> On May 31, 2019, at 11:48 AM, Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote:
>> On May 30, 2019, at 11:36 PM, Nadav Amit <namit@xxxxxxxxxx> wrote:
>> cpu_tlbstate is mostly private and only the variable is_lazy is shared.
>> This causes some false-sharing when TLB flushes are performed.
>> Break cpu_tlbstate intro cpu_tlbstate and cpu_tlbstate_shared, and mark
>> each one accordingly.
> At some point we’ll want to do a better job with our PV flush code, and I
> suspect we’ll end up with more of this shared again.

In the usual use-case, when you flush the TLB, will you write something to
cpu_tlbstate that should be visible to other cores? I don’t see why, even if
PV is used.

Anyhow, I was always under the impression that PV should not punish

The other option is to take cpu_tlbstate and rearrange it so the shared
stuff will not be next to the private. I just don’t know how to do it
without making an assumption of the cacheline size.