linux/arch/x86_64/kernel
Andrea Arcangeli ffaa8bd6c9 [PATCH] seccomp: tsc disable
I believe at least for seccomp it's worth to turn off the tsc, not just for
HT but for the L2 cache too.  So it's up to you, either you turn it off
completely (which isn't very nice IMHO) or I recommend to apply this below
patch.

This has been tested successfully on x86-64 against current cogito
repository (i686 compiles so I didn't bother testing ;).  People selling
the cpu through cpushare may appreciate this bit for a peace of mind.

There's no way to get any timing info anymore with this applied
(gettimeofday is forbidden of course).  The seccomp environment is
completely deterministic so it can't be allowed to get timing info, it has
to be deterministic so in the future I can enable a computing mode that
does a parallel computing for each task with server side transparent
checkpointing and verification that the output is the same from all the 2/3
seller computers for each task, without the buyer even noticing (for now
the verification is left to the buyer client side and there's no
checkpointing, since that would require more kernel changes to track the
dirty bits but it'll be easy to extend once the basic mode is finished).

Eliminating a cold-cache read of the cr4 global variable will save one
cacheline during the tlb flush while making the code per-cpu-safe at the
same time.  Thanks to Mikael Pettersson for noticing the tlb flush wasn't
per-cpu-safe.

The global tlb flush can run from irq (IPI calling do_flush_tlb_all) but
it'll be transparent to the switch_to code since the IPI won't make any
change to the cr4 contents from the point of view of the interrupted code
and since it's now all per-cpu stuff, it will not race.  So no need to
disable irqs in switch_to slow path.

Signed-off-by: Andrea Arcangeli <andrea@cpushare.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-27 15:11:44 -07:00
..
acpi [PATCH] s-t-RAM: load gdt the right way 2005-06-25 16:24:32 -07:00
cpufreq Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
aperture.c [PATCH] remove direct ref to contig_page_data for x86-64 2005-06-23 09:45:06 -07:00
apic.c [PATCH] kexec: x86_64: restore apic virtual wire mode on shutdown 2005-06-25 16:24:47 -07:00
asm-offsets.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
crash.c [PATCH] kdump: Use real pt_regs from exception 2005-06-25 16:24:54 -07:00
e820.c [PATCH] crashdump: x86_64: crashkernel option 2005-06-25 16:24:50 -07:00
early_printk.c [PATCH] allow early printk to use more than 25 lines 2005-06-23 09:45:10 -07:00
entry.S [PATCH] x86_64: Readd missing tests in entry.S 2005-05-17 07:59:13 -07:00
genapic_cluster.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
genapic_flat.c [PATCH] x86_64: Provide ability to choose using shortcuts for IPI in flat mode. 2005-06-25 16:24:31 -07:00
genapic.c [PATCH] x86_64 genapic update 2005-04-16 15:24:53 -07:00
head64.c [PATCH] reorganize x86-64 NUMA and DISCONTIGMEM config options 2005-06-23 09:45:06 -07:00
head.S [PATCH] kexec: x86_64: add CONFIG_PHYSICAL_START 2005-06-25 16:24:48 -07:00
i387.c [PATCH] x86_64: Change init sections for CPU hotplug support 2005-06-25 16:24:30 -07:00
i8259.c [PATCH] kexec: x86_64: add i8259 shutdown method 2005-06-25 16:24:46 -07:00
init_task.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
io_apic.c [PATCH] kexec: x86_64: restore apic virtual wire mode on shutdown 2005-06-25 16:24:47 -07:00
ioport.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
irq.c [PATCH] x86_64: CPU hotplug support 2005-06-25 16:24:30 -07:00
kprobes.c [PATCH] kprobes: Temporary disarming of reentrant probe for x86_64 2005-06-23 09:45:24 -07:00
ldt.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
machine_kexec.c [PATCH] kexec code cleanup 2005-06-25 16:24:55 -07:00
Makefile [PATCH] kexec: x86_64 kexec implementation 2005-06-25 16:24:50 -07:00
mce_intel.c [PATCH] x86_64: Change init sections for CPU hotplug support 2005-06-25 16:24:30 -07:00
mce.c [PATCH] RCU: clean up a few remaining synchronize_kernel() calls 2005-06-25 16:24:38 -07:00
module.c [PATCH] uml: kludgy compilation fixes for x86-64 subarch modules support 2005-05-05 16:36:33 -07:00
mpparse.c [PATCH] x86_64: avoid wasting IRQs 2005-06-23 09:45:13 -07:00
msr.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
nmi.c [PATCH] x86_64: Change init sections for CPU hotplug support 2005-06-25 16:24:30 -07:00
pci-dma.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci-gart.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci-nommu.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pmtimer.c [PATCH] x86_64: Add pmtimer support 2005-05-17 07:59:15 -07:00
process.c [PATCH] seccomp: tsc disable 2005-06-27 15:11:44 -07:00
ptrace.c [PATCH] x86_64: TASK_SIZE fixes for compatibility mode processes 2005-06-21 18:46:12 -07:00
reboot.c [PATCH] kexec: x86_64: factor out apic shutdown code 2005-06-25 16:24:50 -07:00
relocate_kernel.S [PATCH] kexec: x86_64 kexec implementation 2005-06-25 16:24:50 -07:00
semaphore.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
setup64.c [PATCH] x86_64: Change init sections for CPU hotplug support 2005-06-25 16:24:30 -07:00
setup.c [PATCH] crashdump: x86_64: crashkernel option 2005-06-25 16:24:50 -07:00
signal.c [PATCH] Cleanup patch for process freezing 2005-06-25 17:10:13 -07:00
smp.c [PATCH] x86_64: Dont use broadcast shortcut to make it cpu hotplug safe. 2005-06-25 16:24:31 -07:00
smpboot.c [PATCH] x86_64: Dont use broadcast shortcut to make it cpu hotplug safe. 2005-06-25 16:24:31 -07:00
suspend_asm.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
suspend.c [PATCH] swsusp: clean assembly parts 2005-06-25 16:24:33 -07:00
sys_x86_64.c [PATCH] Avoiding mmap fragmentation 2005-06-21 18:46:16 -07:00
syscall.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
time.c [PATCH] x86_64: fix hpet for systems that don't support legacy replacement 2005-06-23 09:45:12 -07:00
trampoline.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
traps.c [PATCH] x86_64: CPU hotplug support 2005-06-25 16:24:30 -07:00
vmlinux.lds.S [PATCH] kexec: x86_64: vmlinux: fix physical addresses 2005-06-25 16:24:47 -07:00
vsyscall.c [PATCH] x86_64: Make vsyscall.c compile without CONFIG_SYSCTL 2005-05-17 07:59:16 -07:00
x8664_ksyms.c [PATCH] x86_64: CONFIG_BUG=n fixes 2005-05-25 15:31:28 -07:00