From aa0be8ff4cf0608bbe0779f2839f99cefad64d6b Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Tue, 11 Dec 2012 16:01:09 -0800 Subject: [PATCH] --- yaml --- r: 338740 b: refs/heads/master c: e749eb95531ac8349df47f8d46ce2641dcb16589 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/s390/include/asm/page.h | 3 +++ trunk/mm/rmap.c | 8 +++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 7673c2344ca1..171d4a1264fb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 712cd386fdc983d318fecf302a2a9cb8e9de90c9 +refs/heads/master: e749eb95531ac8349df47f8d46ce2641dcb16589 diff --git a/trunk/arch/s390/include/asm/page.h b/trunk/arch/s390/include/asm/page.h index 6d5367060a56..39faa4ac9660 100644 --- a/trunk/arch/s390/include/asm/page.h +++ b/trunk/arch/s390/include/asm/page.h @@ -158,6 +158,9 @@ static inline int page_reset_referenced(unsigned long addr) * race against modification of the referenced bit. This function * should therefore only be called if it is not mapped in any * address space. + * + * Note that the bit gets set whenever page content is changed. That means + * also when the page is modified by DMA or from inside the kernel. */ #define __HAVE_ARCH_PAGE_TEST_AND_CLEAR_DIRTY static inline int page_test_and_clear_dirty(unsigned long pfn, int mapped) diff --git a/trunk/mm/rmap.c b/trunk/mm/rmap.c index 46823fb0e801..cf7e99a87c32 100644 --- a/trunk/mm/rmap.c +++ b/trunk/mm/rmap.c @@ -1151,9 +1151,11 @@ void page_remove_rmap(struct page *page) * containing the swap entry, but page not yet written to swap. * * And we can skip it on file pages, so long as the filesystem - * participates in dirty tracking; but need to catch shm and tmpfs - * and ramfs pages which have been modified since creation by read - * fault. + * participates in dirty tracking (note that this is not only an + * optimization but also solves problems caused by dirty flag in + * storage key getting set by a write from inside kernel); but need to + * catch shm and tmpfs and ramfs pages which have been modified since + * creation by read fault. * * Note that mapping must be decided above, before decrementing * mapcount (which luckily provides a barrier): once page is unmapped,