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

[Question] logic in preempt action #3694

Open
vf827393 opened this issue Aug 27, 2024 · 1 comment
Open

[Question] logic in preempt action #3694

vf827393 opened this issue Aug 27, 2024 · 1 comment
Labels
kind/question Categorizes issue related to a new question

Comments

@vf827393
Copy link

vf827393 commented Aug 27, 2024

Please describe your problem in detail

In preempt action, I see preempt logic like:

// Preemption between Jobs within Queue.
for _, queue := range queues {  // loop 1
    for {...  // loop 2
    }

    // Preemption between Task within Job.
    for _, job := range underRequest {...  // loop 3
    }
}

I'm kind of confused of the position of loop 3. Maybe it can be moved out of loop 1, since it seems to have no relation with queue.

I think in some case it may bring large overhead. Let me if I miss any consideration. thx

@vf827393 vf827393 added the kind/question Categorizes issue related to a new question label Aug 27, 2024
@Monokaix
Copy link
Member

Monokaix commented Sep 2, 2024

I think that the difference is that loop2 only consider preempt between jobs and loop3 consider preempt within jobs, we can know the differencr by checking the filtre func param of preempt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Categorizes issue related to a new question
Projects
None yet
Development

No branches or pull requests

2 participants