linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/2] RCU: fix various latency/oom issues
@ 2006-01-26 18:40 Dipankar Sarma
  2006-01-26 18:41 ` [patch 1/2] rcu batch tuning Dipankar Sarma
  0 siblings, 1 reply; 24+ messages in thread
From: Dipankar Sarma @ 2006-01-26 18:40 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linus Torvalds, Paul E.McKenney, linux-kernel

Here are the patches that I have been testing that should help
some of the latency and OOM issues (file limit) that we had
discussed in the past. If the patchset looks ok,
we should probably queue them up in -mm for some testing before
merging. I have lightly tested the patchset on both ppc64 and x86_64 
using ltp, dbench etc.

Thanks
Dipnkar

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: [patch 1/2] rcu batch tuning
@ 2006-01-27 19:57 Oleg Nesterov
  2006-01-27 23:42 ` Paul E. McKenney
  2006-01-28 17:08 ` Dipankar Sarma
  0 siblings, 2 replies; 24+ messages in thread
From: Oleg Nesterov @ 2006-01-27 19:57 UTC (permalink / raw)
  To: Dipankar Sarma
  Cc: linux-kernel, Paul E. McKenney, Andrew Morton, Linus Torvalds

Dipankar Sarma wrote:
>
> +static void force_quiescent_state(struct rcu_data *rdp,
> +			struct rcu_ctrlblk *rcp)
> +{
> +	int cpu;
> +	cpumask_t cpumask;
> +	set_need_resched();
> +	if (unlikely(rdp->qlen - rdp->last_rs_qlen > rsinterval)) {
> +		rdp->last_rs_qlen = rdp->qlen;
> +		/*
> +		 * Don't send IPI to itself. With irqs disabled,
> +		 * rdp->cpu is the current cpu.
> +		 */
> +		cpumask = rcp->cpumask;
> +		cpu_clear(rdp->cpu, cpumask);
> +		for_each_cpu_mask(cpu, cpumask)
> +			smp_send_reschedule(cpu);
> +	}
> +}
> [ ... snip ... ]
>
> @@ -92,17 +128,13 @@ void fastcall call_rcu(struct rcu_head *
>  	rdp = &__get_cpu_var(rcu_data);
>  	*rdp->nxttail = head;
>  	rdp->nxttail = &head->next;
> -
> -	if (unlikely(++rdp->count > 10000))
> -		set_need_resched();
> -
> +	if (unlikely(++rdp->qlen > qhimark)) {
> +		rdp->blimit = INT_MAX;
> +		force_quiescent_state(rdp, &rcu_ctrlblk);
> +	}

When ->qlen exceeds qhimark for the first time we send reschedule IPI to
other CPUs and force_quiescent_state() records ->last_rs_qlen = ->qlen.
But we don't reset ->last_rs_qlen when ->qlen goes to 0, this means that
next time we need ++rdp->qlen > qhimark + rsinterval to force other CPUS
to pass quiescent state, no?

Also, it seems to me it's better to have 2 counters, one for length(->donelist)
and another for length(->curlist + ->nxtlist). I think we don't need
force_quiescent_state() when all rcu callbacks are placed in ->donelist,
we only need to increase rdp->blimit in this case.

Oleg.

^ permalink raw reply	[flat|nested] 24+ messages in thread
* [PATCH 0/2] RCU updates
@ 2006-02-17 15:41 Dipankar Sarma
  2006-02-17 15:43 ` [PATCH 1/2] rcu batch tuning Dipankar Sarma
  0 siblings, 1 reply; 24+ messages in thread
From: Dipankar Sarma @ 2006-02-17 15:41 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Paul E.McKenney

Here are the patches that I have been testing that should help
some of the latency and OOM issues (file limit) that we had
discussed in the past. If the patchset looks ok,
we should queue them up in -mm for some testing before
merging. I have lightly tested the patchset on both ppc64 and x86_64
using ltp, dbench etc.

Update since the last time I published - file counting stuff uses
percpu_counter.

Thanks
Dipankar


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2006-02-18  9:16 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-26 18:40 [patch 0/2] RCU: fix various latency/oom issues Dipankar Sarma
2006-01-26 18:41 ` [patch 1/2] rcu batch tuning Dipankar Sarma
2006-01-26 18:42   ` [patch 2/2] fix file counting Dipankar Sarma
2006-01-26 20:15     ` Eric Dumazet
2006-01-27 22:54       ` Andrew Morton
2006-01-27 23:14         ` Paul E. McKenney
2006-01-27 23:28           ` Andrew Morton
2006-01-28 18:42             ` Dipankar Sarma
2006-01-28 18:51               ` Andrew Morton
2006-01-28 19:10                 ` Dipankar Sarma
2006-01-30 17:00             ` Dipankar Sarma
2006-01-31 10:33               ` Eric Dumazet
2006-01-31 20:19                 ` Dipankar Sarma
2006-01-26 19:33   ` [patch 1/2] rcu batch tuning Paul E. McKenney
2006-01-26 19:42     ` Dipankar Sarma
2006-01-27 19:57 Oleg Nesterov
2006-01-27 23:42 ` Paul E. McKenney
2006-01-28 18:07   ` Oleg Nesterov
2006-01-30  3:30     ` Paul E. McKenney
2006-01-28 17:08 ` Dipankar Sarma
2006-02-17 15:41 [PATCH 0/2] RCU updates Dipankar Sarma
2006-02-17 15:43 ` [PATCH 1/2] rcu batch tuning Dipankar Sarma
2006-02-17 20:33   ` Dipankar Sarma
2006-02-18  8:45   ` Andrew Morton
2006-02-18  9:15     ` Dipankar Sarma

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).