Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1489851
| From | Mel Gorman <mgorman@techsingularity.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm: delete unnecessary and unsafe init_tlb_ubc() |
| Date | 2016-09-23 10:50 +0200 |
| Message-ID | <skulc-1p5-9@gated-at.bofh.it> (permalink) |
| References | <skgie-VW-53@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Sep 22, 2016 at 10:41:50AM -0700, Hugh Dickins wrote:
> init_tlb_ubc() looked unnecessary to me: tlb_ubc is statically initialized
> with zeroes in the init_task, and copied from parent to child while it is
> quiescent in arch_dup_task_struct(); so I went to delete it.
>
> But inserted temporary debug WARN_ONs in place of init_tlb_ubc() to check
> that it was always empty at that point, and found them firing: because
> memcg reclaim can recurse into global reclaim (when allocating biosets
> for swapout in my case), and arrive back at the init_tlb_ubc() in
> shrink_node_memcg().
>
> Resetting tlb_ubc.flush_required at that point is wrong: if the upper
> level needs a deferred TLB flush, but the lower level turns out not to,
> we miss a TLB flush. But fortunately, that's the only part of the
> protocol that does not nest: with the initialization removed, cpumask
> collects bits from upper and lower levels, and flushes TLB when needed.
>
> Fixes: 72b252aed506 ("mm: send one IPI per CPU to TLB flush all entries after unmapping pages")
> Signed-off-by: Hugh Dickins <hughd@google.com>
> Cc: stable@vger.kernel.org # 4.3+
Acked-by: Mel Gorman <mgorman@techsingularity.net>
--
Mel Gorman
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] mm: delete unnecessary and unsafe init_tlb_ubc() Hugh Dickins <hughd@google.com> - 2016-09-22 19:50 +0200 Re: [PATCH] mm: delete unnecessary and unsafe init_tlb_ubc() Mel Gorman <mgorman@techsingularity.net> - 2016-09-23 10:50 +0200
csiph-web