Refactor existing code

This change introduces no functional changes to the memory management
interfaces.  It only restructures the existing codes by separating the
kmem, vmem, and kmem cache implementations in the separate source and
header files.

Splitting this functionality in to separate files required the addition
of spl_vmem_{init,fini}() and spl_kmem_cache_{initi,fini}() functions.

Additionally, several minor changes to the #include's were required to
accommodate the removal of extraneous header from kmem.h.

But again, while large this patch introduces no functional changes.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf
2014-12-08 13:04:42 -05:00
parent 6ecf6d7228
commit e5b9b344c7
23 changed files with 2506 additions and 2115 deletions
+2 -1
View File
@@ -24,8 +24,9 @@
* Solaris Porting LAyer Tests (SPLAT) Condition Variable Tests.
\*****************************************************************************/
#include <linux/kthread.h>
#include <sys/condvar.h>
#include <sys/timer.h>
#include <sys/thread.h>
#include "splat-internal.h"
#define SPLAT_CONDVAR_NAME "condvar"
+1
View File
@@ -27,6 +27,7 @@
#include "splat-ctl.h"
#include <sys/mutex.h>
#include <linux/file_compat.h>
#define SPLAT_SUBSYSTEM_INIT(type) \
({ splat_subsystem_t *_sub_; \
+3
View File
@@ -25,7 +25,10 @@
\*****************************************************************************/
#include <sys/kmem.h>
#include <sys/kmem_cache.h>
#include <sys/vmem.h>
#include <sys/thread.h>
#include <sys/vmsystm.h>
#include "splat-internal.h"
#define SPLAT_KMEM_NAME "kmem"
+2
View File
@@ -25,8 +25,10 @@
\*****************************************************************************/
#include <sys/kmem.h>
#include <sys/vmem.h>
#include <sys/random.h>
#include <sys/taskq.h>
#include <sys/timer.h>
#include <linux/delay.h>
#include "splat-internal.h"
+1
View File
@@ -27,6 +27,7 @@
#include <sys/zmod.h>
#include <sys/random.h>
#include <sys/kmem.h>
#include <sys/vmem.h>
#include "splat-internal.h"
#define SPLAT_ZLIB_NAME "zlib"