Fix race in kmem_locking test

Reduce max memory usage for kmem_locking tests (for low memory machines)



git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@145 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
behlendo 2008-07-07 22:15:04 +00:00
parent f78a933f8a
commit 97f274d46d
1 changed files with 6 additions and 4 deletions

View File

@ -625,7 +625,9 @@ splat_kmem_test8_sc(struct file *file, void *arg, int size, int count)
thr = thread_create(NULL, 0, splat_kmem_test8_thread, thr = thread_create(NULL, 0, splat_kmem_test8_thread,
&kcp, 0, &p0, TS_RUN, minclsyspri); &kcp, 0, &p0, TS_RUN, minclsyspri);
ASSERT(thr != NULL); ASSERT(thr != NULL);
spin_lock(&kcp.kcp_lock);
kcp.kcp_threads++; kcp.kcp_threads++;
spin_unlock(&kcp.kcp_lock);
} }
/* Sleep until the thread sets kcp.kcp_threads == 0 */ /* Sleep until the thread sets kcp.kcp_threads == 0 */
@ -662,7 +664,7 @@ splat_kmem_test8(struct file *file, void *arg)
/* Run through slab cache with objects size from /* Run through slab cache with objects size from
* 16-1Mb in 4x multiples with 1024 objects each */ * 16-1Mb in 4x multiples with 1024 objects each */
for (i = 16; i <= 1024*1024; i *= 4) { for (i = 16; i <= 1024*1024; i *= 4) {
rc = splat_kmem_test8_sc(file, arg, i, 1024); rc = splat_kmem_test8_sc(file, arg, i, 256);
if (rc) if (rc)
break; break;
} }