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:
наб
2022-01-15 00:37:55 +01:00
committed by GitHub
parent 7adc190098
commit 18168da727
147 changed files with 781 additions and 876 deletions
+4 -4
View File
@@ -96,12 +96,12 @@
/*
* Maximum size of TRIM I/O, ranges will be chunked in to 128MiB lengths.
*/
unsigned int zfs_trim_extent_bytes_max = 128 * 1024 * 1024;
static unsigned int zfs_trim_extent_bytes_max = 128 * 1024 * 1024;
/*
* Minimum size of TRIM I/O, extents smaller than 32Kib will be skipped.
*/
unsigned int zfs_trim_extent_bytes_min = 32 * 1024;
static unsigned int zfs_trim_extent_bytes_min = 32 * 1024;
/*
* Skip uninitialized metaslabs during the TRIM process. This option is
@@ -118,7 +118,7 @@ unsigned int zfs_trim_metaslab_skip = 0;
* concurrent TRIM I/Os issued to the device is controlled by the
* zfs_vdev_trim_min_active and zfs_vdev_trim_max_active module options.
*/
unsigned int zfs_trim_queue_limit = 10;
static unsigned int zfs_trim_queue_limit = 10;
/*
* The minimum number of transaction groups between automatic trims of a
@@ -134,7 +134,7 @@ unsigned int zfs_trim_queue_limit = 10;
* has the opposite effect. The default value of 32 was determined though
* testing to be a reasonable compromise.
*/
unsigned int zfs_trim_txg_batch = 32;
static unsigned int zfs_trim_txg_batch = 32;
/*
* The trim_args are a control structure which describe how a leaf vdev