All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Waiman Long <longman@redhat.com>, Ingo Molnar <mingo@redhat.com>,
	Will Deacon <will@kernel.org>, Boqun Feng <boqun.feng@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] tracing: Use proper do_arch_spin_lock() API
Date: Thu, 22 Sep 2022 09:55:29 +0200	[thread overview]
Message-ID: <YywU8U7yD1nvvGlZ@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20220921181721.3a51afe9@gandalf.local.home>


I'm with Steve on not adding wrappers for this; people that use
arch_spinlock_* get to keep the pieces :-)

On Wed, Sep 21, 2022 at 06:17:21PM -0400, Steven Rostedt wrote:

> > @@ -1819,7 +1819,7 @@ update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu,
> >  		return;
> >  	}
> >  
> > -	arch_spin_lock(&tr->max_lock);
> > +	do_arch_spin_lock(&tr->max_lock);
> 
> Nothing here is needed, as interrupts had better be disabled when this
> function is called. And there's already a:
> 
> 	WARN_ON_ONCE(!irqs_disabled());

You can write that as lockdep_assert_irqs_disabled();

  parent reply	other threads:[~2022-09-22  7:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 13:21 [PATCH 0/2] locking, tracing: Fix incorrect use of arch_spin_lock() Waiman Long
2022-09-21 13:21 ` [PATCH 1/2] locking: Provide a low overhead do_arch_spin_lock() API Waiman Long
2022-09-21 22:06   ` Steven Rostedt
2022-09-22  0:51     ` Waiman Long
2022-09-21 13:21 ` [PATCH 2/2] tracing: Use proper " Waiman Long
2022-09-21 22:17   ` Steven Rostedt
2022-09-22  0:50     ` Waiman Long
     [not found]     ` <3789bf4d-d699-63d4-c97b-c8d9524cbc2f@redhat.com>
2022-09-22  2:08       ` Steven Rostedt
2022-09-22  7:55     ` Peter Zijlstra [this message]
2022-09-22 12:25       ` Waiman Long
2022-09-22 12:40       ` Steven Rostedt

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=YywU8U7yD1nvvGlZ@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=boqun.feng@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.