From: David Miller <davem@davemloft.net>
To: joshhunt00@gmail.com
Cc: kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
kaber@trash.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] IPv6: Avoid taking write lock for /proc/net/ipv6_route
Date: Fri, 30 Dec 2011 17:09:05 -0500 (EST) [thread overview]
Message-ID: <20111230.170905.1348056803377924696.davem@davemloft.net> (raw)
In-Reply-To: <CAKA=qzbZ4x5u1bBM0gAECeMNutyaVzp1FmRPwKHsBEEs7984ag@mail.gmail.com>
From: Josh Hunt <joshhunt00@gmail.com>
Date: Wed, 28 Dec 2011 17:23:07 -0600
> lock_stat shows taking the write lock is causing the slowdown. Using
> this info I decided to write a version of fib6_clean_all() which
> replaces write_lock_bh(&table->tb6_lock) with
> read_lock_bh(&table->tb6_lock). With this new function I see the same
> results as with my rtnetlink iperf test. I guess my question is what
> am I missing? Is there a reason you need to take the write lock when
> reading the route table to display to proc?
You're not missing anything, it's just an oversight or laziness. :-)
I've applied your patch thanks.
Longer term we should make the ipv6 tree traversals RCU safe just
like net/ipv4/fib_trie.c is. Then we can do away with even the
read locks for read-only traversals.
next prev parent reply other threads:[~2011-12-30 22:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-28 23:23 Josh Hunt
2011-12-30 22:09 ` David Miller [this message]
2011-12-31 19:49 ` Josh Hunt
2011-12-31 22:46 ` David Miller
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=20111230.170905.1348056803377924696.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jmorris@namei.org \
--cc=joshhunt00@gmail.com \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/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
all inboxes | Powered by JetHome®