Lockpages, events and timer assorted fixes#141
Open
jlelli wants to merge 3 commits into
Open
Conversation
- Move page locking (mlockall) to execute before setting thread parameters - Remove forced 'data->lock_pages = 0' override for SCHED_IDLE tasks, as locking pages and scheduling policies are orthogonal and should be configured separately by the user - This ensures page locking happens early in thread initialization The change ensures that when lock_pages is enabled, memory pages are locked before any scheduling policy changes occur, which is important for real-time applications that need deterministic memory access patterns. Especially for SCHED_DEADLINE, locking pages after starting the first iteration might cause deadline misses. Fixes: 5890dd3 ("rt-app: Reorder page locking to properly skip it for SCHED_OTHER/IDLE") Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
So it's easier to understand when a task is actually ready for entering the first actual phase. Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Otherwise timers might be skewed. Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Member
|
The mlock reordering modifies (5890dd3). Locking pages whatever the scheduling policy makes sense to me but I'd like to know what @jan-kiszka thinks about it if it was only because of the data->lock_pages = 0 |
Contributor
|
In general, you don't need to lock pages before you actually start your workload - which might be much later than setting scheduling parameters. But the essence here is that, if you only have non-RT threads, you should not be bothered with page locking by default. In turn, if there is an RT thread, locking should be turned on by default. Everything that achieves this can also perform the locking at any desired point during setup. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move lockpages before setscheduler. Add additional information for lockpages and setscheduler. Reset t_first right before changing scheduling policy so that timers (and in-kernel accounting) is not skewed.