Re: [PATCH 00/23] KAISER: unmap most of the kernel from userspace page tables

From: Dave Hansen
Date: Wed Nov 01 2017 - 11:53:23 EST


On 10/31/2017 04:27 PM, Linus Torvalds wrote:
> So even if you don't want to have global pages for normal kernel
> entries, you don't want to just make _PAGE_GLOBAL be defined as zero.
> You'd want to just use _PAGE_GLOBAL conditionally.

I implemented this, then did a quick test with some code that does a
bunch of quick system calls:

> https://github.com/antonblanchard/will-it-scale/blob/master/tests/lseek1.c

It helps a wee bit (~3%) with PCIDs, and much more when PCIDs are not in
use (~15%). Here are the numbers: ("ge" means "Global Entry"):

no kaiser : 5.2M
kaiser+ pcid : 3.0M
kaiser+ pcid+ge: 3.1M
kaiser+nopcid : 2.2M
kaiser+nopcid+ge: 2.5M

This *does* use Global pages for the process stack (which is not idea),
but it sounds like Andy's entry stack stuff will get rid of the need to
do that in the first place.