linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Nathan Zimmer <nzimmer@sgi.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	David Woodhouse <dwmw2@infradead.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH resend] fs/proc: Move kfree outside pde_unload_lock
Date: Thu, 4 Apr 2013 17:11:40 +0100	[thread overview]
Message-ID: <20130404161140.GR21522@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1365090819-25448-1-git-send-email-nzimmer@sgi.com>

On Thu, Apr 04, 2013 at 10:53:39AM -0500, Nathan Zimmer wrote:
> 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.

Umm...  That'll get wrecked as soon as fixes from #experimental go in;
FWIW, I'd probably make close_pdeo() return pdeo or NULL, depending on
whether we want it freed.  With kfree() itself taken to callers.
But there's much bigger fish to fry there - turn use_pde() into
return atomic_inc_unless_negative(&pde->pde_users), unuse_pde() into
if (atomic_dec_return(&pde->pde_users) == BIAS) complete(pde->....)
and make sure entry_rundown() sets completion *before* adding BIAS
to pde_users and waits for it only if the sum was equal to BIAS.
The spinlock is still needed, but only on the "now taking care of
any pdeo that might still be around" side of things - it protects
pdeo list.

Again, see the last two commits of vfs.git#experimental.  I'd certainly
appreciate any extra eyes on that sucker...

  reply	other threads:[~2013-04-04 16:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-04  6:26 linux-next: manual merge of the akpm tree with the vfs tree Stephen Rothwell
2013-04-04  6:56 ` Andrew Morton
2013-04-04  7:02   ` Andrew Morton
2013-04-04  8:10     ` Al Viro
2013-04-04 23:18       ` Stephen Rothwell
2013-04-04  8:02   ` Al Viro
2013-04-04 15:43     ` Nathan Zimmer
2013-04-04 15:53       ` [PATCH resend] fs/proc: Move kfree outside pde_unload_lock Nathan Zimmer
2013-04-04 16:11         ` Al Viro [this message]
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=20130404161140.GR21522@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --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=nzimmer@sgi.com \
    --cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).