From: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
netdev@vger.kernel.org, Alexey Dobriyan <adobriyan@gmail.com>,
Octavian Purdila <tavi@cs.pub.ro>,
"David S . Miller" <davem@davemloft.net>
Subject: Re: [v3 00/39] faster tree-based sysctl implementation
Date: Mon, 23 May 2011 09:37:35 +0300 [thread overview]
Message-ID: <BANLkTinqX_=TLU3TuKJFFTJBBxm1scZ3Ew@mail.gmail.com> (raw)
In-Reply-To: <m14o4mavod.fsf@fess.ebiederm.org>
On Mon, May 23, 2011 at 7:27 AM, Eric W. Biederman
<ebiederm@xmission.com> wrote:
> This patchset looks like it is deserving of some close scrutiny, and
> not just the high level design overview I have given the previous
> patches. This is going to be a busy week for me so I probably won't
> get through all of the patches for a while.
I have one more question. The current implementation uses a single
sysctl_lock to synchronize all changes to the data structures.
In my algorithm I change a few places to use a per-header read-write
lock. Even though the code is organized to handle a per-header rwlock,
the implementation uses a single global rwlock. In v2 I got rid of the
rwlock and replaced the subdirs/files regular lists with rcu-protected
lists and that's why I did not bother giving each header a rwlock.
I have no idea how to use rcu with rbtree. Should I now give each
header it's own lock to reduce contention?
I'm asking this because I don't know why the only is a global sysctl
spin lock, when multiple locks could have been used, each to protect
it's own domain of values.
If you'd like to keep locking as simple as possible (to reduce all the
potential problems brought on by too many locks), or if in general
contention is low enough, then global lock is better. If not, then
I'll change the code to support per-header rwlocks (increasing the
ctl_table_header structure size).
--
.
..: Lucian
next prev parent reply other threads:[~2011-05-23 6:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-23 1:56 [v3 00/39] faster tree-based sysctl implementation Lucian Adrian Grijincu
2011-05-23 4:27 ` Eric W. Biederman
2011-05-23 5:59 ` Lucian Adrian Grijincu
2011-05-23 6:37 ` Lucian Adrian Grijincu [this message]
2011-05-23 9:32 ` Eric W. Biederman
2011-05-23 13:26 ` Lucian Adrian Grijincu
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='BANLkTinqX_=TLU3TuKJFFTJBBxm1scZ3Ew@mail.gmail.com' \
--to=lucian.grijincu@gmail.com \
--cc=adobriyan@gmail.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tavi@cs.pub.ro \
/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;
as well as URLs for NNTP newsgroup(s).