android_kernel_samsung_msm8976/arch
Arjan van de Ven e07e23e1fd [PATCH] non lazy "sleazy" fpu implementation
Right now the kernel on x86-64 has a 100% lazy fpu behavior: after *every*
context switch a trap is taken for the first FPU use to restore the FPU
context lazily.  This is of course great for applications that have very
sporadic or no FPU use (since then you avoid doing the expensive
save/restore all the time).  However for very frequent FPU users...  you
take an extra trap every context switch.

The patch below adds a simple heuristic to this code: After 5 consecutive
context switches of FPU use, the lazy behavior is disabled and the context
gets restored every context switch.  If the app indeed uses the FPU, the
trap is avoided.  (the chance of the 6th time slice using FPU after the
previous 5 having done so are quite high obviously).

After 256 switches, this is reset and lazy behavior is returned (until
there are 5 consecutive ones again).  The reason for this is to give apps
that do longer bursts of FPU use still the lazy behavior back after some
time.

[akpm@osdl.org: place new task_struct field next to jit_keyring to save space]
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-09-26 10:52:36 +02:00
..
alpha [PATCH] arch/alpha: Use ARRAY_SIZE macro 2006-07-31 13:28:38 -07:00
arm [ARM] 3794/1: S3C24XX: do not defined set_irq_wake when no CONFIG_PM 2006-09-18 13:30:20 +01:00
arm26 [PATCH] tty: Remove include of screen_info.h from tty.h 2006-07-10 13:24:16 -07:00
cris [PATCH] pcf8563: remove MOD_INC_USE_COUNT, MOD_DEC_USE_COUNT 2006-07-10 13:24:22 -07:00
frv [PATCH] sanitize frv archclean 2006-09-22 17:48:56 -07:00
h8300
i386 [PATCH] i386: Support physical cpu hotplug for x86_64 2006-09-26 10:52:35 +02:00
ia64 [PATCH] cpu to node relationship fixup: map cpu to node 2006-09-25 17:38:36 -07:00
m32r [PATCH] tty: Remove include of screen_info.h from tty.h 2006-07-10 13:24:16 -07:00
m68k [PATCH] irq-flags: M68K: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
m68knommu [PATCH] irq-flags: M68KNOMMU: Use the new IRQF_ constants 2006-07-02 13:58:47 -07:00
mips [MIPS] sparsemem: fix crash in show_mem 2006-07-13 21:26:22 +01:00
parisc [PATCH] vDSO hash-style fix 2006-07-31 13:28:43 -07:00
powerpc [PATCH] more fallout from get_property returning pointer to const 2006-09-23 11:34:43 -07:00
ppc [POWERPC] Fix compile error in sbc8560 2006-09-21 22:59:38 +10:00
s390 [PATCH] x86: Some preparationary cleanup for stack trace 2006-09-26 10:52:34 +02:00
sh Fix 'make headers_check' on sh 2006-09-21 08:36:50 +01:00
sh64 sh64: Add a sane pm_power_off implementation. 2006-09-12 14:40:09 +09:00
sparc [PATCH] sun4: fix sbus_setup_iommu() 2006-09-22 17:48:57 -07:00
sparc64 [SPARC64]: Fix section-mismatch errors in solaris emul module. 2006-09-25 16:39:55 -07:00
um [PATCH] i386: Redo semaphore and rwlock assembly helpers 2006-09-26 10:52:29 +02:00
v850 [PATCH] v850: call init_page_count() instead of set_page_count() 2006-07-31 13:28:38 -07:00
x86_64 [PATCH] non lazy "sleazy" fpu implementation 2006-09-26 10:52:36 +02:00
xtensa [PATCH] xtensa: ptrace: EXIT_ZOMBIE fix 2006-09-01 11:39:08 -07:00