diff options
| author | Peter Zijlstra <peterz@infradead.org> | 2018-06-12 04:34:52 -0400 | 
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2018-06-20 05:35:56 -0400 | 
| commit | b3dae109fa89d67334bf3349babab3ad9b6f233f (patch) | |
| tree | 0628528fc9c51dd3927d542d986396fd3e8706cf /kernel/rcu/tree.c | |
| parent | 0abf17bc7790dd0467ed0e38522242f23c5da1c4 (diff) | |
sched/swait: Rename to exclusive
Since swait basically implemented exclusive waits only, make sure
the API reflects that.
  $ git grep -l -e "\<swake_up\>"
		-e "\<swait_event[^ (]*"
		-e "\<prepare_to_swait\>" | while read file;
    do
	sed -i -e 's/\<swake_up\>/&_one/g'
	       -e 's/\<swait_event[^ (]*/&_exclusive/g'
	       -e 's/\<prepare_to_swait\>/&_exclusive/g' $file;
    done
With a few manual touch-ups.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: bigeasy@linutronix.de
Cc: oleg@redhat.com
Cc: paulmck@linux.vnet.ibm.com
Cc: pbonzini@redhat.com
Link: https://lkml.kernel.org/r/20180612083909.261946548@infradead.org
Diffstat (limited to 'kernel/rcu/tree.c')
| -rw-r--r-- | kernel/rcu/tree.c | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index aa7cade1b9f3..91f888d3b23a 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
| @@ -1727,7 +1727,7 @@ static void rcu_gp_kthread_wake(struct rcu_state *rsp) | |||
| 1727 | !READ_ONCE(rsp->gp_flags) || | 1727 | !READ_ONCE(rsp->gp_flags) || | 
| 1728 | !rsp->gp_kthread) | 1728 | !rsp->gp_kthread) | 
| 1729 | return; | 1729 | return; | 
| 1730 | swake_up(&rsp->gp_wq); | 1730 | swake_up_one(&rsp->gp_wq); | 
| 1731 | } | 1731 | } | 
| 1732 | 1732 | ||
| 1733 | /* | 1733 | /* | 
| @@ -2002,7 +2002,7 @@ static bool rcu_gp_init(struct rcu_state *rsp) | |||
| 2002 | } | 2002 | } | 
| 2003 | 2003 | ||
| 2004 | /* | 2004 | /* | 
| 2005 | * Helper function for swait_event_idle() wakeup at force-quiescent-state | 2005 | * Helper function for swait_event_idle_exclusive() wakeup at force-quiescent-state | 
| 2006 | * time. | 2006 | * time. | 
| 2007 | */ | 2007 | */ | 
| 2008 | static bool rcu_gp_fqs_check_wake(struct rcu_state *rsp, int *gfp) | 2008 | static bool rcu_gp_fqs_check_wake(struct rcu_state *rsp, int *gfp) | 
| @@ -2144,7 +2144,7 @@ static int __noreturn rcu_gp_kthread(void *arg) | |||
| 2144 | READ_ONCE(rsp->gpnum), | 2144 | READ_ONCE(rsp->gpnum), | 
| 2145 | TPS("reqwait")); | 2145 | TPS("reqwait")); | 
| 2146 | rsp->gp_state = RCU_GP_WAIT_GPS; | 2146 | rsp->gp_state = RCU_GP_WAIT_GPS; | 
| 2147 | swait_event_idle(rsp->gp_wq, READ_ONCE(rsp->gp_flags) & | 2147 | swait_event_idle_exclusive(rsp->gp_wq, READ_ONCE(rsp->gp_flags) & | 
| 2148 | RCU_GP_FLAG_INIT); | 2148 | RCU_GP_FLAG_INIT); | 
| 2149 | rsp->gp_state = RCU_GP_DONE_GPS; | 2149 | rsp->gp_state = RCU_GP_DONE_GPS; | 
| 2150 | /* Locking provides needed memory barrier. */ | 2150 | /* Locking provides needed memory barrier. */ | 
| @@ -2176,7 +2176,7 @@ static int __noreturn rcu_gp_kthread(void *arg) | |||
| 2176 | READ_ONCE(rsp->gpnum), | 2176 | READ_ONCE(rsp->gpnum), | 
| 2177 | TPS("fqswait")); | 2177 | TPS("fqswait")); | 
| 2178 | rsp->gp_state = RCU_GP_WAIT_FQS; | 2178 | rsp->gp_state = RCU_GP_WAIT_FQS; | 
| 2179 | ret = swait_event_idle_timeout(rsp->gp_wq, | 2179 | ret = swait_event_idle_timeout_exclusive(rsp->gp_wq, | 
| 2180 | rcu_gp_fqs_check_wake(rsp, &gf), j); | 2180 | rcu_gp_fqs_check_wake(rsp, &gf), j); | 
| 2181 | rsp->gp_state = RCU_GP_DOING_FQS; | 2181 | rsp->gp_state = RCU_GP_DOING_FQS; | 
| 2182 | /* Locking provides needed memory barriers. */ | 2182 | /* Locking provides needed memory barriers. */ | 
