Limit zfs_dirty_data_max_max to 4G
Reinstate default 4G zfs_dirty_data_max_max limit. Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Reviewed-by: Chunwei Chen <david.chen@osnexus.com> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #6072 Closes #6081
This commit is contained in:
parent
1e5f75ecbe
commit
a83a4f9d10
|
@ -5475,11 +5475,12 @@ arc_init(void)
|
||||||
* If it has been set by a module parameter, take that.
|
* If it has been set by a module parameter, take that.
|
||||||
* Otherwise, use a percentage of physical memory defined by
|
* Otherwise, use a percentage of physical memory defined by
|
||||||
* zfs_dirty_data_max_percent (default 10%) with a cap at
|
* zfs_dirty_data_max_percent (default 10%) with a cap at
|
||||||
* zfs_dirty_data_max_max (default 25% of physical memory).
|
* zfs_dirty_data_max_max (default 4G or 25% of physical memory).
|
||||||
*/
|
*/
|
||||||
if (zfs_dirty_data_max_max == 0)
|
if (zfs_dirty_data_max_max == 0)
|
||||||
zfs_dirty_data_max_max = (uint64_t)physmem * PAGESIZE *
|
zfs_dirty_data_max_max = MIN(4ULL * 1024 * 1024 * 1024,
|
||||||
zfs_dirty_data_max_max_percent / 100;
|
(uint64_t)physmem * PAGESIZE *
|
||||||
|
zfs_dirty_data_max_max_percent / 100);
|
||||||
|
|
||||||
if (zfs_dirty_data_max == 0) {
|
if (zfs_dirty_data_max == 0) {
|
||||||
zfs_dirty_data_max = (uint64_t)physmem * PAGESIZE *
|
zfs_dirty_data_max = (uint64_t)physmem * PAGESIZE *
|
||||||
|
|
Loading…
Reference in New Issue