Fix kmem memory accounting

Adjust kmem slab interface to make a copy of the slab name before
passing it on to the linux slab (we free it latter too)



git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@47 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
behlendo
2008-03-14 20:56:26 +00:00
parent 79b31f3601
commit c19c06f3b0
4 changed files with 74 additions and 24 deletions
+12
View File
@@ -35,6 +35,10 @@ splat_kmem_test1(struct file *file, void *arg)
int size = PAGE_SIZE;
int i, count, rc = 0;
/* We are intentionally going to push kmem_alloc to its max
* allocation size, so suppress the console warnings for now */
kmem_set_warning(0);
while ((!rc) && (size <= (PAGE_SIZE * 32))) {
count = 0;
@@ -57,6 +61,8 @@ splat_kmem_test1(struct file *file, void *arg)
size *= 2;
}
kmem_set_warning(1);
return rc;
}
@@ -67,6 +73,10 @@ splat_kmem_test2(struct file *file, void *arg)
int size = PAGE_SIZE;
int i, j, count, rc = 0;
/* We are intentionally going to push kmem_alloc to its max
* allocation size, so suppress the console warnings for now */
kmem_set_warning(0);
while ((!rc) && (size <= (PAGE_SIZE * 32))) {
count = 0;
@@ -101,6 +111,8 @@ splat_kmem_test2(struct file *file, void *arg)
size *= 2;
}
kmem_set_warning(1);
return rc;
}