Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check atomics support #6

Merged

Conversation

saubhik
Copy link
Owner

@saubhik saubhik commented Sep 29, 2021

Check if std::atomic works fine using Shenango threads. It does work fine.

saubhik@node-0:/proj/quic-server-PG0/users/saubhik/caladan/apps/test$ ./test ../../server.config 100
CPU 11| <5> cpu: detected 20 cores, 1 nodes
CPU 11| <5> time: detected 2394 ticks / us
[  0.000646] CPU 11| <5> loading configuration from '../../server.config'
[  0.001075] CPU 11| <5> cfg: provisioned 4 cores (4 guaranteed, 0 burstable, 0 spinning)
[  0.001087] CPU 11| <5> cfg: task is latency critical (LC)
[  0.001096] CPU 11| <5> cfg: THRESH_QD: 10, THRESH_HT: 0
[  0.001105] CPU 11| <5> cfg: storage disabled, directpath disabled
[  0.001124] CPU 11| <5> process pid: 13084
[  0.030245] CPU 11| <5> net: started network stack
[  0.030258] CPU 11| <5> net: using the following configuration:
[  0.030261] CPU 11| <5>   addr:        192.168.1.3
[  0.030266] CPU 11| <5>   netmask:     255.255.255.0
[  0.030269] CPU 11| <5>   gateway:     192.168.1.1
[  0.030272] CPU 11| <5>   mac:         D2:35:79:2F:2F:3B
[  0.030278] CPU 11| <5>   mtu:         1500
[  0.030390] CPU 11| <5> thread: created thread 0
[  0.030451] CPU 11| <5> spawning 4 kthreads
[  0.030548] CPU 12| <5> thread: created thread 1
[  0.030596] CPU 13| <5> thread: created thread 2
[  0.030663] CPU 15| <5> thread: created thread 3
[  0.045950] CPU 11| <5> thread #0 won!
[  0.285969] CPU 11| <5> test complete
[  0.285975] CPU 11| <5> init: shutting down -> SUCCESS
saubhik@node-0:/proj/quic-server-PG0/users/saubhik/caladan/apps/test$ ./test ../../server.config 100
CPU 01| <5> cpu: detected 20 cores, 1 nodes
CPU 01| <5> time: detected 2394 ticks / us
[  0.000656] CPU 01| <5> loading configuration from '../../server.config'
[  0.001013] CPU 01| <5> cfg: provisioned 4 cores (4 guaranteed, 0 burstable, 0 spinning)
[  0.001025] CPU 01| <5> cfg: task is latency critical (LC)
[  0.001033] CPU 01| <5> cfg: THRESH_QD: 10, THRESH_HT: 0
[  0.001040] CPU 01| <5> cfg: storage disabled, directpath disabled
[  0.001058] CPU 01| <5> process pid: 13108
[  0.030289] CPU 01| <5> net: started network stack
[  0.030302] CPU 01| <5> net: using the following configuration:
[  0.030305] CPU 01| <5>   addr:        192.168.1.3
[  0.030308] CPU 01| <5>   netmask:     255.255.255.0
[  0.030312] CPU 01| <5>   gateway:     192.168.1.1
[  0.030314] CPU 01| <5>   mac:         2A:47:4C:00:38:0E
[  0.030321] CPU 01| <5>   mtu:         1500
[  0.030431] CPU 01| <5> thread: created thread 0
[  0.030492] CPU 01| <5> spawning 4 kthreads
[  0.030621] CPU 12| <5> thread: created thread 1
[  0.030634] CPU 13| <5> thread: created thread 2
[  0.030684] CPU 14| <5> thread: created thread 3
[  0.045864] CPU 11| <5> thread #2 won!
[  0.285884] CPU 11| <5> test complete
[  0.285890] CPU 11| <5> init: shutting down -> SUCCESS

Also, std::memory_order seems to work fine. But cannot say deterministically.

@saubhik saubhik merged commit 81de012 into feature/shenango-threads-folly Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant