mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
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>
This commit is contained in:
parent
72b252aed5
commit
d950c9477d
4 changed files with 38 additions and 8 deletions
|
|
@ -1354,6 +1354,13 @@ struct tlbflush_unmap_batch {
|
|||
|
||||
/* True if any bit in cpumask is set */
|
||||
bool flush_required;
|
||||
|
||||
/*
|
||||
* If true then the PTE was dirty when unmapped. The entry must be
|
||||
* flushed before IO is initiated or a stale TLB entry potentially
|
||||
* allows an update without redirtying the page.
|
||||
*/
|
||||
bool writable;
|
||||
};
|
||||
|
||||
struct task_struct {
|
||||
|
|
|
|||
Loading…
Reference in a new issue