linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] rcu: rcu_qs -- Use raise_softirq_irqoff to not save irqs twice
@ 2019-01-24 18:07 Cyrill Gorcunov
  2019-01-24 18:14 ` [PATCH v2 " Cyrill Gorcunov
  0 siblings, 1 reply; 3+ messages in thread
From: Cyrill Gorcunov @ 2019-01-24 18:07 UTC (permalink / raw)
  To: LKML; +Cc: Paul E. McKenney

The rcu_qs is disabling IRQs by self so no need to do the same in raise_softirq,
instead we can save some cycles using raise_softirq_irqoff directly.

CC: Paul E. McKenney <paulmck@linux.ibm.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 kernel/rcu/tiny.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-next.git/kernel/rcu/tiny.c
===================================================================
--- linux-next.git.orig/kernel/rcu/tiny.c
+++ linux-next.git/kernel/rcu/tiny.c
@@ -65,7 +65,7 @@ void rcu_qs(void)
 	local_irq_save(flags);
 	if (rcu_ctrlblk.donetail != rcu_ctrlblk.curtail) {
 		rcu_ctrlblk.donetail = rcu_ctrlblk.curtail;
-		raise_softirq(RCU_SOFTIRQ);
+		raise_softirq_irqoff(RCU_SOFTIRQ);
 	}
 	local_irq_restore(flags);
 }
Subject: [PATCH]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2 -next] rcu: rcu_qs -- Use raise_softirq_irqoff to not save irqs twice
  2019-01-24 18:07 [PATCH -next] rcu: rcu_qs -- Use raise_softirq_irqoff to not save irqs twice Cyrill Gorcunov
@ 2019-01-24 18:14 ` Cyrill Gorcunov
  2019-01-24 20:59   ` Paul E. McKenney
  0 siblings, 1 reply; 3+ messages in thread
From: Cyrill Gorcunov @ 2019-01-24 18:14 UTC (permalink / raw)
  To: LKML; +Cc: Paul E. McKenney

The rcu_qs is disabling IRQs by self so no need to do the same in raise_softirq
but instead we can save some cycles using raise_softirq_irqoff directly.

CC: Paul E. McKenney <paulmck@linux.ibm.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
The prev patch body has been screwed, sorry.

 kernel/rcu/tiny.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-next.git/kernel/rcu/tiny.c
===================================================================
--- linux-next.git.orig/kernel/rcu/tiny.c
+++ linux-next.git/kernel/rcu/tiny.c
@@ -65,7 +65,7 @@ void rcu_qs(void)
 	local_irq_save(flags);
 	if (rcu_ctrlblk.donetail != rcu_ctrlblk.curtail) {
 		rcu_ctrlblk.donetail = rcu_ctrlblk.curtail;
-		raise_softirq(RCU_SOFTIRQ);
+		raise_softirq_irqoff(RCU_SOFTIRQ);
 	}
 	local_irq_restore(flags);
 }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 -next] rcu: rcu_qs -- Use raise_softirq_irqoff to not save irqs twice
  2019-01-24 18:14 ` [PATCH v2 " Cyrill Gorcunov
@ 2019-01-24 20:59   ` Paul E. McKenney
  0 siblings, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2019-01-24 20:59 UTC (permalink / raw)
  To: Cyrill Gorcunov; +Cc: LKML

On Thu, Jan 24, 2019 at 09:14:37PM +0300, Cyrill Gorcunov wrote:
> The rcu_qs is disabling IRQs by self so no need to do the same in raise_softirq
> but instead we can save some cycles using raise_softirq_irqoff directly.
> 
> CC: Paul E. McKenney <paulmck@linux.ibm.com>
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>

Good eyes, good combo optimization of both space and time, thank you!!!

Queued, most likely for v5.2.

							Thanx, Paul

> ---
> The prev patch body has been screwed, sorry.
> 
>  kernel/rcu/tiny.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-next.git/kernel/rcu/tiny.c
> ===================================================================
> --- linux-next.git.orig/kernel/rcu/tiny.c
> +++ linux-next.git/kernel/rcu/tiny.c
> @@ -65,7 +65,7 @@ void rcu_qs(void)
>  	local_irq_save(flags);
>  	if (rcu_ctrlblk.donetail != rcu_ctrlblk.curtail) {
>  		rcu_ctrlblk.donetail = rcu_ctrlblk.curtail;
> -		raise_softirq(RCU_SOFTIRQ);
> +		raise_softirq_irqoff(RCU_SOFTIRQ);
>  	}
>  	local_irq_restore(flags);
>  }
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-24 20:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-24 18:07 [PATCH -next] rcu: rcu_qs -- Use raise_softirq_irqoff to not save irqs twice Cyrill Gorcunov
2019-01-24 18:14 ` [PATCH v2 " Cyrill Gorcunov
2019-01-24 20:59   ` 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).