public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Bob Peterson <rpeterso@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cache last free vmap_area to avoid restarting beginning
Date: Sat, 26 Jun 2010 18:35:11 +1000	[thread overview]
Message-ID: <20100626083511.GF29809@laptop> (raw)
In-Reply-To: <1731662946.966291277502022446.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>

On Fri, Jun 25, 2010 at 05:40:22PM -0400, Bob Peterson wrote:
> On 2010-05-25 8:43:23, Nick Piggin wrote:
> Hey Nick,
> 
> I spotted what seems to be a regression in this patch.
> The spin_lock was moved before the try loop:
> 
> 	spin_lock(&vmap_area_lock);
> retry:
> 
> But later, after the overflow label, it can unlock the spin_lock and
> loop back to retry without the spin_lock locked.  See:
> 
> overflow:
> 		spin_unlock(&vmap_area_lock);
> 		if (!purged) {
> 			purge_vmap_area_lazy();
> 			purged = 1;
> 			goto retry;
> 
> If I'm not mistaken we should either put the spin_lock back below the
> retry label or move the spin_unlock after the if (!purged) to prevent
> accesses without the spin_lock held.
> 
> Regards,
> 
> Bob Peterson
> Red Hat File Systems

Hi Bob,

Thanks for having a look. You are right, I think Minchan spotted
this too and the version in Andrew Morton's tree should have that
fixed.

http://userweb.kernel.org/~akpm/mmotm/broken-out/mm-vmap-area-cache.patch

Thanks,
Nick


  reply	other threads:[~2010-06-26  8:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <118879818.966271277501902144.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
2010-06-25 21:40 ` [PATCH] cache last free vmap_area to avoid restarting beginning Bob Peterson
2010-06-26  8:35   ` Nick Piggin [this message]
2010-04-12 16:27 vmalloc performance Steven Whitehouse
2010-04-14 12:49 ` Steven Whitehouse
2010-04-14 15:13   ` Minchan Kim
2010-04-14 16:35     ` Minchan Kim
2010-04-15  8:33       ` Steven Whitehouse
2010-04-15 16:51         ` Minchan Kim
2010-04-16 14:10           ` Steven Whitehouse
2010-04-18 15:14             ` Minchan Kim
2010-04-19 12:58               ` Steven Whitehouse
2010-04-19 14:12                 ` Minchan Kim
2010-04-29 13:43                   ` Steven Whitehouse
2010-05-02 17:29                     ` [PATCH] cache last free vmap_area to avoid restarting beginning Minchan Kim
2010-05-05 12:48                       ` Steven Whitehouse
2010-05-05 16:16                         ` Nick Piggin
2010-05-17 12:42                           ` Steven Whitehouse
2010-05-18 13:44                             ` Steven Whitehouse
2010-05-19 13:54                           ` Steven Whitehouse
2010-05-19 13:56                             ` Nick Piggin
2010-05-25  8:43                             ` Nick Piggin
2010-05-25 15:00                               ` Minchan Kim
2010-05-25 15:48                                 ` Steven Whitehouse
2010-05-22  9:53                           ` Minchan Kim
2010-05-24  6:23                             ` Nick Piggin

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=20100626083511.GF29809@laptop \
    --to=npiggin@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpeterso@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