aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2015-09-04 18:47:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-04 19:54:41 -0400
commitd950c9477d51f0cefc2ed3cf76e695d46af0d9c1 (patch)
treed6ba89db328ec09b2140a84dcdf1bd8ca5cbeaa4 /include/linux/sched.h
parent72b252aed506b8f1a03f7abd29caef4cdf6a043b (diff)
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 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 3c602c20c717..a4ab9daa387c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1354,6 +1354,13 @@ struct tlbflush_unmap_batch {
1354 1354
1355 /* True if any bit in cpumask is set */ 1355 /* True if any bit in cpumask is set */
1356 bool flush_required; 1356 bool flush_required;
1357
1358 /*
1359 * If true then the PTE was dirty when unmapped. The entry must be
1360 * flushed before IO is initiated or a stale TLB entry potentially
1361 * allows an update without redirtying the page.
1362 */
1363 bool writable;
1357}; 1364};
1358 1365
1359struct task_struct { 1366struct task_struct {