diff options
author | Richard Braun <rbraun@sceen.net> | 2014-06-10 21:14:51 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2014-06-10 21:14:51 +0200 |
commit | 73a935a3e8f12447d455bcf4a1a01c51907a53a0 (patch) | |
tree | 7fbde09a59bcb4f2193a905e91ef9b805dd49746 /arch/x86/machine/cpu.h | |
parent | f0e77fb79581c9227f758ad014a3c2778ae9d2f5 (diff) |
kern/llsync: rework lockless synchronization
Use a global checkpoint identifier as a generation counter and remove
reset interrupts.
For some reason I can't remember, using reset interrupts was thought to
be more efficient, perhaps because accessing a global variable on each
checkpoint looked expensive. But it's really not scalable, and a
read-mostly global variable can get cached locally and not incur expensive
access.
In addition, add a decent amount of documentation about the semantics
with regard to the rest of the system. Explicitely state that checkpoints
are triggered by context switches and that it's not allowed to block
inside read-side critical sections. Make periodic events attempt to trigger
checkpoints too. Add a thread-local read-side critical section nesting
counter so that it can be reliably determined whether the processor is
running a read-side critical section or not.
Diffstat (limited to 'arch/x86/machine/cpu.h')
-rw-r--r-- | arch/x86/machine/cpu.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/arch/x86/machine/cpu.h b/arch/x86/machine/cpu.h index f1e9cfb6..07dd98db 100644 --- a/arch/x86/machine/cpu.h +++ b/arch/x86/machine/cpu.h @@ -658,20 +658,6 @@ cpu_send_thread_schedule(unsigned int cpu) */ void cpu_thread_schedule_intr(struct trap_frame *frame); -/* - * Request a remote processor to reset its checkpoint. - */ -static inline void -cpu_send_llsync_reset(unsigned int cpu) -{ - lapic_ipi_send(cpu_from_id(cpu)->apic_id, TRAP_LLSYNC_RESET); -} - -/* - * Interrupt handler for checkpoint reset requests. - */ -void cpu_llsync_reset_intr(struct trap_frame *frame); - #endif /* __ASSEMBLER__ */ #endif /* _X86_CPU_H */ |