From: Dipankar Sarma <dipankar@in.ibm.com>
To: Robert Love <rml@tech9.net>
Cc: "David S. Miller" <davem@redhat.com>,
Linus Torvalds <torvalds@transmeta.com>,
linux-kernel@vger.kernel.org,
Paul McKenney <paul.mckenney@us.ibm.com>,
Andrea Arcangeli <andrea@suse.de>
Subject: Re: 8-CPU (SMP) #s for lockfree rtcache
Date: Tue, 28 May 2002 22:39:45 +0530 [thread overview]
Message-ID: <20020528223945.A22573@in.ibm.com> (raw)
In-Reply-To: <20020528171104.D19734@in.ibm.com> <20020528.042514.92633856.davem@redhat.com> <20020528182806.A21303@in.ibm.com> <1022600998.20317.44.camel@sinai> <20020528215535.A22328@in.ibm.com>
On Tue, May 28, 2002 at 09:55:35PM +0530, Dipankar Sarma wrote:
> Hi Robert,
>
> On Tue, May 28, 2002 at 08:49:58AM -0700, Robert Love wrote:
> >
> > > Well, the last time RCU was discussed, Linus said that he would
> > > like to see someplace where RCU clearly helps.
> >
> > I agree the numbers posted are nice, but I remain skeptical like Linus.
> > Sure, the locking overhead is nearly gone in the profiled function where
> > RCU is used. But the overhead has just been _moved_ to wherever the RCU
> > work is now done. Any benchmark needs to include the damage done there,
> > too.
>
> Have you looked at the rt_rcu patch ? Where do you think there
> is overhead compared to what route cache alread does ? In my
> profiles, rcu routines and kernel mechanisms that it uses
> don't show high up. If you have any suggestions, then I can
> do an investigation.
Hi Robert,
While we are at it, I think this is good point to analyze.
So here is an brief analysis of rt_rcu patch from the overhead
standpoint -
1. Read side has no overhead, we just don't take the per-bucket lock.
2. For just the route cache portion of code, RCU comes into picture
only when dst entries are deleted. This however has two issues -
a> expiry of dst entries is checked through a non-frequent
timer b>lease for recently used dst entries are extended.
So we don't do frequent RCU based deletion of dst entries.
Periodically a set of dst entries expire and instead of
freeing them immediately, we just put them in RCU queue(s)
for freeing after the grace period (call_rcu() in rt_free()).
Coming to the RCU mechanism -
1. Grace period detection : Different RCU algorithms do it
differently, however if there is no RCU pending *nothing*
is done regarding this. One rcu implementation uses
a 10ms timer to check for grace period completion and another
rcu_poll uses a repeating tasklet to poll for it. The grace period
detection is based on a per-cpu context switch counter. I have not seen
signficant profile counts for grace period detection scheme, but
nevertheless I will put up the profile counts for Dave's test
at the LSE website.
2. Actual update : RCU processes the batched update callbacks from tasklet
context. The rt_rcu callbacks don't do anything other than
call dst_free(), which would have been called by non-RCU
code under lock in any case. I am not sure doing this from
tasklet context adds any overhead and I suspect that it doesn't.
Comments/suggestions ?
Thanks
--
Dipankar Sarma <dipankar@in.ibm.com> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.
next prev parent reply other threads:[~2002-05-28 17:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-28 11:41 8-CPU (SMP) #s for lockfree rtcache Dipankar Sarma
2002-05-28 11:25 ` David S. Miller
2002-05-28 12:58 ` Dipankar Sarma
2002-05-28 12:40 ` David S. Miller
2002-05-28 15:45 ` Andi Kleen
2002-05-28 17:03 ` Alan Cox
2002-05-28 16:34 ` Andi Kleen
2002-05-28 18:10 ` Alan Cox
2002-05-28 17:24 ` Andi Kleen
2002-05-29 4:44 ` Rusty Russell
2002-05-28 15:49 ` Robert Love
2002-05-28 16:25 ` Dipankar Sarma
2002-05-28 17:09 ` Dipankar Sarma [this message]
2002-05-29 17:44 ` kuznet
2002-06-03 12:08 ` Dipankar Sarma
-- strict thread matches above, loose matches on Subject: below --
2002-05-28 19:57 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=20020528223945.A22573@in.ibm.com \
--to=dipankar@in.ibm.com \
--cc=andrea@suse.de \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paul.mckenney@us.ibm.com \
--cc=rml@tech9.net \
--cc=torvalds@transmeta.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