public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dipankar Sarma <dipankar@in.ibm.com>
To: Anton Blanchard <anton@samba.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Dave Miller <davem@redhat.com>
Subject: Re: [RFC][PATCH] TIMER_BH-less smptimers
Date: Tue, 21 May 2002 11:56:11 +0530	[thread overview]
Message-ID: <20020521115611.B18654@in.ibm.com> (raw)
In-Reply-To: <20020516185448.A8069@in.ibm.com> <20020520085500.GB14488@krispykreme> <20020520155958.F6270@in.ibm.com> <20020520133105.GC14488@krispykreme>

On Mon, May 20, 2002 at 11:31:05PM +1000, Anton Blanchard wrote:
> :) I was surprised it worked with the missing spin_unlock too. Im
> testing the fixed diff now, so far it looks good.

I was positively invaded by space aliens while writing that code.


> > I am curious about performance of smptimers. It seems that
> > webserver benchmark performance worsens with smptimers (Ingo version)
> > contrary to our expectations. Do you see this ? If so, could this
> > happen because -
> > 
> > 1) Bouncing around of global_bh_lock cacheline by more cpus compared
> > to earlier timer implemenation ?
> > 2) All per-cpu timers invoked from timer_bh running in one cpu ?
> > 
> > Do you see any other side-effects of smptimers ?
> 
> We used to see bad behaviour. It turned out to be the per cpu
> timer interrupt firing at exactly the same time on all cpus. One
> cpu would successfully spin_trylock and the others would fail
> and postpone the work.

This makes me wonder if using a per-cpu tasklet in my patch
is a bad idea after all. Perhaps Ingo had figured it out already
and used a single acquisition of global_bh_lock to fire
timers for all CPUs when timers get deferred from the local
timer interrupt.

In an ideal world where there are no BHs, we can parallelize
the timers like I did. But with global_bh_lock serialization,
I am not sure anymore if that is a good idea. I will try to
get some benchmark measurements done with these two approaches.

> 
> We now evenly space the per cpu interrupts. Does intel do the same?

AFAICS, no. But then I am still learning.

Thanks
-- 
Dipankar Sarma  <dipankar@in.ibm.com> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

  reply	other threads:[~2002-05-21  6:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-16 13:24 [RFC][PATCH] TIMER_BH-less smptimers Dipankar Sarma
2002-05-20  8:55 ` Anton Blanchard
2002-05-20 10:29   ` Dipankar Sarma
2002-05-20 13:31     ` Anton Blanchard
2002-05-21  6:26       ` Dipankar Sarma [this message]
2002-05-20 12:38   ` Dipankar Sarma
2002-05-20 21:21   ` J.A. Magallon
2002-05-21  6:18     ` Dipankar Sarma

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=20020521115611.B18654@in.ibm.com \
    --to=dipankar@in.ibm.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=anton@samba.org \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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