mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
Make module tunables cross platform
Adds ZFS_MODULE_PARAM to abstract module parameter setting to operating systems other than Linux. Reviewed-by: Jorgen Lundman <lundman@lundman.net> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Signed-off-by: Ryan Moeller <ryan@ixsystems.com> Closes #9230
This commit is contained in:
committed by
Brian Behlendorf
parent
65a91b166e
commit
03fdcb9adc
+20
-30
@@ -1342,53 +1342,43 @@ dsl_pool_config_held_writer(dsl_pool_t *dp)
|
||||
return (RRW_WRITE_HELD(&dp->dp_config_rwlock));
|
||||
}
|
||||
|
||||
#if defined(_KERNEL)
|
||||
EXPORT_SYMBOL(dsl_pool_config_enter);
|
||||
EXPORT_SYMBOL(dsl_pool_config_exit);
|
||||
|
||||
/* BEGIN CSTYLED */
|
||||
/* zfs_dirty_data_max_percent only applied at module load in arc_init(). */
|
||||
module_param(zfs_dirty_data_max_percent, int, 0444);
|
||||
MODULE_PARM_DESC(zfs_dirty_data_max_percent, "percent of ram can be dirty");
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, dirty_data_max_percent, INT, ZMOD_RD,
|
||||
"Max percent of RAM allowed to be dirty");
|
||||
|
||||
/* zfs_dirty_data_max_max_percent only applied at module load in arc_init(). */
|
||||
module_param(zfs_dirty_data_max_max_percent, int, 0444);
|
||||
MODULE_PARM_DESC(zfs_dirty_data_max_max_percent,
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, dirty_data_max_max_percent, INT, ZMOD_RD,
|
||||
"zfs_dirty_data_max upper bound as % of RAM");
|
||||
|
||||
module_param(zfs_delay_min_dirty_percent, int, 0644);
|
||||
MODULE_PARM_DESC(zfs_delay_min_dirty_percent, "transaction delay threshold");
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, delay_min_dirty_percent, INT, ZMOD_RW,
|
||||
"Transaction delay threshold");
|
||||
|
||||
module_param(zfs_dirty_data_max, ulong, 0644);
|
||||
MODULE_PARM_DESC(zfs_dirty_data_max, "determines the dirty space limit");
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, dirty_data_max, ULONG, ZMOD_RW,
|
||||
"Determines the dirty space limit");
|
||||
|
||||
/* zfs_dirty_data_max_max only applied at module load in arc_init(). */
|
||||
module_param(zfs_dirty_data_max_max, ulong, 0444);
|
||||
MODULE_PARM_DESC(zfs_dirty_data_max_max,
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, dirty_data_max_max, ULONG, ZMOD_RD,
|
||||
"zfs_dirty_data_max upper bound in bytes");
|
||||
|
||||
module_param(zfs_dirty_data_sync_percent, int, 0644);
|
||||
MODULE_PARM_DESC(zfs_dirty_data_sync_percent,
|
||||
"dirty data txg sync threshold as a percentage of zfs_dirty_data_max");
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, dirty_data_sync_percent, INT, ZMOD_RW,
|
||||
"Dirty data txg sync threshold as a percentage of zfs_dirty_data_max");
|
||||
|
||||
module_param(zfs_delay_scale, ulong, 0644);
|
||||
MODULE_PARM_DESC(zfs_delay_scale, "how quickly delay approaches infinity");
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, delay_scale, ULONG, ZMOD_RW,
|
||||
"How quickly delay approaches infinity");
|
||||
|
||||
module_param(zfs_sync_taskq_batch_pct, int, 0644);
|
||||
MODULE_PARM_DESC(zfs_sync_taskq_batch_pct,
|
||||
"max percent of CPUs that are used to sync dirty data");
|
||||
ZFS_MODULE_PARAM(zfs, zfs_, sync_taskq_batch_pct, INT, ZMOD_RW,
|
||||
"Max percent of CPUs that are used to sync dirty data");
|
||||
|
||||
module_param(zfs_zil_clean_taskq_nthr_pct, int, 0644);
|
||||
MODULE_PARM_DESC(zfs_zil_clean_taskq_nthr_pct,
|
||||
"max percent of CPUs that are used per dp_sync_taskq");
|
||||
ZFS_MODULE_PARAM(zfs_zil, zfs_zil_, clean_taskq_nthr_pct, INT, ZMOD_RW,
|
||||
"Max percent of CPUs that are used per dp_sync_taskq");
|
||||
|
||||
module_param(zfs_zil_clean_taskq_minalloc, int, 0644);
|
||||
MODULE_PARM_DESC(zfs_zil_clean_taskq_minalloc,
|
||||
"number of taskq entries that are pre-populated");
|
||||
|
||||
module_param(zfs_zil_clean_taskq_maxalloc, int, 0644);
|
||||
MODULE_PARM_DESC(zfs_zil_clean_taskq_maxalloc,
|
||||
"max number of taskq entries that are cached");
|
||||
ZFS_MODULE_PARAM(zfs_zil, zfs_zil_, clean_taskq_minalloc, INT, ZMOD_RW,
|
||||
"Number of taskq entries that are pre-populated");
|
||||
|
||||
ZFS_MODULE_PARAM(zfs_zil, zfs_zil_, clean_taskq_maxalloc, INT, ZMOD_RW,
|
||||
"Max number of taskq entries that are cached");
|
||||
/* END CSTYLED */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user