Feature request: ability to use libeio with multiple event loops
kerneis at pps.jussieu.fr
Mon Jan 2 10:46:04 CET 2012
On Mon, Jan 02, 2012 at 01:29:39PM +0400, Yaroslav wrote:
> About point (2) I have questions:
You would probably learn a lot reading "What every programmer should know about
memory?" by U. Drepper [http://people.redhat.com/drepper/cpumemory.pdf]. In
particular Section 3.3.4 explains how CPU cache works in a multi-processor
setup (Section 3 is about CPU cache in general). I think it would answer your
questions and give you a good overall view of the topic.
> (2.1) At what moments exactly this syncronizations occur? Is it on every
> assembler instruction, or on every write to memory (i.e. on most variable
> assignments, all memcpy's, etc.), or is it only happening when two threads
> simultaneously work on the same memory area (how narrow is definition of
> the area?)?
Only on writes, with the granularity of a cache line.
No idea about you other questions, sorry.
More information about the libev