Stability hack. Under Solaris when KM_SLEEP is set kmem_cache_alloc()

may not fail.  To get this behavior I'd added a retry to the shim layer
even though it is abusive to the VM, at least it should prevent the crash.
Additionally I added a proc counter so I can easily check how often this
is happening.  It should be fairly rare, but likely will get worse and
worse the longer the machine has been up.


git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@104 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
behlendo
2008-05-09 21:21:33 +00:00
parent 04a479f706
commit 5c2bb9b2c3
3 changed files with 43 additions and 6 deletions
+9
View File
@@ -60,6 +60,7 @@ enum {
CTL_KMEM_KMEMMAX, /* Max alloc'd by kmem bytes */
CTL_KMEM_VMEMUSED, /* Currently alloc'd vmem bytes */
CTL_KMEM_VMEMMAX, /* Max alloc'd by vmem bytes */
CTL_KMEM_ALLOC_FAILED, /* Cache allocation failed */
#endif
CTL_MUTEX_STATS, /* Global mutex statistics */
@@ -660,6 +661,14 @@ static struct ctl_table spl_kmem_table[] = {
.mode = 0444,
.proc_handler = &proc_doulongvec_minmax,
},
{
.ctl_name = CTL_KMEM_ALLOC_FAILED,
.procname = "kmem_alloc_failed",
.data = &kmem_cache_alloc_failed,
.maxlen = sizeof(atomic64_t),
.mode = 0444,
.proc_handler = &proc_doatomic64,
},
{0},
};
#endif /* DEBUG_KMEM */