mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user