lkml.org 
[lkml]   [2009]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86: Reduce the default HZ value
From
Date
On Thu, 2009-05-07 at 11:01 -0700, Paul E. McKenney wrote:

> In general, I agree. However, in the case where you have a single
> CPU-bound task running in user mode, you don't care that much about
> syscall performance. So, yes, this would mean having yet another config
> variable that users running big CPU-bound scientific applications would
> need to worry about, which is not perfect either.
>
> For whatever it is worth, the added overhead on entry would be something
> like the following:
>
> void rcu_irq_enter(void)
> {
> struct rcu_dynticks *rdtp = &__get_cpu_var(rcu_dynticks);
>
> if (rdtp->dynticks_nesting++)
> return;
> rdtp->dynticks++;
> WARN_ON_RATELIMIT(!(rdtp->dynticks & 0x1), &rcu_rs);
> smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
> }
>
> On exit, a bit more:
>
> void rcu_irq_exit(void)
> {
> struct rcu_dynticks *rdtp = &__get_cpu_var(rcu_dynticks);
>
> if (--rdtp->dynticks_nesting)
> return;
> smp_mb(); /* CPUs seeing ++ must see prior RCU read-side crit sects */
> rdtp->dynticks++;
> WARN_ON_RATELIMIT(rdtp->dynticks & 0x1, &rcu_rs);
>
> /* If the interrupt queued a callback, get out of dyntick mode. */
> if (__get_cpu_var(rcu_data).nxtlist ||
> __get_cpu_var(rcu_bh_data).nxtlist)
> set_need_resched();
> }
>
> But I could move the callback check into call_rcu(), which would get the
> overhead of rcu_irq_exit() down to about that of rcu_irq_enter().

Can't you simply enter idle state after a grace period completes and
finds no pending callbacks for the next period. And leave idle state at
the next call_rcu()?





\
 
 \ /
  Last update: 2009-05-08 12:37    [from the cache]
©2003-2011 Jasper Spaans