lkml.org 
[lkml]   [2010]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cache last free vmap_area to avoid restarting beginning
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



\
 
 \ /
  Last update: 2010-06-26 10:37    [W:0.045 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site