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

Kapalı
j3tracey tarafından 1 yıl önce kere açıldı · 1 yorum
Justin Tracey 1 yıl önce olarak yorumlandı

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 1 yıl önce olarak yorumlandı
Sahibi

Fixed via 1d900f96b3

Fixed via 1d900f96b3
Giriş yap bu konuşmaya katılmak için.
Kilometre Taşı Yok
Atanan Kişi Yok
1 Katılımcı
Yükleniyor...
İptal
Kaydet
Henüz bir içerik yok.