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

get rid of a useless hartYield for executeOn #101

Merged
merged 3 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pando-rt/src/drvx/cores.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ bool Cores::CoreActiveFlag::operator*() const noexcept {
}

Cores::TaskQueue* Cores::getTaskQueue(Place place) noexcept {
if(*toNativeDrvPtr(coreState, place) != +CoreState::Ready) return nullptr;
return *toNativeDrvPtr(coreQueue, place);
}

Expand Down
2 changes: 1 addition & 1 deletion pando-rt/src/execute_on.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Status detail::executeOn(Place place, Task task) {

auto* queue = Cores::getTaskQueue(place);
const auto result = queue->enqueue(std::move(task));
hartYield();
//hartYield();
return result;

#else
Expand Down
2 changes: 1 addition & 1 deletion pando-rt/src/start.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ extern "C" int __start(int argc, char** argv) {
case SchedulerFailState::STEAL:
for(std::int8_t i = 0; i <= coreDims.x && !task.has_value(); i++) {
auto* otherQueue = pando::Cores::getTaskQueue(pando::Place{thisPlace.node, thisPlace.pod, pando::CoreIndex(i, 0)});
if(otherQueue == queue) {continue;}
if(!otherQueue || otherQueue == queue) {continue;}
if(otherQueue->getApproxSize() > STEAL_THRESH_HOLD_SIZE) {
task = otherQueue->tryDequeue();
}
Expand Down
Loading