]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: softdirty: make freshly remapped file pages being softdirty unconditionally
authorCyrill Gorcunov <gorcunov@openvz.org>
Wed, 14 May 2014 00:01:37 +0000 (10:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 May 2014 00:01:37 +0000 (10:01 +1000)
commit34c97bcba497e3221dab2d13c7140fbb84f01f53
tree48e0074138425fe42f1e99eb6cef7b9aca734660
parent0a90fabc6d250457c3a6a1ffa11543c41b765d78
mm: softdirty: make freshly remapped file pages being softdirty unconditionally

Hugh reported:

 | I noticed your soft_dirty work in install_file_pte(): which looked
 | good at first, until I realized that it's propagating the soft_dirty
 | of a pte it's about to zap completely, to the unrelated entry it's
 | about to insert in its place.  Which seems very odd to me.

Indeed this code ends up being nop in result -- pte_file_mksoft_dirty()
operates with pte_t argument and returns new pte_t which were never used
after.  After looking more I think what we need is to soft-dirtify all
newely remapped file pages because it should look like a new mapping for
memory tracker.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reported-by: Hugh Dickins <hughd@google.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/fremap.c