Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119188
b: refs/heads/master
c: 496850e
h: refs/heads/master
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Nov 20, 2008
1 parent 0d7f9ad commit 5cc91ff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f011c2dae6cffc50ef67d9bd937b488ba5db8913
refs/heads/master: 496850e5f5a372029ceb2b35c811770a9bb073b6
15 changes: 13 additions & 2 deletions trunk/mm/vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,14 +521,25 @@ static void __purge_vmap_area_lazy(unsigned long *start, unsigned long *end,
spin_unlock(&purge_lock);
}

/*
* Kick off a purge of the outstanding lazy areas. Don't bother if somebody
* is already purging.
*/
static void try_purge_vmap_area_lazy(void)
{
unsigned long start = ULONG_MAX, end = 0;

__purge_vmap_area_lazy(&start, &end, 0, 0);
}

/*
* Kick off a purge of the outstanding lazy areas.
*/
static void purge_vmap_area_lazy(void)
{
unsigned long start = ULONG_MAX, end = 0;

__purge_vmap_area_lazy(&start, &end, 0, 0);
__purge_vmap_area_lazy(&start, &end, 1, 0);
}

/*
Expand All @@ -539,7 +550,7 @@ static void free_unmap_vmap_area(struct vmap_area *va)
va->flags |= VM_LAZY_FREE;
atomic_add((va->va_end - va->va_start) >> PAGE_SHIFT, &vmap_lazy_nr);
if (unlikely(atomic_read(&vmap_lazy_nr) > lazy_max_pages()))
purge_vmap_area_lazy();
try_purge_vmap_area_lazy();
}

static struct vmap_area *find_vmap_area(unsigned long addr)
Expand Down

0 comments on commit 5cc91ff

Please sign in to comment.