* [PATCH] mm: trace tlb flush after disabling preemption in try_to_unmap_flush
@ 2015-07-16 19:35 Sasha Levin
2015-07-21 12:27 ` Michal Hocko
0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2015-07-16 19:35 UTC (permalink / raw)
To: akpm, mgorman; +Cc: mhocko, riel, mingo, linux-mm, linux-kernel, Sasha Levin
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: trace tlb flush after disabling preemption in try_to_unmap_flush
2015-07-16 19:35 [PATCH] mm: trace tlb flush after disabling preemption in try_to_unmap_flush Sasha Levin
@ 2015-07-21 12:27 ` Michal Hocko
0 siblings, 0 replies; 2+ messages in thread
From: Michal Hocko @ 2015-07-21 12:27 UTC (permalink / raw)
To: Sasha Levin; +Cc: akpm, mgorman, riel, mingo, linux-mm, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-21 12:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-16 19:35 [PATCH] mm: trace tlb flush after disabling preemption in try_to_unmap_flush Sasha Levin
2015-07-21 12:27 ` Michal Hocko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).