public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Alessio Igor Bogani <abogani@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Avi Kivity <avi@redhat.com>, Chris Metcalf <cmetcalf@tilera.com>,
	Christoph Lameter <cl@linux.com>,
	Geoff Levand <geoff@infradead.org>,
	Gilad Ben Yossef <gilad@benyossef.com>,
	Hakan Akkan <hakanakkan@gmail.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@kernel.org>,
	Kevin Hilman <khilman@ti.com>,
	Max Krasnyansky <maxk@qualcomm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Stephen Hemminger <shemminger@vyatta.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Sven-Thorsten Dietrich <thebigcorporation@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 1/5] user_hooks: New user hooks subsystem
Date: Fri, 27 Jul 2012 09:40:54 -0700	[thread overview]
Message-ID: <20120727164054.GJ2442@linux.vnet.ibm.com> (raw)
In-Reply-To: <1343403634-31555-2-git-send-email-fweisbec@gmail.com>

On Fri, Jul 27, 2012 at 05:40:30PM +0200, Frederic Weisbecker wrote:
> Create a new subsystem that handles the hooks on kernel/user
> boundaries currently used by RCU for its userspace extended
> quiescent state.
> 
> We need to pull this up from RCU into this new level of indirection
> because these hooks are also going to be used to implement an "on
> demand" generic virtual cputime accounting. A necessary step to
> shutdown the tick while still accounting the cputime.

So this eliminates the case where the architecture might enter an
RCU extended quiescent state multiple times, but exit it only once?
(I am hoping that it does...)

							Thanx, Paul

[ . . . ]

> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> index 318d00e..f6a24cb 100644
> --- a/kernel/rcutree.c
> +++ b/kernel/rcutree.c
> @@ -212,9 +212,6 @@ EXPORT_SYMBOL_GPL(rcu_note_context_switch);
>  DEFINE_PER_CPU(struct rcu_dynticks, rcu_dynticks) = {
>  	.dynticks_nesting = DYNTICK_TASK_EXIT_IDLE,
>  	.dynticks = ATOMIC_INIT(1),
> -#if defined(CONFIG_RCU_USER_QS) && !defined(CONFIG_RCU_USER_QS_FORCE)
> -	.ignore_user_qs = true,
> -#endif
>  };
> 
>  static int blimit = 10;		/* Maximum callbacks per rcu_do_batch. */
> @@ -448,18 +445,7 @@ EXPORT_SYMBOL_GPL(rcu_idle_enter);
>   */
>  void rcu_user_enter(void)
>  {
> -	unsigned long flags;
> -	struct rcu_dynticks *rdtp;
> -
> -	WARN_ON_ONCE(!current->mm);
> -
> -	local_irq_save(flags);
> -	rdtp = &__get_cpu_var(rcu_dynticks);
> -	if (!rdtp->ignore_user_qs && !rdtp->in_user) {
> -		rdtp->in_user = true;
> -		rcu_eqs_enter(1);
> -	}
> -	local_irq_restore(flags);
> +	rcu_eqs_enter(1);
>  }
>  EXPORT_SYMBOL_GPL(rcu_user_enter);
> 
> @@ -597,16 +583,7 @@ EXPORT_SYMBOL_GPL(rcu_idle_exit);
>   */
>  void rcu_user_exit(void)
>  {
> -	unsigned long flags;
> -	struct rcu_dynticks *rdtp;
> -
> -	local_irq_save(flags);
> -	rdtp = &__get_cpu_var(rcu_dynticks);
> -	if (rdtp->in_user) {
> -		rdtp->in_user = false;
> -		rcu_eqs_exit(1);
> -	}
> -	local_irq_restore(flags);
> +	rcu_eqs_exit(1);
>  }
>  EXPORT_SYMBOL_GPL(rcu_user_exit);
> 
> @@ -730,21 +707,6 @@ int rcu_is_cpu_idle(void)
>  }
>  EXPORT_SYMBOL(rcu_is_cpu_idle);
> 
> -#ifdef CONFIG_RCU_USER_QS
> -void rcu_user_hooks_switch(struct task_struct *prev,
> -			   struct task_struct *next)
> -{
> -	struct rcu_dynticks *rdtp;
> -
> -	/* Interrupts are disabled in context switch */
> -	rdtp = &__get_cpu_var(rcu_dynticks);
> -	if (!rdtp->ignore_user_qs) {
> -		clear_tsk_thread_flag(prev, TIF_NOHZ);
> -		set_tsk_thread_flag(next, TIF_NOHZ);
> -	}
> -}
> -#endif /* #ifdef CONFIG_RCU_USER_QS */
> -
>  #if defined(CONFIG_PROVE_RCU) && defined(CONFIG_HOTPLUG_CPU)
> 
>  /*

[ . . . ]


  reply	other threads:[~2012-07-27 16:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27 15:40 [RFC PATCH 0/5] cputime: Generic virtual based cputime accounting Frederic Weisbecker
2012-07-27 15:40 ` [PATCH 1/5] user_hooks: New user hooks subsystem Frederic Weisbecker
2012-07-27 16:40   ` Paul E. McKenney [this message]
2012-07-27 16:58     ` Frederic Weisbecker
2012-07-30 15:08   ` Peter Zijlstra
2012-07-30 15:27     ` Steven Rostedt
2012-07-30 16:30       ` Peter Zijlstra
2012-07-30 15:51     ` Frederic Weisbecker
2012-07-30 16:07       ` Steven Rostedt
2012-07-30 16:31         ` Peter Zijlstra
2012-07-30 16:32         ` Peter Zijlstra
2012-07-31  7:06       ` Ingo Molnar
2012-07-31 10:48         ` Frederic Weisbecker
2012-07-31 14:57           ` Ingo Molnar
2012-07-31 16:14             ` Peter Zijlstra
2012-08-01 12:28               ` Frederic Weisbecker
2012-08-01 12:43                 ` Steven Rostedt
2012-08-01 12:45                   ` Frederic Weisbecker
2012-07-27 15:40 ` [PATCH 2/5] cputime: Don't allow virtual and irq finegrained cputime accounting simultaneously Frederic Weisbecker
2012-07-27 15:40 ` [PATCH 3/5] cputime: Allow dynamic switch between tick/virtual based cputime accounting Frederic Weisbecker
2012-07-27 15:40 ` [PATCH 4/5] cputime: Rename account_system_vtime to account_vtime Frederic Weisbecker
2012-07-27 15:40 ` [PATCH 5/5] cputime: Generic on-demand virtual cputime accounting Frederic Weisbecker

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=20120727164054.GJ2442@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=abogani@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=avi@redhat.com \
    --cc=cl@linux.com \
    --cc=cmetcalf@tilera.com \
    --cc=fweisbec@gmail.com \
    --cc=geoff@infradead.org \
    --cc=gilad@benyossef.com \
    --cc=hakanakkan@gmail.com \
    --cc=hpa@zytor.com \
    --cc=khilman@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxk@qualcomm.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=shemminger@vyatta.com \
    --cc=tglx@linutronix.de \
    --cc=thebigcorporation@gmail.com \
    /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