Re: Minor page faults from memory compaction causing in-band transitions

Jan Kiszka <[email protected]>
Newsgroups dev.linux.lists.xenomai
Message-ID <[email protected]>
On 01.04.26 01:14, Brandon Ho wrote:
> Hi Xenomai team,
> 
> I'm working on a real-time control application using Xenomai and we've been
> experiencing unexpected in-band transitions caused by minor page faults during
> kernel memory compaction. Even though our RT threads use mlockall(MCL_CURRENT |
> MCL_FUTURE) and we've pre-faulted memory, the kernel's compaction process seems
> to temporarily invalidate PTEs on our locked pages, causing faults when the RT
> thread accesses them.
> 
> Has this issue come up before? I'm wondering if there's a mechanism to reserve
> a section of RAM that's excluded from compaction/migration entirely, or if
> there are kernel/Xenomai configurations we should be using to prevent this.
> 
> Any guidance would be appreciated!

Memory migration as well as compaction are not compatible with
deterministic system behavior. Both Xenomai 3 and 4 should warn about
them, and you should disabling these features in your kernel.
Unfortunately, current kernels do not allow a more fine-grained control.

Jan

-- 
Siemens AG, Foundational Technologies
Linux Expert Center
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.