If only 2 page frames are queued and code executing in one frame is making an access to memory in the second frame then the access will trap and k_mem_paging_eviction_accessed() will be called to move that frame to the end of the queue ... marking the new head frame unaccessible. But that newly unaccessible frame contains the code that has yet to be resumed to perform its memory access. Since it is now unaccessible, a trap is triggered, the frame is moved to the end of the queue and the new head frame (the one we trapped for initially) is marked unaccessible. Execution is resumed with the memory access which is unaccessible again and the cycle repeats infinitely. Fix this by not marking the new head unaccessible if there is only one queued frame left in the queue. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> |
||
|---|---|---|
| .. | ||
| backing_store | ||
| eviction | ||
| CMakeLists.txt | ||
| Kconfig | ||