Comments (6)
In a multi-threaded single ctx scenarios,other threads enter spinlock,will waste a lot cpu time to busy waiting util the one thread release it.
from uadk.
If we did not bind all thread to one cpu ,the performance gap between spinlock and mutex is very small.
So how should we handle this balance of cpu usage and performance?
from uadk.
In a multi-threaded single ctx scenarios,other threads enter spinlock,will waste a lot cpu time to busy waiting util the one thread release it.
It wasted some cpu time, but it gained the performance.
from uadk.
If we did not bind all thread to one cpu ,the performance gap between spinlock and mutex is very small.
So how should we handle this balance of cpu usage and performance?
Frankly speaking, it's very complex. We downplay the impact on locks. Because of lock, it causes context switch, cache trashing, and so on. All of them could impact the performance. For this case, I can't give a precise answer on which one is improved most since it's hard to measure.
From my view, reducing cpu usage could impact performance. Let's use an example to discuss. If driver/app is polling hardware, it costs a lot of CPU time and gains the performance. If interrupt is used, it saves CPU time and loses the performance.
Up to now, I received the command to tune performance. It means that people are not satisfied on the performance. As my understanding, it's always a trade-off on CPU usage and performance in system. Now it seems that tuning performance is in higher priority.
from uadk.
I have read some dpdk and roce code,they barely use spinlock. When they use it,it had to be used, because the io interface is called in interrupts.
But if we agreed performance have a higher priority than CPU consumption, we should not use mutex in this send and receive process, and I also saw a huge promote from your patch.
At least, we can run all thread on different ctx to reduce lock competition.
from uadk.
Close this issue based on the above discussion.
from uadk.
Related Issues (20)
- test_hisi_hpre sing async mode performance is not stable HOT 3
- kernel integrate vsva patches for verifying vsva feature HOT 3
- uacce support docker HOT 1
- uadk v1 can not work HOT 1
- uadk cipher perfmance is much worse than warpdrive perfmance when using multi-queue by test. HOT 1
- kae on uadk v1 still has issue HOT 2
- zip_sva_perf run hw file decompress failed HOT 1
- digest stream mode not supported
- Potential error(e.g. deadlock, ill performance) due to the unreleased lock HOT 4
- UADK multi-queue scheduling problem HOT 2
- UADK multi-threaded performance issues HOT 2
- uadk can not support nginx since cipher and digest can not re-enter HOT 1
- Can you show the version number in the code? HOT 5
- io page fault
- remove fmin in wd_util.c HOT 1
- libcrypto_wd.so should be libcrypto.so? HOT 1
- apt-get install libnuma-dev has issue after numa source code make install HOT 1
- compilation failure with GCC 12 HOT 1
- 虚拟机跑SEC业务概率出错 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uadk.