summaryrefslogtreecommitdiffstats
path: root/mm/internal.h
diff options
context:
space:
mode:
authorMel Gorman2015-09-05 00:47:35 +0200
committerLinus Torvalds2015-09-05 01:54:41 +0200
commitd950c9477d51f0cefc2ed3cf76e695d46af0d9c1 (patch)
treed6ba89db328ec09b2140a84dcdf1bd8ca5cbeaa4 /mm/internal.h
parentmm: send one IPI per CPU to TLB flush all entries after unmapping pages (diff)
downloadkernel-qcow2-linux-d950c9477d51f0cefc2ed3cf76e695d46af0d9c1.tar.gz
kernel-qcow2-linux-d950c9477d51f0cefc2ed3cf76e695d46af0d9c1.tar.xz
kernel-qcow2-linux-d950c9477d51f0cefc2ed3cf76e695d46af0d9c1.zip
mm: defer flush of writable TLB entries
If a PTE is unmapped and it's dirty then it was writable recently. Due to deferred TLB flushing, it's best to assume a writable TLB cache entry exists. With that assumption, the TLB must be flushed before any IO can start or the page is freed to avoid lost writes or data corruption. This patch defers flushing of potentially writable TLBs as long as possible. Signed-off-by: Mel Gorman <mgorman@suse.de> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Dave Hansen <dave.hansen@intel.com> Acked-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/internal.h')
-rw-r--r--mm/internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/internal.h b/mm/internal.h
index bd6372ac5f7f..1195dd2d6a2b 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -431,10 +431,14 @@ struct tlbflush_unmap_batch;
#ifdef CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
void try_to_unmap_flush(void);
+void try_to_unmap_flush_dirty(void);
#else
static inline void try_to_unmap_flush(void)
{
}
+static inline void try_to_unmap_flush_dirty(void)
+{
+}
#endif /* CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH */
#endif /* __MM_INTERNAL_H */