Bug 139318
Summary: | Slow system calls on Pentium 4 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Leif Hedstrom <leif> |
Component: | kernel | Assignee: | Ingo Molnar <mingo> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3 | CC: | dmose, hongjiu.lu, roland, wtogami |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
URL: | http://www.ogre.com/tiki-read_article.php?articleId=6 | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-04-12 00:22:39 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Leif Hedstrom
2004-11-15 06:37:35 UTC
This is due to an incompatability with exec-shield and sysenter. The P4 sadly is affected quite badly by this. The only way to get both to work would be to add an expensive MSR write to the context switch path. please retest with current Fedora kernels which have the 3:1 split. (i.e. not hugemem.) I tested kernel-smp-2.6.10-1.1074_FC4, and it has the same (actually, even worse) problem. The timings from my simple tests with this kernel are: gettimeofday(): clock ticks/call: 8504 uname(): clock ticks/call: 1720 chdir(): clock ticks/call: 107518 open(): clock ticks/call: 71137 The same test on a 2.6.9 "stock" kernel (no patches) yields: gettimeofday(): clock ticks/call: 859 uname(): clock ticks/call: 1258 chdir(): clock ticks/call: 4665 open(): clock ticks/call: 1392 Hmm, I was just trying to add myself to the CC list, not sure why the QA contact disappeared. And now I'm not allowed to put the QA contact back. Doh! I did some more tests with the latest FC4 kernel, it's still slow (and surprisingly, chdir() and open() times are way worse): gettimeofday(): clock ticks/call: 8568 uname(): clock ticks/call: 1750 chdir(): clock ticks/call: 110082 open(): clock ticks/call: 73196 I also tried a bunch of things to see if there was any way around this, seing that it might be related to exec-shield. I did 1) Booted the kernel with exec-shield=0 ==> No difference 2) Tried setting /proc/sys/kernel/exec-shield to 0 ==> No difference 3) Compiled the test program with -Wa,--execstack ==> No difference 4) Set the binary using setarch i386 ==> No difference I also tried the RHEL4 kernel, and to my surprise, out of the box (on the same Fedora installation), it's running a lot better. The numbers are slightly longer (slower) than my "stock" kernel, but many times faster than the FC4 candidate kernel. Are we sure this is due exec-shield, and not some other patch? the latest fc4 kernel (2.6.11-1.1234) has some exec-shield patches to make it work with vdso again (and hence: sysenter). *** Bug 148839 has been marked as a duplicate of this bug. *** Hmmm, still pretty slow on my system (about 7x - 10x slower than say RHEL4 kernel): thor (08:20) 29/0 $ uname -a; ./cpu-bench Linux thor.ogre.com 2.6.11-1.1240_FC4smp #1 SMP Wed Apr 13 08:57:15 EDT 2005 i686 i686 i386 GNU/Linux gettimeofday(): clock ticks/call: 8628 uname(): clock ticks/call: 1784 chdir(): clock ticks/call: 40391 open(): clock ticks/call: 34638 .vs. root@leifh 27/0 # uname -a; ./cpu-bench Linux leifh.corp.yahoo.com 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux gettimeofday(): clock ticks/call: 1662 uname(): clock ticks/call: 1577 chdir(): clock ticks/call: 3821 open(): clock ticks/call: 2280 Not to mention "unpatched" Linus kernel which is still faster than RHEL4. Because of the exec-shield implementation, you can only use sysenter when the new NX page protection is available. There should be a boot-time message that says either "NX (Execute Disable) protection: active" or "Using x86 segment limits to approximate NX protection". If you get the latter, then you are not using sysenter. Current P4 production chips have NX support, but that is pretty recent. |