Song Liu 75f360696c mm/thp: flush file for !is_shmem PageDirty() case in collapse_file()
For non-shmem file THPs, khugepaged only collapses read only .text
mapping (VM_DENYWRITE).  These pages should not be dirty except the case
where the file hasn't been flushed since first write.

Call filemap_flush() in collapse_file() to accelerate the write back in
such cases.

Link: http://lkml.kernel.org/r/20191106060930.2571389-3-songliubraving@fb.com
Signed-off-by: Song Liu <songliubraving@fb.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: William Kucharski <william.kucharski@oracle.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-12-01 12:59:09 -08:00
..
2019-08-30 22:43:58 -07:00
2019-11-30 10:33:14 -08:00
2019-11-30 10:33:14 -08:00
2019-09-25 17:51:41 -07:00
2018-06-07 17:34:36 -07:00
2019-09-24 15:54:08 -07:00
2019-09-04 13:40:49 -07:00
2019-12-01 06:29:17 -08:00
2019-12-01 06:29:18 -08:00
2019-09-17 15:20:17 -07:00
2019-12-01 12:59:07 -08:00
2019-09-24 15:54:12 -07:00