mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
module/*.ko: prune .data, global .rodata
Evaluated every variable that lives in .data (and globals in .rodata) in the kernel modules, and constified/eliminated/localised them appropriately. This means that all read-only data is now actually read-only data, and, if possible, at file scope. A lot of previously- global-symbols became inlinable (and inlined!) constants. Probably not in a big Wowee Performance Moment, but hey. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12899
This commit is contained in:
+12
-13
@@ -235,14 +235,13 @@
|
||||
static avl_tree_t spa_namespace_avl;
|
||||
kmutex_t spa_namespace_lock;
|
||||
static kcondvar_t spa_namespace_cv;
|
||||
int spa_max_replication_override = SPA_DVAS_PER_BP;
|
||||
static const int spa_max_replication_override = SPA_DVAS_PER_BP;
|
||||
|
||||
static kmutex_t spa_spare_lock;
|
||||
static avl_tree_t spa_spare_avl;
|
||||
static kmutex_t spa_l2cache_lock;
|
||||
static avl_tree_t spa_l2cache_avl;
|
||||
|
||||
kmem_cache_t *spa_buffer_pool;
|
||||
spa_mode_t spa_mode_global = SPA_MODE_UNINIT;
|
||||
|
||||
#ifdef ZFS_DEBUG
|
||||
@@ -304,25 +303,25 @@ int zfs_free_leak_on_eio = B_FALSE;
|
||||
* has not completed in zfs_deadman_synctime_ms is considered "hung" resulting
|
||||
* in one of three behaviors controlled by zfs_deadman_failmode.
|
||||
*/
|
||||
unsigned long zfs_deadman_synctime_ms = 600000UL;
|
||||
unsigned long zfs_deadman_synctime_ms = 600000UL; /* 10 min. */
|
||||
|
||||
/*
|
||||
* This value controls the maximum amount of time zio_wait() will block for an
|
||||
* outstanding IO. By default this is 300 seconds at which point the "hung"
|
||||
* behavior will be applied as described for zfs_deadman_synctime_ms.
|
||||
*/
|
||||
unsigned long zfs_deadman_ziotime_ms = 300000UL;
|
||||
unsigned long zfs_deadman_ziotime_ms = 300000UL; /* 5 min. */
|
||||
|
||||
/*
|
||||
* Check time in milliseconds. This defines the frequency at which we check
|
||||
* for hung I/O.
|
||||
*/
|
||||
unsigned long zfs_deadman_checktime_ms = 60000UL;
|
||||
unsigned long zfs_deadman_checktime_ms = 60000UL; /* 1 min. */
|
||||
|
||||
/*
|
||||
* By default the deadman is enabled.
|
||||
*/
|
||||
int zfs_deadman_enabled = 1;
|
||||
int zfs_deadman_enabled = B_TRUE;
|
||||
|
||||
/*
|
||||
* Controls the behavior of the deadman when it detects a "hung" I/O.
|
||||
@@ -332,7 +331,7 @@ int zfs_deadman_enabled = 1;
|
||||
* continue - Attempt to recover from a "hung" I/O
|
||||
* panic - Panic the system
|
||||
*/
|
||||
char *zfs_deadman_failmode = "wait";
|
||||
const char *zfs_deadman_failmode = "wait";
|
||||
|
||||
/*
|
||||
* The worst case is single-sector max-parity RAID-Z blocks, in which
|
||||
@@ -384,9 +383,9 @@ int spa_asize_inflation = 24;
|
||||
* See also the comments in zfs_space_check_t.
|
||||
*/
|
||||
int spa_slop_shift = 5;
|
||||
uint64_t spa_min_slop = 128ULL * 1024 * 1024;
|
||||
uint64_t spa_max_slop = 128ULL * 1024 * 1024 * 1024;
|
||||
int spa_allocators = 4;
|
||||
static const uint64_t spa_min_slop = 128ULL * 1024 * 1024;
|
||||
static const uint64_t spa_max_slop = 128ULL * 1024 * 1024 * 1024;
|
||||
static const int spa_allocators = 4;
|
||||
|
||||
|
||||
void
|
||||
@@ -420,15 +419,15 @@ spa_load_note(spa_t *spa, const char *fmt, ...)
|
||||
/*
|
||||
* By default dedup and user data indirects land in the special class
|
||||
*/
|
||||
int zfs_ddt_data_is_special = B_TRUE;
|
||||
int zfs_user_indirect_is_special = B_TRUE;
|
||||
static int zfs_ddt_data_is_special = B_TRUE;
|
||||
static int zfs_user_indirect_is_special = B_TRUE;
|
||||
|
||||
/*
|
||||
* The percentage of special class final space reserved for metadata only.
|
||||
* Once we allocate 100 - zfs_special_class_metadata_reserve_pct we only
|
||||
* let metadata into the class.
|
||||
*/
|
||||
int zfs_special_class_metadata_reserve_pct = 25;
|
||||
static int zfs_special_class_metadata_reserve_pct = 25;
|
||||
|
||||
/*
|
||||
* ==========================================================================
|
||||
|
||||
Reference in New Issue
Block a user