Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1701797
| From | Nadav Amit <namit@vmware.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v6 5/7] mm: make tlb_flush_pending global |
| Date | 2017-08-02 09:40 +0200 |
| Message-ID | <u9Wq7-6U6-23@gated-at.bofh.it> (permalink) |
| References | <u9Wq6-6U6-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Minchan Kim <minchan@kernel.org>
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.
Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Nadav Amit <namit@vmware.com>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
---
include/linux/mm_types.h | 21 ---------------------
mm/debug.c | 2 --
2 files changed, 23 deletions(-)
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 248f4ed1f3e1..fc44315df47a 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -487,14 +487,12 @@ struct mm_struct {
/* numa_scan_seq prevents two threads setting pte_numa */
int numa_scan_seq;
#endif
-#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
/*
* 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;
-#endif
struct uprobes_state uprobes_state;
#ifdef CONFIG_HUGETLB_PAGE
atomic_long_t hugetlb_usage;
@@ -524,7 +522,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);
-#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
/*
* Memory barriers to keep this state in sync are graciously provided by
* the page table locks, outside of which no page table modifications happen.
@@ -565,24 +562,6 @@ static inline void dec_tlb_flush_pending(struct mm_struct *mm)
smp_mb__before_atomic();
atomic_dec(&mm->tlb_flush_pending);
}
-#else
-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)
-{
-}
-#endif
struct vm_fault;
diff --git a/mm/debug.c b/mm/debug.c
index d70103bb4731..18a9b15b1e37 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -158,9 +158,7 @@ void dump_mm(const struct mm_struct *mm)
#ifdef CONFIG_NUMA_BALANCING
mm->numa_next_scan, mm->numa_scan_offset, mm->numa_scan_seq,
#endif
-#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
atomic_read(&mm->tlb_flush_pending),
-#endif
mm->def_flags, &mm->def_flags
);
}
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v6 0/7] fixes of TLB batching races Nadav Amit <namit@vmware.com> - 2017-08-02 09:40 +0200
[PATCH v6 5/7] mm: make tlb_flush_pending global Nadav Amit <namit@vmware.com> - 2017-08-02 09:40 +0200
Re: [PATCH v6 5/7] mm: make tlb_flush_pending global Minchan Kim <minchan@kernel.org> - 2017-08-03 01:30 +0200
Re: [PATCH v6 5/7] mm: make tlb_flush_pending global Andrew Morton <akpm@linux-foundation.org> - 2017-08-03 01:30 +0200
Re: [PATCH v6 5/7] mm: make tlb_flush_pending global Minchan Kim <minchan@kernel.org> - 2017-08-03 01:40 +0200
Re: [PATCH v6 5/7] mm: make tlb_flush_pending global kbuild test robot <lkp@intel.com> - 2017-08-03 18:50 +0200
[PATCH v6 4/7] mm: refactoring TLB gathering API Nadav Amit <namit@vmware.com> - 2017-08-02 09:40 +0200
Re: [PATCH v6 4/7] mm: refactoring TLB gathering API Peter Zijlstra <peterz@infradead.org> - 2017-08-11 11:30 +0200
Re: [PATCH v6 4/7] mm: refactoring TLB gathering API Nadav Amit <nadav.amit@gmail.com> - 2017-08-11 19:20 +0200
Re: [PATCH v6 0/7] fixes of TLB batching races Minchan Kim <minchan@kernel.org> - 2017-08-03 01:30 +0200
csiph-web