summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2013-03-21 13:21:11 -0400
committerBrian Behlendorf <[email protected]>2013-03-21 12:58:44 -0700
commitfeaf1e321da97ab0aaa60edc121fb6aa2d03952d (patch)
tree1bbff4a9ce8ede310366fb0339e8bc6ef870e116 /module
parentbef14fbc8c29fb07a34fc3ac7f70ef8c2f8d1c0e (diff)
Do not call cond_resched() in spl_slab_reclaim()
Calling cond_resched() after each object is freed and then after each slab is freed can cause slabs of objects to live for excessive periods of time following reclaimation. This interferes with the kernel's own memory management when called from kswapd and can cause direct reclaim to occur in response to memory pressure that should have been resolved. Signed-off-by: Richard Yao <[email protected]>
Diffstat (limited to 'module')
-rw-r--r--module/spl/spl-kmem.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
index f9c111491..a0ca2d2be 100644
--- a/module/spl/spl-kmem.c
+++ b/module/spl/spl-kmem.c
@@ -1112,14 +1112,11 @@ spl_slab_reclaim(spl_kmem_cache_t *skc, int count, int flag)
if (skc->skc_flags & KMC_OFFSLAB)
kv_free(skc, sko->sko_addr, size);
-
- cond_resched();
}
list_for_each_entry_safe(sks, m, &sks_list, sks_list) {
ASSERT(sks->sks_magic == SKS_MAGIC);
kv_free(skc, sks, skc->skc_slab_size);
- cond_resched();
}
SEXIT;