[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <520249E9-1784-4728-88D7-5A21DFE17B8E@fb.com>
Date: Tue, 20 Aug 2019 14:14:10 +0000
From: Song Liu <songliubraving@...com>
To: Dave Hansen <dave.hansen@...el.com>
CC: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux MM <linux-mm@...ck.org>,
Kernel Team <Kernel-team@...com>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
Joerg Roedel <jroedel@...e.de>,
Thomas Gleixner <tglx@...utronix.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
"Peter Zijlstra" <peterz@...radead.org>
Subject: Re: [PATCH] x86/mm/pti: in pti_clone_pgtable() don't increase addr by
PUD_SIZE
> On Aug 20, 2019, at 6:57 AM, Dave Hansen <dave.hansen@...el.com> wrote:
>
> On 8/20/19 12:51 AM, Song Liu wrote:
>> In our x86_64 kernel, pti_clone_pgtable() fails to clone 7 PMDs because
>> of this issuse, including PMD for the irq entry table. For a memcache
>> like workload, this introduces about 4.5x more iTLB-load and about 2.5x
>> more iTLB-load-misses on a Skylake CPU.
>
> I was surprised that this manifests as a performance issue. Usually
> messing up PTI page table manipulation means you get to experience the
> jobs of debugging triple faults. But, it makes sense if its this line:
>
> /*
> * Note that this will undo _some_ of the work that
> * pti_set_kernel_image_nonglobal() did to clear the
> * global bit.
> */
> pti_clone_pgtable(start, end_clone, PTI_LEVEL_KERNEL_IMAGE);
>
> which is restoring the Global bit.
>
> *But*, that shouldn't get hit on a Skylake CPU since those have PCIDs
> and shouldn't have a global kernel image. Could you confirm whether
> PCIDs are supported on this CPU?
Yes, pcid is listed in /proc/cpuinfo.
Thanks,
Song
Powered by blists - more mailing lists