All of lore.kernel.org
 help / color / mirror / Atom feed
From: Byungchul Park <byungchul.park@lge.com>
To: paulmck@linux.vnet.ibm.com, josh@joshtriplett.org,
	rostedt@goodmis.org, mathieu.desnoyers@efficios.com,
	jiangshanlai@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] rcu: Force resched_cpu when jiffies >= rcu_state.jiffies_resched
Date: Tue, 22 Nov 2016 17:12:20 +0900	[thread overview]
Message-ID: <20161122081220.GG2279@X58A-UD3R> (raw)
In-Reply-To: <1478673135-25509-2-git-send-email-byungchul.park@lge.com>

On Wed, Nov 09, 2016 at 03:32:15PM +0900, Byungchul Park wrote:
> Currently rcu code forces CPU into scheduler when jiffies >=
> rcu_state.gp_start + jiffies_till_sched_qs, via resched_cpu().
> 
> It would be better to force CPU into scheduler when jiffies >=
> rcu_state.jiffies_resched, too.

Hello,

I think these two patches are necessary to call resched_cpu() even in
case of jiffies >= rcu_state.jiffies_resched, too. Am I wrong?

It would be appriciated if you let me know if I was wrong.

Thank you,
Byungchul

> 
> Signed-off-by: Byungchul Park <byungchul.park@lge.com>
> ---
>  kernel/rcu/tree.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index d8e8859..287f468 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -1217,11 +1217,10 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp,
>  				   READ_ONCE(*rcrmp) + rdp->rsp->flavor_mask);
>  		}
>  		rdp->rsp->jiffies_resched += 5; /* Re-enable beating. */
> -	}
>  
> -	/* And if it has been a really long time, kick the CPU as well. */
> -	if (ULONG_CMP_GE(jiffies, rdp->rsp->gp_start + jiffies_till_sched_qs))
> +		/* And if it has been a really long time, kick the CPU as well. */
>  		resched_cpu(rdp->cpu);  /* Force CPU into scheduler. */
> +	}
>  
>  	return 0;
>  }
> -- 
> 1.9.1

  reply	other threads:[~2016-11-22  8:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09  6:32 [PATCH 1/2] rcu: Remove unnecessary condition in rcu_implicit_dynticks_qs Byungchul Park
2016-11-09  6:32 ` [PATCH 2/2] rcu: Force resched_cpu when jiffies >= rcu_state.jiffies_resched Byungchul Park
2016-11-22  8:12   ` Byungchul Park [this message]
2016-11-25  8:34     ` Paul E. McKenney
2016-11-26 12:00       ` Paul E. McKenney
2016-11-28  6:46         ` Byungchul Park
2016-11-28 10:58           ` 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=20161122081220.GG2279@X58A-UD3R \
    --to=byungchul.park@lge.com \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.