kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mukesh Ojha <quic_mojha@quicinc.com>
To: Zeng Heng <zengheng4@huawei.com>, <pbonzini@redhat.com>,
	<paulmck@kernel.org>, <frederic@kernel.org>,
	<quic_neeraju@quicinc.com>, <josh@joshtriplett.org>,
	<rostedt@goodmis.org>, <mathieu.desnoyers@efficios.com>,
	<jiangshanlai@gmail.com>, <joel@joelfernandes.org>
Cc: <kvm@vger.kernel.org>, <rcu@vger.kernel.org>, <liwei391@huawei.com>
Subject: Re: [PATCH -next] rcu: remove unused 'cpu' in rcu_virt_note_context_switch
Date: Thu, 15 Sep 2022 14:10:43 +0530	[thread overview]
Message-ID: <92770899-d56b-8bcd-f613-32d7b7ddd30b@quicinc.com> (raw)
In-Reply-To: <20220915083824.766645-1-zengheng4@huawei.com>

Hi,

On 9/15/2022 2:08 PM, Zeng Heng wrote:
> Remove unused function argument, and there is
> no logic changes.
> 
> Signed-off-by: Zeng Heng <zengheng4@huawei.com>
> ---
>   include/linux/kvm_host.h | 2 +-
>   include/linux/rcutiny.h  | 2 +-
>   include/linux/rcutree.h  | 2 +-
>   3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index f4519d3689e1..9cf0c503daf5 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -417,7 +417,7 @@ static __always_inline void guest_context_enter_irqoff(void)
>   	 */
>   	if (!context_tracking_guest_enter()) {
>   		instrumentation_begin();
> -		rcu_virt_note_context_switch(smp_processor_id());
> +		rcu_virt_note_context_switch();
>   		instrumentation_end();
>   	}
>   }
> diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
> index 768196a5f39d..9bc025aa79a3 100644
> --- a/include/linux/rcutiny.h
> +++ b/include/linux/rcutiny.h
> @@ -142,7 +142,7 @@ static inline int rcu_needs_cpu(void)
>    * Take advantage of the fact that there is only one CPU, which
>    * allows us to ignore virtualization-based context switches.
>    */
> -static inline void rcu_virt_note_context_switch(int cpu) { }
> +static inline void rcu_virt_note_context_switch(void) { }
>   static inline void rcu_cpu_stall_reset(void) { }
>   static inline int rcu_jiffies_till_stall_check(void) { return 21 * HZ; }
>   static inline void rcu_irq_exit_check_preempt(void) { }
> diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
> index 5efb51486e8a..70795386b9ff 100644
> --- a/include/linux/rcutree.h
> +++ b/include/linux/rcutree.h
> @@ -27,7 +27,7 @@ void rcu_cpu_stall_reset(void);
>    * wrapper around rcu_note_context_switch(), which allows TINY_RCU
>    * to save a few bytes. The caller must have disabled interrupts.
>    */
> -static inline void rcu_virt_note_context_switch(int cpu)
> +static inline void rcu_virt_note_context_switch(void)
>   {
>   	rcu_note_context_switch(false);
>   }

Good catch.

Acked-by: Mukesh Ojha <quic_mojha@quicinc.com>

-Mukesh


  reply	other threads:[~2022-09-15  8:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15  8:38 [PATCH -next] rcu: remove unused 'cpu' in rcu_virt_note_context_switch Zeng Heng
2022-09-15  8:40 ` Mukesh Ojha [this message]
2022-09-21 14:50   ` Paul E. McKenney

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=92770899-d56b-8bcd-f613-32d7b7ddd30b@quicinc.com \
    --to=quic_mojha@quicinc.com \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=kvm@vger.kernel.org \
    --cc=liwei391@huawei.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=quic_neeraju@quicinc.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=zengheng4@huawei.com \
    /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).