Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754583AbbEMQId (ORCPT ); Wed, 13 May 2015 12:08:33 -0400 Received: from e35.co.us.ibm.com ([32.97.110.153]:59369 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbbEMQIa (ORCPT ); Wed, 13 May 2015 12:08:30 -0400 From: "Shreyas B. Prabhu" To: akpm@linux-foundation.org, rostedt@goodmis.org Cc: linux-kernel@vger.kernel.org, preeti@linux.vnet.ibm.com, paulmck@linux.vnet.ibm.com, "Shreyas B. Prabhu" Subject: [PATCH] tracing: Add comments explaining cpu online filter for trace events Date: Wed, 13 May 2015 21:37:43 +0530 Message-Id: <1431533263-5139-1-git-send-email-shreyas@linux.vnet.ibm.com> X-Mailer: git-send-email 1.9.3 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15051316-0013-0000-0000-00000AB9C6A5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2548 Lines: 79 trace_mm_page_pcpu_drain, trace_kmem_cache_free, trace_mm_page_free and trace_tlb_flush can be potentially called from an offlined cpu. Since trace points use RCU and RCU should not be used from offlined cpus, we have checks to filter out such calls. Add comments to explain this. Signed-off-by: Shreyas B. Prabhu --- This applies on top of patches posted here: https://lkml.org/lkml/2015/5/8/527 include/trace/events/kmem.h | 15 +++++++++++++++ include/trace/events/tlb.h | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index 6cd975f..9883f2f 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h @@ -146,6 +146,11 @@ DEFINE_EVENT_CONDITION(kmem_free, kmem_cache_free, TP_ARGS(call_site, ptr), + /* + * This trace can be potentially called from an offlined cpu. + * Since trace points use RCU and RCU should not be used from + * offline cpus, filter such calls out. + */ TP_CONDITION(cpu_online(smp_processor_id())) ); @@ -155,6 +160,11 @@ TRACE_EVENT_CONDITION(mm_page_free, TP_ARGS(page, order), + /* + * This trace can be potentially called from an offlined cpu. + * Since trace points use RCU and RCU should not be used from + * offline cpus, filter such calls out. + */ TP_CONDITION(cpu_online(smp_processor_id())), TP_STRUCT__entry( @@ -263,6 +273,11 @@ TRACE_EVENT_CONDITION(mm_page_pcpu_drain, TP_ARGS(page, order, migratetype), + /* + * This trace can be potentially called from an offlined cpu. + * Since trace points use RCU and RCU should not be used from + * offline cpus, filter such calls out. + */ TP_CONDITION(cpu_online(smp_processor_id())), TP_STRUCT__entry( diff --git a/include/trace/events/tlb.h b/include/trace/events/tlb.h index 4250f36..2afc3ed 100644 --- a/include/trace/events/tlb.h +++ b/include/trace/events/tlb.h @@ -38,6 +38,11 @@ TRACE_EVENT_CONDITION(tlb_flush, TP_PROTO(int reason, unsigned long pages), TP_ARGS(reason, pages), + /* + * This trace can be potentially called from an offlined cpu. + * Since trace points use RCU and RCU should not be used from + * offline cpus, filter such calls out. + */ TP_CONDITION(cpu_online(smp_processor_id())), TP_STRUCT__entry( -- 1.9.3 -- 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/