PTE is dirty only when _PAGE_DIRTY bit is set, not _PAGE_SOFT_DIRTY.
This misbehavior was introduced on importing RHEL7 kernel-3.10.0-229.7.2.el7
So, it seems to be the reason of twice writeback of mapped files &
similar issues.

See also: jira.sw.ru/browse/PSBM-42094

Signed-off-by: Dmitry Safonov <[email protected]>
Cc: Cyrill Gorcunov <[email protected]>
Cc: Vladimir Davydov <[email protected]>
Cc: Konstantin Khorenko <[email protected]>
---
 arch/x86/include/asm/pgtable.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index f909164..da8b030 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -90,7 +90,7 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page);
  */
 static inline int pte_dirty(pte_t pte)
 {
-       return pte_flags(pte) & (_PAGE_DIRTY | _PAGE_SOFT_DIRTY);
+       return pte_flags(pte) & _PAGE_DIRTY;
 }
 
 static inline int pte_young(pte_t pte)
-- 
2.6.4

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to