Mark a page with _PAGE_NEWPROT on pte_mkold() to get it remapped not-readable
on the host when it is not marked as accessed, to be able to emulate correctly
the accessed bit.
This patch, as said in the comment for the previous one (fixing this for
pte_mkclean()) should be merged only after benchmarking, since the additional
costs for the read faults are very big (a lot bigger than on the host).
Possibly, increasing the timeout for scanning pages and marking them as
accessed could be useful for us.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[email protected]>
---
linux-2.6.git-paolo/include/asm-um/pgtable.h | 3 +++
1 files changed, 3 insertions(+)
diff -puN include/asm-um/pgtable.h~uml-fix-tlb-flushing-accessed include/asm-um/pgtable.h
--- linux-2.6.git/include/asm-um/pgtable.h~uml-fix-tlb-flushing-accessed 2005-07-28 20:53:57.000000000 +0200
+++ linux-2.6.git-paolo/include/asm-um/pgtable.h 2005-07-28 20:53:57.000000000 +0200
@@ -268,6 +268,9 @@ static inline pte_t pte_mkclean(pte_t pt
static inline pte_t pte_mkold(pte_t pte)
{
pte_clear_bits(pte, _PAGE_ACCESSED);
+ /* We want that next flush makes this page again not-readable, so we'll
+ * mark it as accessed again */
+ pte_set_bits(pte, _PAGE_NEWPROT);
return(pte);
}
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|