linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wojciech Kudla <wk.kernel@gmail.com>
To: Nadav Amit <namit@vmware.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] smp: generic ipi_raise tracepoint
Date: Thu, 21 May 2020 21:11:36 +0100	[thread overview]
Message-ID: <767faf00-0dc0-698a-910f-100608d10d81@gmail.com> (raw)
In-Reply-To: <40AA62E7-3AFB-44DC-B4A6-F89E5C914620@vmware.com>

On 21/05/2020 20:00, Nadav Amit wrote:

>> -	if (llist_add(&csd->llist, &per_cpu(call_single_queue, cpu)))
>> +	if (llist_add(&csd->llist, &per_cpu(call_single_queue, cpu))) {
>> +		if (trace_ipi_raise_enabled())
> 
> Why do you need this check? trace_ipi_raise() will do the same check before
> actual tracing:
> 
> 	if (static_key_false(&__tracepoint_##name.key)
> 

Yes, my motivation for conditional logic was performance-driven.
Thanks for pointing out the implicit check.

> 
> In general, I think there are too many trace-points. They look benign(i.e.,
> free), but can cause worse code to be generated as they behave as a memory
> clobber. Many times the same result can be achieved with a probe.
> 

Thank you for the review, I agree this may not be optimal. Let's just stop here.
There's a different patch I submitted today that follows Peter's suggestions
about smp function calls being much more sensible target for new tracepoints.

http://lkml.kernel.org/r/e6141d56-1da1-6c00-198f-cbe4385327ff@gmail.com

Thanks,
W.


      reply	other threads:[~2020-05-21 20:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20 13:17 [PATCH] smp: generic ipi_raise tracepoint Wojciech Kudla
2020-05-20 13:33 ` Peter Zijlstra
2020-05-20 13:42   ` Wojciech Kudla
2020-05-20 13:51     ` Peter Zijlstra
2020-05-21 10:45 ` kbuild test robot
2020-05-21 19:00 ` Nadav Amit
2020-05-21 20:11   ` Wojciech Kudla [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=767faf00-0dc0-698a-910f-100608d10d81@gmail.com \
    --to=wk.kernel@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namit@vmware.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).