Comments (4)
That's a good point. You can just let all the SYS_futex calls skip the fake leave mechanism, and the futex wait/wake matching code will ensure they stay synchronous. The reason that's not done right now is that both mechanisms were developed independently.
from zsim.
I would like to compose a pull request for this issue. My current solution is when timeout is detected and we decide to blacklist a fake leave, instead of only do one leave on the current one, do real leave on all fake-leave threads that wait on the same PC of the same process. This could significantly accelerate the progress when many threads are used, as they will likely wait on the same sync primitive. Now we don't need to wait for timeout for each of them.
This modification has minimum change to the current code in schedule.cpp/h, so it will be an easy fix. The most correct thing, however, will be to skip futex altogether.
If you think this is useful, let me know and I will make a pull request.
from zsim.
I think it will be very useful as the runtime can be shortened. Could you share your patch? I want to shorten the runtime of a large application. Thank you.
from zsim.
Mingyu, go ahead & submit the pull request
from zsim.
Related Issues (20)
- Is there any way to enable GDB pretty print for g_std?
- The "cycles" of core is less than "latGETnl"
- scons -j4 error HOT 1
- types_maker.h error HOT 2
- Pin 2.14 for Linux
- How to add a third-party library to zsim and how to modify the sconstruct file?
- zsim building terminated... Need solution..pls help..
- How to link .a library ? HOT 1
- Could not set CPU affinity to 1(Operation not permitted) HOT 1
- Using zsim with pin 2.14 on ubuntu 20.04 (kernel version 5.4.0-104-generic) HOT 7
- No memcopy operator being detected in decoder.cpp HOT 1
- Not able to enable debug logger HOT 1
- Help with enabling debugger
- Question: Does zsim implement anything akin to an alias predictor?
- Implementation of RRIP
- Supporting Modern AVX Instructions
- Deadlock in openmp application
- error in build/opt/zsim
- The way to calculate zllNextPhaseCycle in OOOCoreRecorder::cSimStart seems wrong (?)
- Trace Generator for Detailed Application Analysis
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 zsim.