mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
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 <ryao@cs.stonybrook.edu>
This commit is contained in:
parent
bef14fbc8c
commit
feaf1e321d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user