Thread (14 messages) 14 messages, 4 authors, 2014-07-09
STALE4341d REVIEWED: 1 (0M)
Revisions (12)
  1. v10 [diff vs current]
  2. v11 current
  3. v12 [diff vs current]
  4. v13 [diff vs current]
  5. v14 [diff vs current]
  6. v15 [diff vs current]
  7. v16 [diff vs current]
  8. v17 [diff vs current]
  9. v1 [diff vs current]
  10. v2 [diff vs current]
  11. v4 [diff vs current]
  12. v5 [diff vs current]

[PATCH v11 5/7] s390: add pmd_[dirty|mkclean] for THP

From: Minchan Kim <minchan@kernel.org>
Date: 2014-07-08 06:03:54
Also in: linux-mm, linux-s390, lkml
Subsystem: s390 architecture, s390 mm, the rest · Maintainers: Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Gerald Schaefer, Linus Torvalds

MADV_FREE needs pmd_dirty and pmd_mkclean for detecting recent
overwrite of the contents since MADV_FREE syscall is called for
THP page but for s390 pmds only referenced bit is available
because there is no free bit left in the pmd entry for the
software dirty bit so this patch adds dumb pmd_dirty which
returns always true by suggesting by Martin.

They finally find a solution in future.
http://marc.info/?l=linux-api&m=140440328820808&w=2

Cc: Martin Schwidefsky <redacted>
Cc: Heiko Carstens <redacted>
Cc: Dominik Dingel <redacted>
Cc: Christian Borntraeger <redacted>
Cc: linux-s390@vger.kernel.org
Acked-by: Gerald Schaefer <redacted>
Signed-off-by: Minchan Kim <minchan@kernel.org>
---
 arch/s390/include/asm/pgtable.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index fcba5e03839f..9862fcb0592b 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -1586,6 +1586,18 @@ static inline pmd_t pmd_mkdirty(pmd_t pmd)
 	return pmd;
 }
 
+static inline int pmd_dirty(pmd_t pmd)
+{
+	/* No dirty bit in the segment table entry */
+	return 1;
+}
+
+static inline pmd_t pmd_mkclean(pmd_t pmd)
+{
+	/* No dirty bit in the segment table entry */
+	return pmd;
+}
+
 #define __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG
 static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma,
 					    unsigned long address, pmd_t *pmdp)
-- 
2.0.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help