[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOJe8K0b77X1hc-rZr0a0vsA7m9Wx_T=8Fp-6rKMjnwbQ9OnsQ@mail.gmail.com>
Date: Sun, 14 Feb 2016 20:35:04 +0300
From: Denis Kirjanov <kda@...ux-powerpc.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, paulmck@...ux.vnet.ibm.com
Subject: Re: [PATCH 1/2] tracing/mm: don't trace kfree on offline CPUs
On 2/14/16, Steven Rostedt <rostedt@...dmis.org> wrote:
> On Sat, 13 Feb 2016 21:22:52 +0300
> Denis Kirjanov <kda@...ux-powerpc.org> wrote:
>
>> -DEFINE_EVENT(kmem_free, kfree,
>> +DEFINE_EVENT_CONDITION(kmem_free, kfree,
>>
>> TP_PROTO(unsigned long call_site, const void *ptr),
>>
>> - TP_ARGS(call_site, ptr)
>> + 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.
>> + * While this trace can be called from a preemptable section,
>> + * it has no impact on the condition since tasks can migrate
>> + * only from online cpus to other online cpus. Thus its safe
>> + * to use raw_smp_processor_id.
>> + */
>> + TP_CONDITION(cpu_online(raw_smp_processor_id()))
>
> This is starting to become a common occurrence. Perhaps it is best to
> just hardcode this into the tracepoint code itself?
Yeah, I was thinking about it the same way and so we can make it generic
>
> -- Steve
>
>> );
>>
>> DEFINE_EVENT_CONDITION(kmem_free, kmem_cache_free,
>
>
Powered by blists - more mailing lists