-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Implement ticket spinlock #10605
Implement ticket spinlock #10605
Conversation
44ed929
to
7273fbe
Compare
You should try to stress it more to see if you don't hit any dead-locking on one cpu, process timing is important, so try to process heavy / greedy calls in each context, like allocating, read-write file, socket streams (triggering nasty interrupts in the middle), leaking memory on purpose, calls to getpid and alike, anything that is known to be resource system intensive. |
4ba48af
to
45171fc
Compare
I have two question:
Could you explain more detail? |
f333435
to
f62eca2
Compare
I think you can use QEMU or even the SIM on Linux, but you will need to add some instrumentation to confirm everything is working as expected. |
I try following doc to enable INSTRUMENTATION. This result is different from what I excepted. |
6840139
to
c698734
Compare
no there are good calls as is, that's because they will block and will forcibly trigger all sort of events in the middle, such in a unpredictable order, so context switch will happen and a lot, so if you wish: producing mess on purpose. Qemu on a good host is ok if host and slave share the same arch, meanwhile having a physical board is a must, real clock. |
You need redirect the output to file and open it with https://ui.perfetto.dev/ or https://eclipse.dev/tracecompass/. |
fc2b66b
to
35b7e80
Compare
35b7e80
to
a39e404
Compare
d6e7fde
to
635ff05
Compare
bac2470
to
07d0dac
Compare
8d148bb
to
5f7f00d
Compare
please run './tools/refresh.sh qemu-armv8a/nsh_smp' to fix the ci error. |
Done. |
The style need fix too:
you can verify locally by:
|
test config: ./tools/configure.sh -l qemu-armv8a:nsh_smp Pass ostest No matter big-endian or little-endian, ticket spinlock only check the next and the owner is equal or not. If they are equal, it means there is a task hold the lock or lock is free. Signed-off-by: TaiJu Wu <[email protected]> Co-authored-by: Xiang Xiao <[email protected]>
This is nxstyle issue. The formatting tool seems not to consider the case of nest curly brackets. |
9c3ac47
to
b30307a
Compare
7ba101e
to
c3535e6
Compare
Summary
A proposal to slove #1488
Implement ticket spinlock.
Impact
spinlock
Testing
./tools/configure.sh -l qemu-armv8a:nsh_smp
pass ostest