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
+2 -1
View File
@@ -36,7 +36,8 @@ enum xdr_op {
struct xdr_ops;
typedef struct {
struct xdr_ops *x_ops; /* Let caller know xdrmem_create() succeeds */
const struct xdr_ops *x_ops;
/* Let caller know xdrmem_create() succeeds */
caddr_t x_addr; /* Current buffer addr */
caddr_t x_addr_end; /* End of the buffer */
enum xdr_op x_op; /* Stream direction */
-1
View File
@@ -113,7 +113,6 @@
#endif
/* Missing globals */
extern char spl_gitrev[64];
extern unsigned long spl_hostid;
/* Missing misc functions */
+2 -1
View File
@@ -160,7 +160,8 @@ extern taskq_t *taskq_of_curthread(void);
#define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \
taskq_create(name, nthreads, pri, min, max, flags)
#define taskq_create_sysdc(name, nthreads, min, max, proc, dc, flags) \
taskq_create(name, nthreads, maxclsyspri, min, max, flags)
((void) sizeof (dc), \
taskq_create(name, nthreads, maxclsyspri, min, max, flags))
int spl_taskq_init(void);
void spl_taskq_fini(void);