1) Ensure mutex_init() never fails in the case of ENOMEM by retrying
   forever.  I don't think I've ever seen this happen but it was clear
   after code inspection that if it did we would immediately crash.

2) Enable full debugging in check.sh for sanity tests.  Might as well
   get as much debug as we can in the case of a failure.

3) Reworked list of kmem caches tracked by SPL in to a hash with the
   key based on the address of the kmem_cache_t.  This should speed
   up the constructor/destructor/shrinker lookup needed now for newer
   kernel which removed the destructor support.

4) Updated kmem_cache_create to handle the case where CONFIG_SLUB
   is defined.  The slub would occasionally merge slab caches which
   resulted in non-unique keys for our hash lookup in 3).  To fix this
   we detect if the slub is enabled and then set the needed flag
   to prevent this merging from ever occuring.

5) New kernels removed the proc_dir_entry pointer from items
   registered by sysctl.  This means we can no long be sneaky and
   manually insert things in to the sysctl tree simply by walking
   the proc tree.  So I'm forced to create a seperate tree for
   all the things I can't easily support via sysctl interface.
   I don't like it but it will do for now.



git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@124 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
behlendo
2008-06-04 06:00:46 +00:00
parent 691d2bd733
commit c30df9c863
10 changed files with 163 additions and 114 deletions
+1 -1
View File
@@ -291,7 +291,7 @@ do { \
if (unlikely(!(cond))) { \
spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \
__FILE__, __FUNCTION__, __LINE__, \
"ASSERTION(" #cond ") failed:" fmt, \
"ASSERTION(" #cond ") failed: " fmt, \
## a); \
SBUG(); \
} \
+4 -3
View File
@@ -78,7 +78,7 @@ extern struct list_head mutex_stats_list;
int spl_mutex_init(void);
void spl_mutex_fini(void);
extern void __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc);
extern int __spl_mutex_init(kmutex_t *mp, char *name, int type, void *ibc);
extern void __spl_mutex_destroy(kmutex_t *mp);
extern int __mutex_tryenter(kmutex_t *mp);
extern void __mutex_enter(kmutex_t *mp);
@@ -91,10 +91,11 @@ extern kthread_t *__spl_mutex_owner(kmutex_t *mp);
#define mutex_init(mp, name, type, ibc) \
({ \
/* May never fail or all subsequent mutex_* calls will ASSERT */\
if ((name) == NULL) \
__spl_mutex_init(mp, #mp, type, ibc); \
while(__spl_mutex_init(mp, #mp, type, ibc)); \
else \
__spl_mutex_init(mp, name, type, ibc); \
while(__spl_mutex_init(mp, name, type, ibc)); \
})
#define mutex_destroy(mp) __spl_mutex_destroy(mp)
#define mutex_tryenter(mp) __mutex_tryenter(mp)
+1 -1
View File
@@ -49,7 +49,7 @@
#endif /* CONFIG_SYSCTL */
#ifdef DEBUG_KSTAT
extern struct proc_dir_entry *proc_sys_spl_kstat;
extern struct proc_dir_entry *proc_spl_kstat;
struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root,
const char *str);
int proc_dir_entries(struct proc_dir_entry *root);