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

vine: mainloop improvements #3387

Merged
merged 12 commits into from
Aug 14, 2023

Conversation

colinthomas-z80
Copy link
Contributor

WIP

@dthain
Copy link
Member

dthain commented Jul 6, 2023

This makes sense so far, but I will wait to merge until making the next release...

Copy link
Member

@dthain dthain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, one thing to make tunable.

taskvine/src/manager/vine_perf_log.c Outdated Show resolved Hide resolved
@dthain
Copy link
Member

dthain commented Jul 17, 2023

Status on this one?

@colinthomas-z80
Copy link
Contributor Author

@dthain I will add the tune option and then it should be good to go

@colinthomas-z80
Copy link
Contributor Author

do not merge yet, investigating issue

@colinthomas-z80
Copy link
Contributor Author

bug fixed in #3412

Copy link
Member

@dthain dthain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there, last few things.

taskvine/src/manager/vine_manager.h Outdated Show resolved Hide resolved
taskvine/src/manager/vine_manager.c Outdated Show resolved Hide resolved
taskvine/src/manager/vine_perf_log.c Outdated Show resolved Hide resolved
@dthain
Copy link
Member

dthain commented Aug 7, 2023

@colinthomas-z80 don't forget this one...

Copy link
Member

@dthain dthain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the right track, but we need extra care in ensuring each task is in one list at a time.

taskvine/src/manager/vine_manager.c Outdated Show resolved Hide resolved
taskvine/src/manager/vine_manager.c Outdated Show resolved Hide resolved
taskvine/src/manager/vine_manager.c Outdated Show resolved Hide resolved
taskvine/src/manager/vine_manager.c Show resolved Hide resolved
taskvine/src/manager/vine_manager.c Show resolved Hide resolved
taskvine/src/manager/vine_manager.c Outdated Show resolved Hide resolved
@dthain
Copy link
Member

dthain commented Aug 9, 2023

Please stop by to talk, I think it's easier to explain in person...

@colinthomas-z80
Copy link
Contributor Author

@dthain I moved the mechanism of removing/adding to any task state list to change_task_state.

There are a few separate scenarios where we might change tasks to VINE_TASK_RETRIEVED so that motivates keeping list operations in a single place.

@dthain
Copy link
Member

dthain commented Aug 9, 2023

Ah, I think you took my advice in the opposite direction.

Your code assumes that a task always marches through the states linearly from READY to DONE.
But that's not the case b/c it can also do these things:

  • RUNNING -> CANCELLED
  • READY -> RUNNING
  • READY -> DONE

So, I don't think it is quite right for change_task_state to do the pops as well as the pushes.

I think what you want here is for each action in the code to remove a task from a data structure, consider what to do with it, and then either put it back or call change_task_state.

Under that model, change_task_statewould only push things onto the data structures.

Copy link
Member

@dthain dthain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there

taskvine/src/manager/vine_manager.c Outdated Show resolved Hide resolved
taskvine/src/manager/vine_manager.c Show resolved Hide resolved
taskvine/src/manager/vine_manager.c Outdated Show resolved Hide resolved
@dthain dthain self-requested a review August 14, 2023 19:39
@dthain dthain merged commit 0dc8e30 into cooperative-computing-lab:master Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants