From: Alexey Dobriyan <adobriyan@gmail.com>
To: Nathan Zimmer <nzimmer@sgi.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] Move kfree outside pde_unload_lock
Date: Wed, 22 Aug 2012 01:03:52 +0300 [thread overview]
Message-ID: <20120821220351.GA4463@p183.telecom.by> (raw)
In-Reply-To: <20120821205454.GA7772@gulag1.americas.sgi.com>
On Tue, Aug 21, 2012 at 03:54:54PM -0500, Nathan Zimmer wrote:
> I am currently tracking a hotlock reported by a customer on a large, 512 cores,
> system, I am currently running 3.6.0 rc1 but the issue looks like it has been
> this way for a very long time.
> The offending lock is proc_dir_entry->pde_unload_lock.
>
> In proc_reg_release we are doing a kfree under the spinlock which is ok but it
> means we are holding the lock longer then required. Scaling improved when I
> moved kfree out.
It's OK to move it out.
Acked-by: Alexey Dobriyan <adobriyan@gmail.com>
> Also shouldn't the comment on pde_unload_lock also note that pde_openers and
> pde_unload_completion are both used under the lock?
Yeah, why not.
> --- a/fs/proc/inode.c
> +++ b/fs/proc/inode.c
> @@ -403,9 +403,11 @@ static int proc_reg_release(struct inode *inode, struct file *file)
> release = pde->proc_fops->release;
> if (pdeo) {
> list_del(&pdeo->lh);
> - kfree(pdeo);
> }
> spin_unlock(&pde->pde_unload_lock);
> + if (pdeo) {
> + kfree(pdeo);
> + }
>
> if (release)
> rv = release(inode, file);
next prev parent reply other threads:[~2012-08-21 22:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-21 20:54 Nathan Zimmer
2012-08-21 22:03 ` Alexey Dobriyan [this message]
2012-08-22 9:24 ` David Woodhouse
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=20120821220351.GA4463@p183.telecom.by \
--to=adobriyan@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nzimmer@sgi.com \
--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
all inboxes | Powered by JetHome®