diff options
author | Brian Behlendorf <[email protected]> | 2013-02-01 09:33:04 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-02-01 11:17:14 -0800 |
commit | 0c5493d47059f25ce9dbf20c9fe87655f55102a1 (patch) | |
tree | 4d9643b3b516172560b2220748dd72820f849d2d /module | |
parent | 1f7c30df8fe2ca778a83a83ba7f98de883881d42 (diff) |
Add zfs_arc_memory_throttle_disable module option
The way in which virtual box ab(uses) memory can throw off the
free memory calculation in arc_memory_throttle(). The result is
the txg_sync thread will effectively spin waiting for memory to
be released even though there's lots of memory on the system.
To handle this case I'm adding a zfs_arc_memory_throttle_disable
module option largely for virtual box users. Setting this option
disables free memory checks which allows the txg_sync thread to
make progress.
By default this option is disabled to preserve the current
behavior. However, because Linux supports direct memory reclaim
it's doubtful throttling due to perceived memory pressure is ever
a good idea. We should enable this option by default once we've
done enough real world testing to convince ourselve there aren't
any unexpected side effects.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #938
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/arc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index eab1b1698..09924dbdb 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -189,6 +189,7 @@ unsigned long zfs_arc_meta_limit = 0; int zfs_arc_grow_retry = 0; int zfs_arc_shrink_shift = 0; int zfs_arc_p_min_shift = 0; +int zfs_arc_memory_throttle_disable = 0; int zfs_disable_dup_eviction = 0; int zfs_arc_meta_prune = 0; @@ -3633,6 +3634,9 @@ arc_memory_throttle(uint64_t reserve, uint64_t inflight_data, uint64_t txg) #ifdef _KERNEL uint64_t available_memory; + if (zfs_arc_memory_throttle_disable) + return (0); + /* Easily reclaimable memory (free + inactive + arc-evictable) */ available_memory = ptob(spl_kmem_availrmem()) + arc_evictable_memory(); @@ -5045,6 +5049,9 @@ MODULE_PARM_DESC(zfs_arc_p_min_shift, "arc_c shift to calc min/max arc_p"); module_param(zfs_disable_dup_eviction, int, 0644); MODULE_PARM_DESC(zfs_disable_dup_eviction, "disable duplicate buffer eviction"); +module_param(zfs_arc_memory_throttle_disable, int, 0644); +MODULE_PARM_DESC(zfs_arc_memory_throttle_disable, "disable memory throttle"); + module_param(l2arc_write_max, ulong, 0444); MODULE_PARM_DESC(l2arc_write_max, "Max write bytes per interval"); |