* [PATCH -next] rcu: remove unused 'cpu' in rcu_virt_note_context_switch
@ 2022-09-15 8:38 Zeng Heng
2022-09-15 8:40 ` Mukesh Ojha
0 siblings, 1 reply; 3+ messages in thread
From: Zeng Heng @ 2022-09-15 8:38 UTC (permalink / raw)
To: pbonzini, paulmck, frederic, quic_neeraju, josh, rostedt,
mathieu.desnoyers, jiangshanlai, joel
Cc: kvm, rcu, liwei391
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);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] rcu: remove unused 'cpu' in rcu_virt_note_context_switch
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
2022-09-21 14:50 ` Paul E. McKenney
0 siblings, 1 reply; 3+ messages in thread
From: Mukesh Ojha @ 2022-09-15 8:40 UTC (permalink / raw)
To: Zeng Heng, pbonzini, paulmck, frederic, quic_neeraju, josh,
rostedt, mathieu.desnoyers, jiangshanlai, joel
Cc: kvm, rcu, liwei391
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] rcu: remove unused 'cpu' in rcu_virt_note_context_switch
2022-09-15 8:40 ` Mukesh Ojha
@ 2022-09-21 14:50 ` Paul E. McKenney
0 siblings, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2022-09-21 14:50 UTC (permalink / raw)
To: Mukesh Ojha
Cc: Zeng Heng, pbonzini, frederic, quic_neeraju, josh, rostedt,
mathieu.desnoyers, jiangshanlai, joel, kvm, rcu, liwei391
On Thu, Sep 15, 2022 at 02:10:43PM +0530, Mukesh Ojha wrote:
> 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>
Applied for further review and testing. Thank you both!
Thanx, Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-21 14:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-09-21 14:50 ` Paul E. McKenney
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).