diff options
author | Brian Behlendorf <[email protected]> | 2016-09-16 17:10:36 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2016-09-16 17:10:36 -0700 |
commit | cb81c0c5887ffd6d862b13bca594d522e3f8673c (patch) | |
tree | 611b0997f785460a85fc3129bdf8818a53eab8d1 /module/spl/spl-kmem.c | |
parent | 49fbac3acecf384454aa8a6e9604a311848d864e (diff) |
Increase spl_kmem_alloc_warn limit
In order to support ABD with large blocks the spl_kmem_alloc_warn
limit needs to be increased to 64K.
A 16M block requires that pointers be stored for 4096 4K-pages
on an x86_64 system. Each of these pointers is 8 bytes requiring
an allocation of 8*4096=32,768 bytes. The addition of a small
header to this structure pushes the allocation over the default
32K warning threshold.
In addition, fix a small bug where MAX was used instead of MIN
when setting the default. This ensures a reasonable limit is
still set on systems with page sizes larger then 4K.
Reviewed-by: David Quigley <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #571
Diffstat (limited to 'module/spl/spl-kmem.c')
-rwxr-xr-x | module/spl/spl-kmem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 2b68c297a..41bec75d2 100755 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -35,7 +35,7 @@ * rate limited warning will be printed to the console for any kmem_alloc() * which exceeds a reasonable threshold. * - * The default warning threshold is set to eight pages but capped at 32K to + * The default warning threshold is set to sixteen pages but capped at 64K to * accommodate systems using large pages. This value was selected to be small * enough to ensure the largest allocations are quickly noticed and fixed. * But large enough to avoid logging any warnings when a allocation size is @@ -44,7 +44,7 @@ * allocations are quickly caught. These warnings may be disabled by setting * the threshold to zero. */ -unsigned int spl_kmem_alloc_warn = MAX(8 * PAGE_SIZE, 32 * 1024); +unsigned int spl_kmem_alloc_warn = MIN(16 * PAGE_SIZE, 64 * 1024); module_param(spl_kmem_alloc_warn, uint, 0644); MODULE_PARM_DESC(spl_kmem_alloc_warn, "Warning threshold in bytes for a kmem_alloc()"); |