Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1709618

Re: [PATCH v6 6/7] mm: fix MADV_[FREE|DONTNEED] TLB flush miss problem

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v6 6/7] mm: fix MADV_[FREE|DONTNEED] TLB flush miss problem
Date 2017-08-11 15:40 +0200
Message-ID <udikp-47p-13@gated-at.bofh.it> (permalink)
References <u9Wq6-6U6-5@gated-at.bofh.it> <u9Wq6-6U6-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Aug 01, 2017 at 05:08:17PM -0700, Nadav Amit wrote:
>  void tlb_finish_mmu(struct mmu_gather *tlb,
>  		unsigned long start, unsigned long end)
>  {
> -	arch_tlb_finish_mmu(tlb, start, end);
> +	/*
> +	 * If there are parallel threads are doing PTE changes on same range
> +	 * under non-exclusive lock(e.g., mmap_sem read-side) but defer TLB
> +	 * flush by batching, a thread has stable TLB entry can fail to flush
> +	 * the TLB by observing pte_none|!pte_dirty, for example so flush TLB
> +	 * forcefully if we detect parallel PTE batching threads.
> +	 */
> +	bool force = mm_tlb_flush_nested(tlb->mm);
> +
> +	arch_tlb_finish_mmu(tlb, start, end, force);
>  }

I don't understand the comment nor the ordering. What guarantees we see
the increment if we need to?

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v6 6/7] mm: fix MADV_[FREE|DONTNEED] TLB flush miss problem Nadav Amit <namit@vmware.com> - 2017-08-02 09:40 +0200
  Re: [lkp-robot] [mm]  7674270022:  will-it-scale.per_process_ops  -19.3% regression Minchan Kim <minchan@kernel.org> - 2017-08-08 04:30 +0200
    Re: [lkp-robot] [mm]  7674270022:  will-it-scale.per_process_ops  -19.3% regression Nadav Amit <nadav.amit@gmail.com> - 2017-08-08 06:30 +0200
      Re: [lkp-robot] [mm]  7674270022:  will-it-scale.per_process_ops  -19.3% regression Nadav Amit <nadav.amit@gmail.com> - 2017-08-08 08:00 +0200
        Re: [lkp-robot] [mm]  7674270022:  will-it-scale.per_process_ops  -19.3% regression Minchan Kim <minchan@kernel.org> - 2017-08-08 10:10 +0200
          Re: [lkp-robot] [mm]  7674270022:  will-it-scale.per_process_ops  -19.3% regression Ye Xiaolong <xiaolong.ye@intel.com> - 2017-08-09 03:30 +0200
          Re: [lkp-robot] [mm]  7674270022:  will-it-scale.per_process_ops  -19.3% regression Ye Xiaolong <xiaolong.ye@intel.com> - 2017-08-09 05:10 +0200
            Re: [lkp-robot] [mm]  7674270022:  will-it-scale.per_process_ops  -19.3% regression Minchan Kim <minchan@kernel.org> - 2017-08-10 06:20 +0200
              Re: [lkp-robot] [mm]  7674270022:  will-it-scale.per_process_ops  -19.3% regression Nadav Amit <nadav.amit@gmail.com> - 2017-08-10 06:20 +0200
                Re: [lkp-robot] [mm]  7674270022:  will-it-scale.per_process_ops  -19.3% regression Minchan Kim <minchan@kernel.org> - 2017-08-10 06:30 +0200
  Re: [PATCH v6 6/7] mm: fix MADV_[FREE|DONTNEED] TLB flush miss  problem Peter Zijlstra <peterz@infradead.org> - 2017-08-11 15:40 +0200
    Re: [PATCH v6 6/7] mm: fix MADV_[FREE|DONTNEED] TLB flush miss  problem Nadav Amit <namit@vmware.com> - 2017-08-13 08:20 +0200
      Re: [PATCH v6 6/7] mm: fix MADV_[FREE|DONTNEED] TLB flush miss  problem Peter Zijlstra <peterz@infradead.org> - 2017-08-13 14:10 +0200
    Re: [PATCH v6 6/7] mm: fix MADV_[FREE|DONTNEED] TLB flush miss  problem Minchan Kim <minchan@kernel.org> - 2017-08-14 03:30 +0200

csiph-web