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

Change in uclamp fails if not accompanied by policy #114

Open
douglas-raillard-arm opened this issue Feb 9, 2021 · 0 comments · May be fixed by #113
Open

Change in uclamp fails if not accompanied by policy #114

douglas-raillard-arm opened this issue Feb 9, 2021 · 0 comments · May be fixed by #113

Comments

@douglas-raillard-arm
Copy link

The following JSON currently fails in the sched_setattr() syscall for uclamp:

{
    "tasks" : {
        "task1" : {
            "loop" : 1,
            "phases" : {
                "1" : {
                    "policy": "SCHED_FIFO",
                    "util_min": 256,
                    "run" : 3
                },
                "2" : {
                    "util_min": 512,
                    "run" : 3
                }
            }
        }
    },
    "global" : {
        "default_policy" : "SCHED_OTHER",
        "duration" : 1,
        "gnuplot" : false,
        "logdir" : "./",
        "log_basename" : "testrtapp",
        "lock_pages" : false,
        "frag" : 1,
        "calibration" : 63
    }
}

The reason is that the policy and priority in phase 2 are not set. Therefore, the internal special values THREAD_PRIORITY_UNCHANGED for priority and same for policy will be passed to the sched_setattr() call used for uclamp. Since they are not valid, the kernel rejects them.

@douglas-raillard-arm douglas-raillard-arm linked a pull request Feb 9, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant