[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20180111231151.GA12706@avx2>
Date: Fri, 12 Jan 2018 02:11:51 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: w@....eu
Cc: linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v2 6/6] x86/entry/pti: don't switch PGD on when
pti_disable is set
> I initially tried getpid() which I found to be cached by glibc, but I
> switched to write(-1, "a", 1) in the example in the cover letter and
> the test for 3 million runs roughly climbs from 200 ms to 900 ms under
> kvm (with PCID this time, I didn't retest without).
umask() is the fastest system call I think.
Also who cares about glibc caching?
static inline int sys_umask(int mask)
{
int rv;
asm volatile (
"syscall"
: "=a" (rv)
: "0" (95), "D" (mask)
: "rcx", "r11", "cc", "memory"
);
return rv;
}
int main(void)
{
unsigned int i;
for (i = 0; i < (1U << 24); i++) {
sys_umask(0);
}
return 0;
}
Powered by blists - more mailing lists