Minor page faults from memory compaction causing in-band transitions
Brandon Ho <[email protected]>
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <SA1P110MB12786D45602F07720B3AEF78D353A@SA1P110MB1278.NAMP110.PROD.OUTLOOK.COM> |
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. We've tried the usual mitigations (disabling THP, MAP_LOCKED, etc.) but compaction can still trigger these faults on already-locked pages. 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! Thanks, Brandon