Commit 0a2dd266 authored by Minchan Kim's avatar Minchan Kim Committed by Linus Torvalds
Browse files

mm: make tlb_flush_pending global

Currently, tlb_flush_pending is used only for CONFIG_[NUMA_BALANCING|
COMPACTION] but upcoming patches to solve subtle TLB flush batching
problem will use it regardless of compaction/NUMA so this patch doesn't
remove the dependency.

[ remove more ifdefs from world's ugliest printk statement]

Signed-off-by: default avatarMinchan Kim <>
Signed-off-by: default avatarNadav Amit <>
Acked-by: default avatarMel Gorman <>
Cc: "David S. Miller" <>
Cc: Andrea Arcangeli <>
Cc: Andy Lutomirski <>
Cc: Heiko Carstens <>
Cc: Hugh Dickins <>
Cc: Ingo Molnar <>
Cc: Jeff Dike <>
Cc: Martin Schwidefsky <>
Cc: Mel Gorman <>
Cc: Nadav Amit <>
Cc: Rik van Riel <>
Cc: Russell King <>
Cc: Sergey Senozhatsky <>
Cc: Tony Luck <>
Cc: Yoshinori Sato <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 56236a59
......@@ -487,14 +487,12 @@ struct mm_struct {
/* numa_scan_seq prevents two threads setting pte_numa */
int numa_scan_seq;
* An operation with batched TLB flushing is going on. Anything that
* can move process memory needs to flush the TLB when moving a
* PROT_NONE or PROT_NUMA mapped page.
atomic_t tlb_flush_pending;
/* See flush_tlb_batched_pending() */
bool tlb_flush_batched;
......@@ -528,7 +526,6 @@ extern void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm,
extern void tlb_finish_mmu(struct mmu_gather *tlb,
unsigned long start, unsigned long end);
* Memory barriers to keep this state in sync are graciously provided by
* the page table locks, outside of which no page table modifications happen.
......@@ -569,24 +566,6 @@ static inline void dec_tlb_flush_pending(struct mm_struct *mm)
static inline bool mm_tlb_flush_pending(struct mm_struct *mm)
return false;
static inline void init_tlb_flush_pending(struct mm_struct *mm)
static inline void inc_tlb_flush_pending(struct mm_struct *mm)
static inline void dec_tlb_flush_pending(struct mm_struct *mm)
struct vm_fault;
......@@ -124,9 +124,7 @@ void dump_mm(const struct mm_struct *mm)
"numa_next_scan %lu numa_scan_offset %lu numa_scan_seq %d\n"
"tlb_flush_pending %d\n"
"def_flags: %#lx(%pGv)\n",
mm, mm->mmap, mm->vmacache_seqnum, mm->task_size,
......@@ -158,9 +156,7 @@ void dump_mm(const struct mm_struct *mm)
mm->numa_next_scan, mm->numa_scan_offset, mm->numa_scan_seq,
mm->def_flags, &mm->def_flags
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment