]> granicus.if.org Git - zfs/log
zfs
15 years agoAdd missing autogen products
behlendo [Wed, 26 Nov 2008 17:07:59 +0000 (17:07 +0000)]
Add missing autogen products

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@182 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

15 years agoInclude META file support.
behlendo [Wed, 26 Nov 2008 17:01:45 +0000 (17:01 +0000)]
Include META file support.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@181 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

15 years ago* : Add autogen.sh products.
behlendo [Mon, 24 Nov 2008 23:49:18 +0000 (23:49 +0000)]
* : Add autogen.sh products.

* configure.ac : Use AC_CONFIG_AUX_DIR to put autoconf products
in ./auotconf.

* autogen.sh : Use --copy to avoid symlinks, remove error
redirection, run aclocal before libtoolize.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@180 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

15 years ago* include/sys/sunddi.h, modules/spl/spl-module.c : Removed default
behlendo [Thu, 13 Nov 2008 21:43:30 +0000 (21:43 +0000)]
* include/sys/sunddi.h, modules/spl/spl-module.c : Removed default
udev support from sunddi implementation because it uses GPL-only
symbols.  This support is optionally available for SPL consumers
if they define HAVE_GPL_ONLY_SYMBOLS and license their module as
GPL using the MODULE_LICENSE("GPL") macro.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@179 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

15 years agoPrep for spl-0.3.4 tag.
behlendo [Thu, 6 Nov 2008 00:51:31 +0000 (00:51 +0000)]
Prep for spl-0.3.4 tag.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@177 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

15 years agoRemove 3 instances of unused variables.
behlendo [Wed, 5 Nov 2008 22:06:56 +0000 (22:06 +0000)]
Remove 3 instances of unused variables.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@176 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

15 years agoAdd proper error handling for the case where a thread can not be
behlendo [Wed, 5 Nov 2008 21:43:37 +0000 (21:43 +0000)]
Add proper error handling for the case where a thread can not be
created.  Instead of asserting we simply abort the test, wait for
any tasks we created to finish, and return -ESRCH back to the user
space component.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@175 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

15 years agoSlightly increase SPLAT_NAME_SIZE to ensure string is always
behlendo [Wed, 5 Nov 2008 21:27:31 +0000 (21:27 +0000)]
Slightly increase SPLAT_NAME_SIZE to ensure string is always
NULL terminated.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@174 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

15 years agoFix a small corner case in the test infrastructure where
behlendo [Tue, 4 Nov 2008 23:38:29 +0000 (23:38 +0000)]
Fix a small corner case in the test infrastructure where
we might end up with a non-NULL terminated buffer if the
test name or desc is too long.  Only copy N-1 bytes.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@173 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

15 years ago3 minor fixups where sprintf() was used instead of snprintf() with
behlendo [Tue, 4 Nov 2008 23:30:15 +0000 (23:30 +0000)]
3 minor fixups where sprintf() was used instead of snprintf() with
a known max length.  Additionally the function return value is cast
to void to make it explicit that the value is not needed.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@172 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

15 years agoRemoved useless check
behlendo [Tue, 4 Nov 2008 23:18:31 +0000 (23:18 +0000)]
Removed useless check

Fix forward NULL in splat kmem_cache test ctors/dtors

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@171 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

15 years agoAdd missing error handling to this case where a memory allocation fails.
behlendo [Tue, 4 Nov 2008 22:51:31 +0000 (22:51 +0000)]
Add missing error handling to this case where a memory allocation fails.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@170 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

15 years agoSimple ignore the return type which was never used here and cast it to void.
behlendo [Tue, 4 Nov 2008 22:42:58 +0000 (22:42 +0000)]
Simple ignore the return type which was never used here and cast it to void.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@169 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

15 years agoAdd proper error handling to one of the atomic test cases in the event
behlendo [Tue, 4 Nov 2008 22:39:29 +0000 (22:39 +0000)]
Add proper error handling to one of the atomic test cases in the event
that a kernel thread cannot be properly spawned.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@168 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

15 years agoAdd missing initializer which is needed in an unlikely error case.
behlendo [Tue, 4 Nov 2008 22:24:55 +0000 (22:24 +0000)]
Add missing initializer which is needed in an unlikely error case.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@167 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoEnsure GPL-only symbols are re-exported as GPL-only
behlendo [Tue, 4 Nov 2008 00:00:16 +0000 (00:00 +0000)]
Ensure GPL-only symbols are re-exported as GPL-only

Remove GPL-only symbol from __gethrtime()

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@166 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years ago* spl-09-fix-kmem-track-oops.patch
behlendo [Mon, 3 Nov 2008 22:02:15 +0000 (22:02 +0000)]
* spl-09-fix-kmem-track-oops.patch
This fixes an oops when unloading the modules, in the case where memory
tracking was enabled and there were memory leaks. The comment in the
code explains what was the problem.

* spl-10-fix-assert-verify-ndebug.patch
This fixes ASSERT*() and VERIFY*() macros in non-debug builds. VERIFY*()
macros are supposed to check the condition and panic even in production
builds, and ASSERT*() macros don't need to evaluate the arguments.
Also some 32-bit fixes.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@165 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoUnder Solaris KM_SLEEP ensures success (or at least you hang forever).
behlendo [Mon, 3 Nov 2008 21:51:33 +0000 (21:51 +0000)]
Under Solaris KM_SLEEP ensures success (or at least you hang forever).
That said when working with a finite resource like memory failure really
is always a possibility.  It would be far better longer term if the ZFS
code could be weened off this assumption and properly handle the cases
where an allocation fails.  Still I've applied the patch to spl-0.3.4
since this layer is supposed to emulate Solaris as closely as possible.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@164 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoAdd a SPL_AC_TYPE_ATOMIC64_T test to configure for systems which do
behlendo [Mon, 3 Nov 2008 21:06:04 +0000 (21:06 +0000)]
Add a SPL_AC_TYPE_ATOMIC64_T test to configure for systems which do
already supprt atomic64_t types.

* spl-07-kmem-cleanup.patch
This moves all the debugging code from sys/kmem.h to spl-kmem.c, because
the huge macros were hard to debug and were bloating functions that
allocated memory. I also fixed some other minor problems, including
32-bit fixes and a reported memory leak which was just due to using the
wrong free function.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@163 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoApply two nice improvements caught by Ricardo,
behlendo [Mon, 3 Nov 2008 20:34:17 +0000 (20:34 +0000)]
Apply two nice improvements caught by Ricardo,

spl-05-div64.patch
This is a much less intrusive fix for undefined 64-bit division symbols
when compiling the DMU in 32-bit kernels.

* spl-06-atomic64.patch
This is a workaround for 32-bit kernels that don't have atomic64_t.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@162 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoApply a nice fix caught by Ricardo,
behlendo [Mon, 3 Nov 2008 20:21:08 +0000 (20:21 +0000)]
Apply a nice fix caught by Ricardo,

* spl-04-fix-taskq-spinlock-lockup.patch
Fixes a deadlock in the BIO completion handler, due to the taskq code
prematurely re-enabling interrupts when another spinlock had disabled
them in the IDE IRQ handler.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@161 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoReviewed and applied spl-01-rm-gpl-symbol-set_cpus_allowed.patch
behlendo [Mon, 3 Nov 2008 20:07:20 +0000 (20:07 +0000)]
Reviewed and applied spl-01-rm-gpl-symbol-set_cpus_allowed.patch
from Ricardo which removes a dependency on the GPL-only symbol
set_cpus_allowed().  Using this symbol is simpler but in the name
of portability we are adopting a spinlock based solution here
to remove this dependency.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@160 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoReviewed and applied spl-00-rm-gpl-symbol-notifier_chain.patch
behlendo [Mon, 3 Nov 2008 19:53:23 +0000 (19:53 +0000)]
Reviewed and applied spl-00-rm-gpl-symbol-notifier_chain.patch
from Ricardo which removes a dependency on the GPL-only symbol
needed for a panic time notifier.  This funcationality was never
used and this improves our portability.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@159 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoMinor tweak to handle systems with restrictive udev rules
behlendo [Tue, 12 Aug 2008 05:18:41 +0000 (05:18 +0000)]
Minor tweak to handle systems with restrictive udev rules
or older systems which are not using udev at all.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@158 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoSigh more compat fixes, this is almost right for 2.6.9 - 2.6.26 kernels.
behlendo [Mon, 11 Aug 2008 23:47:44 +0000 (23:47 +0000)]
Sigh more compat fixes, this is almost right for 2.6.9 - 2.6.26 kernels.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@157 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoPull in initial 32-bit support patches.
behlendo [Mon, 11 Aug 2008 22:42:04 +0000 (22:42 +0000)]
Pull in initial 32-bit support patches.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@156 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoCommit bulk of remaining 2.6.9 and 2.6.26 compat changes.
behlendo [Mon, 11 Aug 2008 22:13:47 +0000 (22:13 +0000)]
Commit bulk of remaining 2.6.9 and 2.6.26 compat changes.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@155 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoInclude linux/uaccess.h compat changes.
behlendo [Mon, 11 Aug 2008 19:10:14 +0000 (19:10 +0000)]
Include linux/uaccess.h compat changes.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@154 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoMore 2.6.26 compat changes
behlendo [Mon, 11 Aug 2008 17:56:40 +0000 (17:56 +0000)]
More 2.6.26 compat changes

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@153 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoPull in timespec, list, and type compat changes to support
behlendo [Mon, 11 Aug 2008 17:20:11 +0000 (17:20 +0000)]
Pull in timespec, list, and type compat changes to support
building against a wider range of kernels.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@152 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoResolve incomplete type when building against 2.6.26
behlendo [Mon, 11 Aug 2008 16:11:37 +0000 (16:11 +0000)]
Resolve incomplete type when building against 2.6.26

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@151 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoAdd class / device portability code. Two autoconf tests
behlendo [Sun, 10 Aug 2008 03:50:36 +0000 (03:50 +0000)]
Add class / device portability code.  Two autoconf tests
were added to cover the 3 possible APIs from 2.6.9 to
2.6.26.  We attempt to use the newest interfaces and if
not available fallback to the oldest.  This a rework of
some changes proposed by Ricardo for RHEL4.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@150 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoPull in fls64 compat changes from spl-00-rhel4-compat.patch,
behlendo [Wed, 6 Aug 2008 04:52:39 +0000 (04:52 +0000)]
Pull in fls64 compat changes from spl-00-rhel4-compat.patch,
to allow greater compatibility with kernels pre 2.6.16.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@149 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoStart bringing in Ricardo's spl-00-rhel4-compat.patch, a few chunks
behlendo [Tue, 5 Aug 2008 04:16:09 +0000 (04:16 +0000)]
Start bringing in Ricardo's spl-00-rhel4-compat.patch, a few chunks
at a time as I audit it.  This chunk finishes moving the SPL entirely
off the linux slab on to the SPL implementation.  It differs slightly
from the proposed version in that the spl continues to export to
all the Solaris types and functions.  These do conflict with the
Linux slab so a module usings these interfaces must not include the
SPL slab if they also intend to use the linux slab.  Or they must
explcitly #undef the macros which remap the functioin to their
spl_* equivilants.

A nice side of effect of dropping the entire linux slab is we
don't need to autoconf checks anymore.  They kept messing with
the slab API endlessly!

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@148 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoApply Ricardo's spl-02-condvar-poison.patch
behlendo [Mon, 4 Aug 2008 23:59:08 +0000 (23:59 +0000)]
Apply Ricardo's spl-02-condvar-poison.patch
Fix too early memory poisoning on condvars.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@147 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoTrivial commit to remove whitespace
behlendo [Wed, 9 Jul 2008 19:11:29 +0000 (19:11 +0000)]
Trivial commit to remove whitespace

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@146 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoFix race in kmem_locking test
behlendo [Mon, 7 Jul 2008 22:15:04 +0000 (22:15 +0000)]
Fix race in kmem_locking test
Reduce max memory usage for kmem_locking tests (for low memory machines)

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@145 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoTwo easy fixes I caught with debug enabled
behlendo [Tue, 1 Jul 2008 04:06:09 +0000 (04:06 +0000)]
Two easy fixes I caught with debug enabled

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@143 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoUpdate info to prep for a tag. If all goes well I'll have
behlendo [Tue, 1 Jul 2008 03:42:24 +0000 (03:42 +0000)]
Update info to prep for a tag.  If all goes well I'll have
something I'm not too embarased to distrubute tommorow.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@142 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years ago- Remove hash functionality from slab in favor of direct lookups
behlendo [Tue, 1 Jul 2008 03:28:54 +0000 (03:28 +0000)]
- Remove hash functionality from slab in favor of direct lookups
  based of the spl_kmem_obj_t tacked on the end of each object.
  This actually isn't so back because we are now allocing large
  chunks for the slab and partitioning it ourselves.  So there's
  not a ton of wasted space.  We may suffer a performance hit
  however due to alignment issues.

- Remove remaining depenancies on the linux slab implementation.
  We're standing on our own now for better or worse.

- Rework slabs to be either kmem or vmem based.  If neither
  KMC_VMEM of KMC_KMEM are specified we make a decent guess
  about what will work best for their based on the object
  size.  Additionally we provide a kmem_virt() function caller
  can use to see if they have a virtual or physical address.

- Minor fixups in the test suite.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@141 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoRemove stray call to spl_cache_free() and remove all the
behlendo [Sat, 28 Jun 2008 20:03:11 +0000 (20:03 +0000)]
Remove stray call to spl_cache_free() and remove all the
cycle count which was costing me overhead.  It was hurting
performance pretty badly for heavily used caches.  I'm also
thinking the hash may be hurting me as well and it might
be worth sticking a pointer in to a little space after the
alloced object.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@140 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoVictory! I've reworked caches with large objects which are
behlendo [Sat, 28 Jun 2008 05:04:46 +0000 (05:04 +0000)]
Victory!  I've reworked caches with large objects which are
based by vmalloc()'ed memory.  I now alloc a slab which is
roughly 32*spl_obj_size and in this block of memory I place
the slab descriptor, slab object descriptors, and objects
themselves.  This greatly reduces vmalloc lock contention.

Still some minor cleanup remains and fine tuning but
it's working pretty well.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@139 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoFurther slab improvements, I'm getting close to something which works
behlendo [Fri, 27 Jun 2008 21:40:11 +0000 (21:40 +0000)]
Further slab improvements, I'm getting close to something which works
well for the expected workloads.  Improvement in this commit include:

- Added DEBUG_KMEM_TRACKING #define which can optionally be set
  when DEBUG_KMEM is defined to do per allocation tracking.  This
  allows us to get all the lightweight kmem debugging enabled by
  default which is pretty light weight, and only when looking
  for a memory leak we can briefly enable the per alloc tracking.

- Added set_normalized_timespec() in to SPL to simply using
  the timespec() primatives from within a module.

- Added per-spinlock cycle counters to the slab in an attempt
  to run down a lock contention issue.  The contended lock
  was in vmalloc() but I'm going to leave the cycle counters
  in place for a little while until I'm convinced there arn't
  other locking improvement possible in the slab.

- Added a proc interface to the slab to export per slab
  cache statistics to /proc/spl/kmem/slab for analysis.

- Reworked spl_slab_alloc() function to allocate from kmem for
  small allocation and vmem for large allocations.  This improved
  things considerably but futher work is needed.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@138 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoFix for memory corruption caused by overruning the magazine
behlendo [Thu, 26 Jun 2008 19:49:42 +0000 (19:49 +0000)]
Fix for memory corruption caused by overruning the magazine
when repopulating it.  Plus I fixed a few more suble races in
that part of the code which were catching me.  Finally I fixed
a small race in kmem_test8.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@137 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoImplement per-cpu local caches. This seems to have bough me another
behlendo [Wed, 25 Jun 2008 20:57:45 +0000 (20:57 +0000)]
Implement per-cpu local caches.  This seems to have bough me another
factor of 10x improvement on SMP system due to reduced lock contention.
This may put me in the ballpark of what is needed.  We can still further
improve things on NUMA systems by creating an additional L3 cache per
memory node instead of the current global pool.  With luck this won't
be needed.  I should also take another look at the locking now that
everything is working.  There's a good chance I can tighten it up a
little bit and improve things a little more.

   kmem_lock: time (sec)        slabs           objs            hash
   kmem_lock:                   tot/max/calc    tot/max/calc    size/depth
   kmem_lock:  0.000999926      6/6/1           192/192/32      32768/0
   kmem_lock:  0.000999926      4/4/2           128/128/64      32768/0
   kmem_lock:  0.000999926      4/4/4           128/128/128     32768/0
   kmem_lock:  0.000999926      4/4/8           128/128/256     32768/0
   kmem_lock:  0.000999926      4/4/16          128/128/512     32768/0
   kmem_lock:  0.000999926      4/4/32          128/128/1024    32768/0
   kmem_lock:  0.000999926      4/4/64          128/128/2048    32768/0
   kmem_lock:  0.000999926      8/8/128         256/256/4096    32768/0
   kmem_lock:  0.003999704      24/23/256       768/736/8192    32768/1
   kmem_lock:  0.012999038      44/41/512       1408/1312/16384 32768/1
   kmem_lock:  0.051996153      96/93/1024      3072/2976/32768 32768/2
   kmem_lock:  0.181986536      187/184/2048    5984/5888/65536 32768/3
   kmem_lock:  0.655951469      342/339/4096    10944/10848/131072 32768/4

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@136 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoThe first locking issue was due to the semaphore I used. I was trying
behlendo [Tue, 24 Jun 2008 17:18:15 +0000 (17:18 +0000)]
The first locking issue was due to the semaphore I used.  I was trying
to be overly clever and the context switch when the semaphore was busy
was destroying performance.  Converting to a simple spin lock bough me
a factor of 50 or so.  That said it's still not good enough.  Tests
show bad performance and we are still CPU bound.  The logical fix is
I need to implement per-cpu hot caches to minimize the SMP contention.
Linux and Solaris both have this, I was hoping to do without but it
looks like that's not to be.

   kmem_lock: time (sec)        slabs           objs            hash
   kmem_lock:                   tot/max/calc    tot/max/calc    size/depth
   kmem_lock:  0.022000000      7/6/64  224/177/2048    32768/1
   kmem_lock:  0.039000000      13/13/128       416/404/4096    32768/1
   kmem_lock:  0.079000000      23/21/256       736/672/8192    32768/1
   kmem_lock:  0.158000000      48/47/512       1536/1504/16384 32768/1
   kmem_lock:  0.345000000      105/105/1024    3360/3358/32768 32768/2
   kmem_lock:  0.760000000      202/200/2048    6464/6400/65536 32768/3

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@135 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoAdd another kmem test to check for lock contention in the slab
behlendo [Mon, 23 Jun 2008 23:54:52 +0000 (23:54 +0000)]
Add another kmem test to check for lock contention in the slab
allocator.  I have serious contention issues here and I needed
a way to easily measure how much the following batch of changes
will improve things.  Currently things are quite bad when the
allocator is highly contended, and interestingly it seems to
get worse in a non-linear fashion... I'm not sure why yet.
I'll figure it out tomorrow.

        kmem:kmem_lock    Pass

   kmem_lock: time (sec)        slabs           objs
   kmem_lock:                   tot/max/calc    tot/max/calc
   kmem_lock:  0.061000000      75/60/64        2400/1894/2048
   kmem_lock:  0.157000000      134/125/128     4288/3974/4096
   kmem_lock:  0.471000000      263/249/256     8416/7962/8192
   kmem_lock:  2.526000000      518/499/512     16576/15957/16384
   kmem_lock: 14.393000000      990/978/1024    31680/31270/32768

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@134 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoFix minor chaos/fc9 kernel discrepencies in build
behlendo [Fri, 13 Jun 2008 23:56:26 +0000 (23:56 +0000)]
Fix minor chaos/fc9 kernel discrepencies in build

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@133 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years ago* : modules/sys/kmem-slab.c : Re-implemented the slab to no
behlendo [Fri, 13 Jun 2008 23:41:06 +0000 (23:41 +0000)]
* : modules/sys/kmem-slab.c : Re-implemented the slab to no
longer be based on the linux slab but to be its own complete
implementation.  The new slab behaves much more like the
Solaris slab than the Linux slab.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@132 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoMinor tweak to ensure kstat values are printed correctly on x86_64 at least
behlendo [Fri, 6 Jun 2008 23:11:34 +0000 (23:11 +0000)]
Minor tweak to ensure kstat values are printed correctly on x86_64 at least
Additionally fix a minor typo in the .ul ULONG case.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@131 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoPrep for 0.3.2 tag
behlendo [Wed, 4 Jun 2008 23:28:29 +0000 (23:28 +0000)]
Prep for 0.3.2 tag

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@129 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoAdd missing () to quiet warnings in NDEBUG case
behlendo [Wed, 4 Jun 2008 22:52:13 +0000 (22:52 +0000)]
Add missing () to quiet warnings in NDEBUG case

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@128 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoFix some bad grammer
behlendo [Wed, 4 Jun 2008 21:25:57 +0000 (21:25 +0000)]
Fix some bad grammer

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@127 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoJust use CONFIG_SLUB to detect SLUB use
behlendo [Wed, 4 Jun 2008 21:09:25 +0000 (21:09 +0000)]
Just use CONFIG_SLUB to detect SLUB use
Add ASSERTF to the NDEBUG build
Fix minor issue with various debug build flags

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@126 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoWhoops, fix a minor proc issue which slipped through with
behlendo [Wed, 4 Jun 2008 06:09:16 +0000 (06:09 +0000)]
Whoops, fix a minor proc issue which slipped through with
the recent changes.  Ensure the top level spl is removed.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@125 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoFixes:
behlendo [Wed, 4 Jun 2008 06:00:46 +0000 (06:00 +0000)]
Fixes:

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

16 years agoUpdate utsname to use proper compatible interface to avoid API issues.
behlendo [Tue, 3 Jun 2008 21:20:18 +0000 (21:20 +0000)]
Update utsname to use proper compatible interface to avoid API issues.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@123 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoFix missing return resulting in a double unlock of &files->file_lock
behlendo [Tue, 3 Jun 2008 20:58:55 +0000 (20:58 +0000)]
Fix missing return resulting in a double unlock of &files->file_lock
and a hang on subsequent sys_close.  I'm not quite sure why the Fedora
kernel caught this bug the Chaos kernel did not, but I'm glad!

Convert remaining BUG_ON's to ASSERTs

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@122 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoAdd the minimal set of kernel patches need to for the SPL. Hopefully
behlendo [Mon, 2 Jun 2008 19:45:04 +0000 (19:45 +0000)]
Add the minimal set of kernel patches need to for the SPL.  Hopefully
even these will not be needed over the next few weeks.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@121 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoThis should have been part of the previous autoconf commit.
behlendo [Mon, 2 Jun 2008 18:41:30 +0000 (18:41 +0000)]
This should have been part of the previous autoconf commit.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@120 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoBreaking the world for a little bit. If anyone is going to continue
behlendo [Mon, 2 Jun 2008 17:28:49 +0000 (17:28 +0000)]
Breaking the world for a little bit.  If anyone is going to continue
working on this branch for the next few days I suggested you work
off of the 0.3.1 tag.  The following changes are fairly extensive
and are designed to make the SPL compatible with all kernels in
the range of 2.6.18-2.6.25.  There were 13 relevant API changes
between these releases and I have added the needed autoconf tests
to check for them.  However, this has not all been tested extensively.
I'll sort of the breakage on Fedora Core 9 and RHEL5 this week.

SPL_AC_TYPE_UINTPTR_T
SPL_AC_TYPE_KMEM_CACHE_T
SPL_AC_KMEM_CACHE_DESTROY_INT
SPL_AC_ATOMIC_PANIC_NOTIFIER
SPL_AC_3ARGS_INIT_WORK
SPL_AC_2ARGS_REGISTER_SYSCTL
SPL_AC_KMEM_CACHE_T
SPL_AC_KMEM_CACHE_CREATE_DTOR
SPL_AC_3ARG_KMEM_CACHE_CREATE_CTOR
SPL_AC_SET_SHRINKER
SPL_AC_PATH_IN_NAMEIDATA
SPL_AC_TASK_CURR
SPL_AC_CTL_UNNUMBERED

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@119 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoMake a tag just for release to CEA, this has the URCL
behlendo [Mon, 26 May 2008 05:01:15 +0000 (05:01 +0000)]
Make a tag just for release to CEA, this has the URCL

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@115 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoGo through and add a header with the proper UCRL number.
behlendo [Mon, 26 May 2008 04:38:26 +0000 (04:38 +0000)]
Go through and add a header with the proper UCRL number.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@114 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoPrep for for 0.3.0 tag, this is the tag which was used for all
behlendo [Wed, 21 May 2008 21:11:47 +0000 (21:11 +0000)]
Prep for for 0.3.0 tag, this is the tag which was used for all
the performance results to date.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@112 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years ago- Properly fix the debug support for all the ASSERT's, VERIFIES, etc can be
behlendo [Mon, 19 May 2008 02:49:12 +0000 (02:49 +0000)]
- Properly fix the debug support for all the ASSERT's, VERIFIES, etc can be
  compiled out when doing performance runs.
- Bite the bullet and fully autoconfize the debug options in the configure
  time parameters.  By default all the debug support is disable in the core
  SPL build, but available to modules which enable it when building against
  the SPL.  To enable particular SPL debug support use the follow configure
  options:

  --enable-debug Internal ASSERTs
  --enable-debug-kmem Detailed memory accounting
  --enable-debug-mutex Detailed mutex tracking
  --enable-debug_kstat          Kstat info exported to /proc
  --enable-debug-callb Additional callb debug

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@111 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoSPL additions to increase support for updated ZFS build
behlendo [Thu, 15 May 2008 23:39:19 +0000 (23:39 +0000)]
SPL additions to increase support for updated ZFS build

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@110 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoDisable adaptive mutexs by default (always sleep), and while
behlendo [Thu, 15 May 2008 17:32:41 +0000 (17:32 +0000)]
Disable adaptive mutexs by default (always sleep), and while
I'm at it add a module option for easy tuning.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@109 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoRework condition variable implementation to be consistent with
behlendo [Thu, 15 May 2008 17:10:30 +0000 (17:10 +0000)]
Rework condition variable implementation to be consistent with
other primitive implementations.  Additionally ensure that GFP_ATOMIC
is use for allocations when in interrupt context.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@108 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoEnhanse the thread interface to do something quasi inteligent
behlendo [Mon, 12 May 2008 18:54:08 +0000 (18:54 +0000)]
Enhanse the thread interface to do something quasi inteligent
with the function name passed to be used as a thread name.  Leaving
the trailing _thread is just redundant so just strip it this
make the thread names far more readable.

Use a strncpy in spl-mutex  just to be safe.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@107 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoAdd a comment so I remember to fix this.
behlendo [Mon, 12 May 2008 16:53:41 +0000 (16:53 +0000)]
Add a comment so I remember to fix this.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@106 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoBy default disable extra KMEM and MUTEX debugging to aid performance.
behlendo [Fri, 9 May 2008 22:53:20 +0000 (22:53 +0000)]
By default disable extra KMEM and MUTEX debugging to aid performance.
They can easily be re-enabled when new stability issues are uncovered.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@105 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoStability hack. Under Solaris when KM_SLEEP is set kmem_cache_alloc()
behlendo [Fri, 9 May 2008 21:21:33 +0000 (21:21 +0000)]
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

16 years agoAdd an almost feature complete implemenation of kstat. I chose
behlendo [Thu, 8 May 2008 23:21:47 +0000 (23:21 +0000)]
Add an almost feature complete implemenation of kstat.  I chose
not to support a few flags (we assert if they are used), and I
did not add the libkstat interface and instead exported everything
to proc for easy access.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@103 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoSame deal as ZFS, we're quite stable now so tag it.
behlendo [Wed, 7 May 2008 20:12:44 +0000 (20:12 +0000)]
Same deal as ZFS, we're quite stable now so tag it.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@101 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoDecrease of kmem warnign threshold back to 2 pages, no worse than a stack.
behlendo [Wed, 7 May 2008 19:33:01 +0000 (19:33 +0000)]
Decrease of kmem warnign threshold back to 2 pages, no worse than a stack.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@100 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoAdd vmem memory accounting
behlendo [Wed, 7 May 2008 18:54:32 +0000 (18:54 +0000)]
Add vmem memory accounting

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@99 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years ago- Relocate 'stats_per' in to proper /proc/sys/spl/mutex/ directory
behlendo [Wed, 7 May 2008 17:58:22 +0000 (17:58 +0000)]
- Relocate 'stats_per' in to proper /proc/sys/spl/mutex/ directory
- Shift to spinlock for mutex list addition and removal

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@98 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoRemaining issues fixed after reenabled mutex debugging.
behlendo [Tue, 6 May 2008 23:19:27 +0000 (23:19 +0000)]
Remaining issues fixed after reenabled mutex debugging.

- Ensure the mutex_stats_sem and mutex_stats_list are initialized
- Only spin if you have to in mutex_init

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@97 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years ago- Updated rwlock's to reside in a .c file instead of a static inline
behlendo [Tue, 6 May 2008 23:00:49 +0000 (23:00 +0000)]
- Updated rwlock's to reside in a .c file instead of a static inline
- Updated rwlock's so they can be safely initialized in ctors.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@96 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoLots of fixes here:
behlendo [Tue, 6 May 2008 20:38:28 +0000 (20:38 +0000)]
Lots of fixes here:

- Detailed kmem memory allocation tracking.  We can now get on
  spl module unload a list of all memory allocations which were
  not free'd and where the original alloc was.  E.g.

SPL: 15554:632:(spl-kmem.c:442:kmem_fini()) kmem leaked 90/319332 bytes
SPL: 15554:648:(spl-kmem.c:451:kmem_fini()) address          size  data             func:line
SPL: 15554:648:(spl-kmem.c:457:kmem_fini()) ffff8100734b68b8 32    0100000001005a5a __spl_mutex_init:70
SPL: 15554:648:(spl-kmem.c:457:kmem_fini()) ffff8100734b6148 13    &tl->tl_lock     __spl_mutex_init:74
SPL: 15554:648:(spl-kmem.c:457:kmem_fini()) ffff81007ac43730 32    0100000001005a5a __spl_mutex_init:70
SPL: 15554:648:(spl-kmem.c:457:kmem_fini()) ffff81007ac437d8 13    &tl->tl_lock     __spl_mutex_init:74

- Shift to using rwsems in kmem implmentation, to simply locking and
  improve concurency.

- Shift to using rwsems in mutex implementation, additionally ensure we
  never sleep in the init function if non-zero preempt_count or
  interrupts are disabled as can happen in a slab cache ctor/dtor.

- Other minor formating fixes and such.

TODO:

- Finish the vmem memory allocation tracking

- Vet all other SPL primatives for potential sleeping during *_init.  I
suspect the rwlock implemenation does this and should be fixes just
like the mutex implemenation.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@95 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoCommit adaptive mutexes. This seems to have introduced some new
behlendo [Mon, 5 May 2008 20:18:49 +0000 (20:18 +0000)]
Commit adaptive mutexes.  This seems to have introduced some new
crashes but it's not clear to me yet if these are a problem with
the mutex implementation or ZFSs usage of it.

Minor taskq fixes to add new tasks to the end of the pending list.

Minor enhansements to the debug infrastructure.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@94 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoNew an improved taskq implementation for the SPL. It allows a
behlendo [Fri, 25 Apr 2008 22:10:47 +0000 (22:10 +0000)]
New an improved taskq implementation for the SPL.  It allows a
configurable number of threads like the Solaris version and almost
all of the options are supported.  Unfortunately, it appears to have
made absolutely no difference to our performance numbers.  I need
to keep looking for where we are bottle necking.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@93 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoUpdate kmem.h to properly use new debug subsystem.
behlendo [Thu, 24 Apr 2008 20:21:07 +0000 (20:21 +0000)]
Update kmem.h to properly use new debug subsystem.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@92 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoPrep for 0.2.1 tag
behlendo [Thu, 24 Apr 2008 17:41:23 +0000 (17:41 +0000)]
Prep for 0.2.1 tag
Minor fixes to headers to use debug macros
Added /proc/sys/spl/version

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@90 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoForgot to update the ChangeLog.
wartens2 [Thu, 24 Apr 2008 17:24:02 +0000 (17:24 +0000)]
Forgot to update the ChangeLog.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@89 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoMake sure that when calling __vmem_alloc that we
wartens2 [Thu, 24 Apr 2008 17:07:56 +0000 (17:07 +0000)]
Make sure that when calling __vmem_alloc that we
do not have __GFP_ZERO set.  Once the memory is allocated
then zero out the memory if __GFP_ZERO is passed to
__vmem_alloc.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@88 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoMinor improvement to taskq handling. This is a small step towards
behlendo [Wed, 23 Apr 2008 21:19:47 +0000 (21:19 +0000)]
Minor improvement to taskq handling.  This is a small step towards
dynamic taskqs which still need to be fully implemented.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@87 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoBe careful to never use any of the debug infrastructure either
behlendo [Tue, 22 Apr 2008 22:22:02 +0000 (22:22 +0000)]
Be careful to never use any of the debug infrastructure either
before the debug subsystem is fully set up, or after the debug
subsystem has been torn down.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@86 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoGive it a real version for a tag
behlendo [Tue, 22 Apr 2008 20:10:55 +0000 (20:10 +0000)]
Give it a real version for a tag

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@84 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoStack usage is my enemy. Trade cpu cycles in the debug code to
behlendo [Tue, 22 Apr 2008 16:55:26 +0000 (16:55 +0000)]
Stack usage is my enemy.  Trade cpu cycles in the debug code to
ensure I never add anything to the stack I don't absolutely need.
All this debug code could be removed from a production build
anyway so I'm not so worried about the performance impact.  We
may also consider revisting the mutex and condvar implementation
to ensure no additional stack is used there.

Initial indications are I have reduced the worst case stack
usage to 9080 bytes.  Still to large for the default 8k stacks
so I have been forced to run with 16k stacks until I can
reduce the worst offenders.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@83 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoMore fixes to ensure we get good debug logs even if we're in the
behlendo [Mon, 21 Apr 2008 22:44:11 +0000 (22:44 +0000)]
More fixes to ensure we get good debug logs even if we're in the
process of destroying the stacks.  Threshhold set fairly aggressively
top 80% of stack usage.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@82 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoAdded 4 missing subsystem flags
behlendo [Mon, 21 Apr 2008 18:43:02 +0000 (18:43 +0000)]
Added 4 missing subsystem flags

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@81 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoWhoops, missed an instance where we could recursively stack check... bad.
behlendo [Mon, 21 Apr 2008 18:16:04 +0000 (18:16 +0000)]
Whoops, missed an instance where we could recursively stack check... bad.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@80 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoHandful of minor stack checking fixes
behlendo [Mon, 21 Apr 2008 18:08:33 +0000 (18:08 +0000)]
Handful of minor stack checking fixes

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@79 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoUpdate SPL to use new debug infrastructure. This means:
behlendo [Mon, 21 Apr 2008 17:29:47 +0000 (17:29 +0000)]
Update SPL to use new debug infrastructure.  This means:
- Replacing all BUG_ON()'s with proper ASSERT()'s
- Using ENTRY,EXIT,GOTO, and RETURN macro to instument call paths

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@78 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoFrist minor batch of fixes. Catch a dropped ;, and use SBUG instead of BUG.
behlendo [Sat, 19 Apr 2008 00:02:11 +0000 (00:02 +0000)]
Frist minor batch of fixes.  Catch a dropped ;, and use SBUG instead of BUG.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@77 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoWhoops need this!
behlendo [Fri, 18 Apr 2008 23:42:45 +0000 (23:42 +0000)]
Whoops need this!

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@76 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years agoFirst commit of lustre style internal debug support. These
behlendo [Fri, 18 Apr 2008 23:39:58 +0000 (23:39 +0000)]
First commit of lustre style internal debug support.  These
changes bring over everything lustre had for debugging with
two exceptions.  I dropped by the debug daemon and upcalls
just because it made things a little easier.  They can be
readded easily enough if we feel they are needed.

Everything compiles and seems to work on first inspection
but I suspect there are a handful of issues still lingering
which I'll be sorting out right away.  I just wanted to get
all these changes commited and safe.  I'm getting a little
paranoid about losing them.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@75 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years ago * modules/spl/spl-kmem.c : Make sure to disable interrupts
wartens2 [Wed, 16 Apr 2008 16:37:51 +0000 (16:37 +0000)]
    * modules/spl/spl-kmem.c : Make sure to disable interrupts
        when necessary to avoid deadlocks.  We were seeing the deadlock
        when calling kmem_cache_generic_constructor() and then an interrupt
        forced us to end up calling kmem_cache_generic_destructor()
        which caused our deadlock.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@74 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

16 years ago- Add some spinlocks to cover all the private data in the mutex. I don't
behlendo [Tue, 15 Apr 2008 20:53:36 +0000 (20:53 +0000)]
- Add some spinlocks to cover all the private data in the mutex.  I don't
think this should fix anything but it's a good idea regardless.

- Drop the lock before calling the construct/destructor for the slab
otherwise we can't sleep in a constructor/destructor and for long running
functions we may NMI.

- Do something braindead, but safe for the console debug logs for now.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@73 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c