0

I understand how dirty bit in Linux is emulated, but I am confused about accessed/young bit.

How does the MMU differentiate between the real page fault and the one that is generated from further accesses. In other words, does Linux reset the last two bits of Hardware PTE to "00" or not?

I already read How does ARM Linux emulate the dirty, accessed, and file bits of a PTE?, however it does not specifically says which exact bits in both Linux PTE and Hardware PTE are manipulated to emulate the access bit?

Community
  • 1
  • 1
Hoda
  • 63
  • 7
  • It is the same as dirty, only instead of a 'read-only' page, it is not mapped. It is like a paging fault. Linux can tell the difference because it looks at the synthetic Linux PTE values and sees a 'young' bit. The ARM hardware PTE values depend on the particular ARM CPU. They generate a fault on any access. – artless noise Apr 19 '16 at 12:27
  • Possible duplicate of [How does ARM Linux emulate the dirty, accessed, and file bits of a PTE?](http://stackoverflow.com/questions/32943129/how-does-arm-linux-emulate-the-dirty-accessed-and-file-bits-of-a-pte) – artless noise Apr 19 '16 at 12:27
  • @artlessnoise , so you mean as long as the accessed/young bit in Linux PTE is 0, page faults will be generated. – Hoda Apr 19 '16 at 16:41
  • No, the Linux PTE values tell Linux why it faulted; you asked how does Linux know the difference. The fault values will be whatever is appropriate for the ARM MMU. They can be different depending on CPU type and Linux version (features used). – artless noise Apr 20 '16 at 02:29
  • @artlessnoise , my point is, as long as accessed/young bit in linux is zero, the Linux sets the validity bit in hardware PTE to zero and so the program experiences the page fault, right? – Hoda Apr 20 '16 at 16:57

0 Answers0