From: Mel Gorman <mgorman@techsingularity.net>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm: delete unnecessary and unsafe init_tlb_ubc()
Date: Fri, 23 Sep 2016 09:47:29 +0100 [thread overview]
Message-ID: <20160923084729.GA2838@techsingularity.net> (raw)
In-Reply-To: <alpine.LSU.2.11.1609221037170.17333@eggly.anvils>
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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Mel Gorman <mgorman@techsingularity.net>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm: delete unnecessary and unsafe init_tlb_ubc()
Date: Fri, 23 Sep 2016 09:47:29 +0100 [thread overview]
Message-ID: <20160923084729.GA2838@techsingularity.net> (raw)
In-Reply-To: <alpine.LSU.2.11.1609221037170.17333@eggly.anvils>
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
next prev parent reply other threads:[~2016-09-23 8:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 17:41 [PATCH] mm: delete unnecessary and unsafe init_tlb_ubc() Hugh Dickins
2016-09-22 17:41 ` Hugh Dickins
2016-09-23 8:47 ` Mel Gorman [this message]
2016-09-23 8:47 ` Mel Gorman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160923084729.GA2838@techsingularity.net \
--to=mgorman@techsingularity.net \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.