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

scx_lavd: comp_preemption_info lat_cri #773

Closed
archerbroler opened this issue Oct 10, 2024 · 1 comment
Closed

scx_lavd: comp_preemption_info lat_cri #773

archerbroler opened this issue Oct 10, 2024 · 1 comment
Assignees

Comments

@archerbroler
Copy link

In this code, smaller lat_cri can preempt larger value. Should it be the larger one preempt smaller value?
I think the more latenct crical the task is, the more chance it can run.

static int comp_preemption_info(struct preemption_info *prm_a,
				struct preemption_info *prm_b)
{
	/*
	 * Check if one's latency priority _or_ deadline is smaller or not.
	 */
	if ((prm_a->lat_cri < prm_b->lat_cri) ||
	    (prm_a->stopping_tm_est_ns < prm_b->stopping_tm_est_ns))
		return -1;
	if ((prm_a->lat_cri > prm_b->lat_cri) ||
	    (prm_a->stopping_tm_est_ns > prm_b->stopping_tm_est_ns))
		return 1;
	return 0;
}
@multics69
Copy link
Contributor

Thanks @archerbroler ! That's a good catch. I fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants