mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-26 12:12:13 +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:
+7
-7
@@ -55,7 +55,7 @@
|
||||
#include <sys/wmsum.h>
|
||||
#include <sys/vdev_impl.h>
|
||||
|
||||
kstat_t *dbuf_ksp;
|
||||
static kstat_t *dbuf_ksp;
|
||||
|
||||
typedef struct dbuf_stats {
|
||||
/*
|
||||
@@ -225,12 +225,12 @@ typedef struct dbuf_cache {
|
||||
dbuf_cache_t dbuf_caches[DB_CACHE_MAX];
|
||||
|
||||
/* Size limits for the caches */
|
||||
unsigned long dbuf_cache_max_bytes = ULONG_MAX;
|
||||
unsigned long dbuf_metadata_cache_max_bytes = ULONG_MAX;
|
||||
static unsigned long dbuf_cache_max_bytes = ULONG_MAX;
|
||||
static unsigned long dbuf_metadata_cache_max_bytes = ULONG_MAX;
|
||||
|
||||
/* Set the default sizes of the caches to log2 fraction of arc size */
|
||||
int dbuf_cache_shift = 5;
|
||||
int dbuf_metadata_cache_shift = 6;
|
||||
static int dbuf_cache_shift = 5;
|
||||
static int dbuf_metadata_cache_shift = 6;
|
||||
|
||||
static unsigned long dbuf_cache_target_bytes(void);
|
||||
static unsigned long dbuf_metadata_cache_target_bytes(void);
|
||||
@@ -277,8 +277,8 @@ static unsigned long dbuf_metadata_cache_target_bytes(void);
|
||||
/*
|
||||
* The percentage above and below the maximum cache size.
|
||||
*/
|
||||
uint_t dbuf_cache_hiwater_pct = 10;
|
||||
uint_t dbuf_cache_lowater_pct = 10;
|
||||
static uint_t dbuf_cache_hiwater_pct = 10;
|
||||
static uint_t dbuf_cache_lowater_pct = 10;
|
||||
|
||||
static int
|
||||
dbuf_cons(void *vdb, void *unused, int kmflag)
|
||||
|
||||
Reference in New Issue
Block a user