From: Thomas Gleixner <tglx@linutronix.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
RT <linux-rt-users@vger.kernel.org>,
Clark Williams <williams@redhat.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [RFC][PATCH RT] rwsem_rt: Another (more sane) approach to mulit reader rt locks
Date: Tue, 22 May 2012 17:26:38 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.02.1205221553400.3231@ionos> (raw)
In-Reply-To: <1337090625.14207.304.camel@gandalf.stny.rr.com>
On Tue, 15 May 2012, Steven Rostedt wrote:
> +struct rw_semaphore {
> + int initialized;
> + struct __rw_semaphore lock[NR_CPUS];
So that will blow up every rw_semaphore user by
NR_CPUS * sizeof(struct __rw_semaphore)
With lockdep off thats: NR_CPUS * 48
With lockdep on thats: NR_CPUS * 128 + NR_CPUS * 8 (__key)
So for NR_CPUS=64 that's 3072 or 8704 Bytes.
That'll make e.g. XFS happy. xfs_inode has two rw_sems.
sizeof(xfs_inode) in mainline is: 856 bytes
sizeof(xfs_inode) on RT is: 1028 bytes
But with your change it would goto (NR_CPUS = 64):
1028 - 96 + 2 * 3072 = 7076 bytes
That's almost an order of magnitude!
NFS has an rwsem in the inode as well, and ext4 has two.
So we trade massive memory waste for how much performance?
We really need numbers for various scenarios. There are applications
which are pretty mmap heavy and it would really surprise me when
taking NR_CPUS locks in one go is not going to cause a massive
overhead.
Thanks,
tglx
next prev parent reply other threads:[~2012-05-22 15:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-15 14:03 [RFC][PATCH RT] rwsem_rt: Another (more sane) approach to mulit reader rt locks Steven Rostedt
2012-05-15 15:06 ` Peter Zijlstra
2012-05-15 15:42 ` Steven Rostedt
2012-05-15 17:25 ` Steven Rostedt
2012-05-15 17:31 ` Peter Zijlstra
2012-05-15 17:43 ` Steven Rostedt
2012-05-15 16:26 ` Steven Rostedt
2012-05-15 18:00 ` John Kacur
2012-05-15 18:14 ` Steven Rostedt
2012-05-17 15:18 ` Paul E. McKenney
2012-05-17 15:25 ` Paul E. McKenney
2012-05-17 15:32 ` Peter Zijlstra
2012-05-17 15:47 ` Paul E. McKenney
2012-05-17 16:17 ` Peter Zijlstra
2012-05-17 20:08 ` Paul E. McKenney
2012-05-17 20:20 ` Peter Zijlstra
2012-05-22 15:26 ` Thomas Gleixner [this message]
2012-05-22 15:50 ` Steven Rostedt
2012-05-22 16:40 ` Thomas Gleixner
2012-05-22 16:52 ` Steven Rostedt
2012-05-22 17:07 ` Thomas Gleixner
2012-05-22 17:50 ` Steven Rostedt
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=alpine.LFD.2.02.1205221553400.3231@ionos \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=williams@redhat.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;
as well as URLs for NNTP newsgroup(s).