From: Nathan Zimmer <nzimmer@sgi.com>
To: viro@zeniv.linux.org.uk, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Nathan Zimmer <nzimmer@sgi.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
David Woodhouse <dwmw2@infradead.org>, <stable@vger.kernel.org>
Subject: [PATCH resend] fs/proc: Move kfree outside pde_unload_lock
Date: Thu, 4 Apr 2013 10:53:39 -0500 [thread overview]
Message-ID: <1365090819-25448-1-git-send-email-nzimmer@sgi.com> (raw)
In-Reply-To: <515D9F8A.2060505@sgi.com>
This moves a kfree outside a spinlock to help scaling on larger (512 core)
systems. This should be some relief until we can move the section to use
the rcu.
I ran a simple test which just reads from /proc/cpuinfo.
Lower is better, as you can see the worst case scenario is improved.
baseline moved kfree
tasks read-sec read-sec
1 0.0141 0.0141
2 0.0140 0.0140
4 0.0140 0.0141
8 0.0145 0.0145
16 0.0553 0.0548
32 0.1688 0.1622
64 0.5017 0.3856
128 1.7005 0.9710
256 5.2513 2.6519
512 8.0529 6.2976
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: <stable@vger.kernel.org>
Acked-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Nathan Zimmer <nzimmer@sgi.com>
---
fs/proc/inode.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 439ae688..863608b 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -403,11 +403,10 @@ static int proc_reg_release(struct inode *inode, struct file *file)
}
pde->pde_users++;
release = pde->proc_fops->release;
- if (pdeo) {
+ if (pdeo)
list_del(&pdeo->lh);
- kfree(pdeo);
- }
spin_unlock(&pde->pde_unload_lock);
+ kfree(pdeo);
if (release)
rv = release(inode, file);
--
1.8.1.2
next parent reply other threads:[~2013-04-04 15:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <515D9F8A.2060505@sgi.com>
2013-04-04 15:53 ` Nathan Zimmer [this message]
2013-04-04 16:11 ` [PATCH resend] fs/proc: Move kfree outside pde_unload_lock Al Viro
2013-04-04 17:12 ` Nathan Zimmer
2013-04-04 20:44 ` Al Viro
2013-04-05 17:05 ` Nathan Zimmer
2013-04-05 17:36 ` Al Viro
2013-04-05 20:56 ` Nathan Zimmer
2013-04-05 21:00 ` Al Viro
2013-04-08 15:34 ` Nathan Zimmer
2013-04-08 15:58 ` Al Viro
2013-04-08 16:42 ` Nathan Zimmer
2013-04-08 20:52 ` Nathan Zimmer
2013-04-08 21:23 ` Al Viro
2013-04-08 21:48 ` hangs on boot in 9984d7394618df9 Al Viro
2013-04-08 22:17 ` Stephen Warren
2013-04-08 22:45 ` Doug Anderson
2013-04-08 23:06 ` Al Viro
2013-04-08 23:20 ` Stephen Warren
2013-04-08 23:46 ` Doug Anderson
2013-04-09 17:12 ` Nathan Zimmer
2013-04-08 22:46 ` Al Viro
2013-04-08 22:57 ` Al Viro
2013-04-08 21:56 ` [PATCH resend] fs/proc: Move kfree outside pde_unload_lock Nathan Zimmer
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=1365090819-25448-1-git-send-email-nzimmer@sgi.com \
--to=nzimmer@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=dwmw2@infradead.org \
--cc=ebiederm@xmission.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).