#13 see if we can get rid of the message Arc in client

Lezárt
megnyitva ekkor: 1 éve j3tracey által · 1 hozzászólás
Justin Tracey hozzászólt 1 éve

In the name of code reuse with peer mode, we put the messages in the channel between the state machine and the writer thread in an Arc. There's nothing wrong with this for correctness, but since a message only ever gets sent over one connection from the client, it's strictly overhead, and as a synchronization primitive, it forces cache coherence across NUMA nodes, which can be a major hit for performance (not that we won't be using tons of synchronization primitives anyway). We should see if there's an easy way to preserve code reuse while getting rid of this, likely through generics.

In the name of code reuse with peer mode, we put the messages in [the channel between the state machine and the writer thread](https://git-crysp.uwaterloo.ca/j3tracey/MGen/src/a77581b348197a48442afb1e2919749aa56060f3/src/bin/client.rs#L27) in an [Arc](https://doc.rust-lang.org/std/sync/struct.Arc.html). There's nothing wrong with this for correctness, but since a message only ever gets sent over one connection from the client, it's strictly overhead, and as a synchronization primitive, it forces cache coherence across NUMA nodes, which can be a major hit for performance (not that we won't be using tons of synchronization primitives anyway). We should see if there's an easy way to preserve code reuse while getting rid of this, likely through generics.
Justin Tracey hozzászólt 1 éve
Tulajdonos

Fixed via 1d900f96b3

Fixed via 1d900f96b3
j3tracey lezárta ekkor: 1 éve
Jelentkezzen be hogy csatlakozhasson a beszélgetéshez.
Nincs mérföldkő
Nincs megbízott
1 Résztvevő
Töltés...
Mégse
Mentés
Még nincs tartalom.