I’ve been reading that hash map’s update element is atomic and also that we
can use BPF_XADD to make the entire map update atomically.

But I think that doesn’t guarantee that these updates are thread safe,
meaning one cpu core can overwrite other core’s update.

Is there a clean way of keeping them thread safe. Unfortunately I can’t use
per-cpu maps as I need global counters.

And spin locks sounds a costly operation. Can you please throw some light?



Links: You receive all messages sent to this group.

View/Reply Online (#1853): https://lists.iovisor.org/g/iovisor-dev/message/1853
Mute This Topic: https://lists.iovisor.org/mt/74407447/21656
Group Owner: iovisor-dev+ow...@lists.iovisor.org
Unsubscribe: https://lists.iovisor.org/g/iovisor-dev/unsub  

Reply via email to