From: Michal Hocko <mhocko@kernel.org>
To: Sasha Levin <sasha.levin@oracle.com>
Cc: akpm@linux-foundation.org, mgorman@suse.de, riel@redhat.com,
mingo@kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: trace tlb flush after disabling preemption in try_to_unmap_flush
Date: Tue, 21 Jul 2015 14:27:04 +0200 [thread overview]
Message-ID: <20150721122704.GL11967@dhcp22.suse.cz> (raw)
In-Reply-To: <1437075339-32715-1-git-send-email-sasha.levin@oracle.com>
On Thu 16-07-15 15:35:39, Sasha Levin wrote:
> Commit "mm: send one IPI per CPU to TLB flush all entries after unmapping
> pages" added a trace_tlb_flush() while preemption was still enabled. This
> means that we'll access smp_processor_id() which in turn will get us quite
> a few warnings.
>
> Fix it by moving the trace to where the preemption is disabled, one line
> down.
>
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Reviewed-by: Michal Hocko <mhocko@suse.com>
> ---
>
> The diff is all lies: I've moved trace_tlb_flush() one line down rather
> than get_cpu() a line up ;)
>
> mm/rmap.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/mm/rmap.c b/mm/rmap.c
> index 30812e9..63ba46c 100644
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -613,9 +613,10 @@ void try_to_unmap_flush(void)
> if (!tlb_ubc->flush_required)
> return;
>
> + cpu = get_cpu();
> +
> trace_tlb_flush(TLB_REMOTE_SHOOTDOWN, -1UL);
>
> - cpu = get_cpu();
> if (cpumask_test_cpu(cpu, &tlb_ubc->cpumask))
> percpu_flush_tlb_batch_pages(&tlb_ubc->cpumask);
>
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Michal Hocko
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>
prev parent reply other threads:[~2015-07-21 12:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 19:35 Sasha Levin
2015-07-21 12:27 ` Michal Hocko [this message]
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=20150721122704.GL11967@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=riel@redhat.com \
--cc=sasha.levin@oracle.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox