linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Byungchul Park <byungchul.park@lge.com>
To: jiangshanlai@gmail.com, paulmck@linux.vnet.ibm.com,
	josh@joshtriplett.org, rostedt@goodmis.org,
	mathieu.desnoyers@efficios.com
Cc: linux-kernel@vger.kernel.org, kernel-team@lge.com
Subject: Re: [PATCH] rcu: Report a quiescent state when it's exactly in the state
Date: Fri, 11 May 2018 21:57:54 +0900	[thread overview]
Message-ID: <3af4cec0-4019-e3ac-77f9-8631252fb6da@lge.com> (raw)
In-Reply-To: <1526027434-21237-1-git-send-email-byungchul.park@lge.com>

Hello folks,

I think I wrote the title in a misleading way.

Please change the title to something else such as,
"rcu: Report a quiescent state when it's in the state" or,
"rcu: Add points reporting quiescent states where proper" or so on.

On 2018-05-11 오후 5:30, Byungchul Park wrote:
> We expect a quiescent state of TASKS_RCU when cond_resched_tasks_rcu_qs()
> is called, no matter whether it actually be scheduled or not. However,
> it currently doesn't report the quiescent state when the task enters
> into __schedule() as it's called with preempt = true. So make it report
> the quiescent state unconditionally when cond_resched_tasks_rcu_qs() is
> called.
> 
> And in TINY_RCU, even though the quiescent state of rcu_bh also should
> be reported when the tick interrupt comes from user, it doesn't. So make
> it reported.
> 
> Lastly in TREE_RCU, rcu_note_voluntary_context_switch() should be
> reported when the tick interrupt comes from not only user but also idle,
> as an extended quiescent state.
> 
> Signed-off-by: Byungchul Park <byungchul.park@lge.com>
> ---
>   include/linux/rcupdate.h | 4 ++--
>   kernel/rcu/tiny.c        | 6 +++---
>   kernel/rcu/tree.c        | 4 ++--
>   3 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> index ee8cf5fc..7432261 100644
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -195,8 +195,8 @@ static inline void exit_tasks_rcu_finish(void) { }
>    */
>   #define cond_resched_tasks_rcu_qs() \
>   do { \
> -	if (!cond_resched()) \
> -		rcu_note_voluntary_context_switch_lite(current); \
> +	rcu_note_voluntary_context_switch_lite(current); \
> +	cond_resched(); \
>   } while (0)
>   
>   /*
> diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c
> index a64eee0..68d2332 100644
> --- a/kernel/rcu/tiny.c
> +++ b/kernel/rcu/tiny.c
> @@ -120,12 +120,12 @@ void rcu_bh_qs(void)
>    */
>   void rcu_check_callbacks(int user)
>   {
> -	if (user)
> +	if (user) {
>   		rcu_sched_qs();
> -	else if (!in_softirq())
>   		rcu_bh_qs();
> -	if (user)
>   		rcu_note_voluntary_context_switch(current);
> +	} else if (!in_softirq())
> +		rcu_bh_qs();
>   }
>   
>   /*
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index 36075dd..1abe29a 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2595,6 +2595,7 @@ void rcu_check_callbacks(int user)
>   
>   		rcu_sched_qs();
>   		rcu_bh_qs();
> +		rcu_note_voluntary_context_switch(current);
>   
>   	} else if (!in_softirq()) {
>   
> @@ -2610,8 +2611,7 @@ void rcu_check_callbacks(int user)
>   	rcu_preempt_check_callbacks();
>   	if (rcu_pending())
>   		invoke_rcu_core();
> -	if (user)
> -		rcu_note_voluntary_context_switch(current);
> +
>   	trace_rcu_utilization(TPS("End scheduler-tick"));
>   }
>   
> 

-- 
Thanks,
Byungchul

  reply	other threads:[~2018-05-11 12:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-11  8:30 [PATCH] rcu: Report a quiescent state when it's exactly in the state Byungchul Park
2018-05-11 12:57 ` Byungchul Park [this message]
2018-05-11 16:17   ` Paul E. McKenney
2018-05-11 16:23     ` Steven Rostedt
2018-05-11 16:25       ` Steven Rostedt
2018-05-11 16:27         ` Steven Rostedt
2018-05-11 17:27           ` Paul E. McKenney
2018-05-11 17:29             ` Steven Rostedt
2018-05-11 22:41     ` Joel Fernandes
2018-05-12  5:08       ` Paul E. McKenney
2018-05-12  6:30         ` Joel Fernandes
2018-05-12 14:41           ` Paul E. McKenney
2018-05-12 17:26             ` Steven Rostedt
2018-05-14  3:11               ` Byungchul Park
2018-05-13  0:09             ` Joel Fernandes
2018-05-14  2:59       ` Byungchul Park
2018-05-14 14:25         ` Byungchul Park
2018-05-14 21:04         ` Paul E. McKenney
2018-05-15  0:18           ` Byungchul Park

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=3af4cec0-4019-e3ac-77f9-8631252fb6da@lge.com \
    --to=byungchul.park@lge.com \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=kernel-team@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.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 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).