mirror_zfs/include/sys
behlendo d6a26c6a32 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
2008-05-06 20:38:28 +00:00
..
fm - Add some more missing headers 2008-03-12 23:48:28 +00:00
fs Checkpoint for the night, 2008-03-05 00:58:54 +00:00
sysevent - Add some more missing headers 2008-03-12 23:48:28 +00:00
acl_impl.h Remove minor lingering CDDL tait of copied headers. Required 2008-03-27 23:40:09 +00:00
acl.h Remove minor lingering CDDL tait of copied headers. Required 2008-03-27 23:40:09 +00:00
atomic.h Correctly implement atomic_cas_ptr() function. Ideally all of these 2008-04-03 21:48:57 +00:00
attr.h Just filling in more of the env. 2008-03-08 00:58:32 +00:00
byteorder.h - Add some more missing headers 2008-03-12 23:48:28 +00:00
callb.h Update SPL to use new debug infrastructure. This means: 2008-04-21 17:29:47 +00:00
cmn_err.h Add some typedefs to make it clearer when we passing a function, 2008-03-10 19:25:20 +00:00
condvar.h New an improved taskq implementation for the SPL. It allows a 2008-04-25 22:10:47 +00:00
cred.h Missing headers, more minor fixes 2008-03-15 00:05:38 +00:00
ctype.h Checkpoint for the night, 2008-03-05 00:58:54 +00:00
ddi.h Drop unicode support, provided in ZFS tree libport 2008-03-13 19:49:09 +00:00
debug.h Commit adaptive mutexes. This seems to have introduced some new 2008-05-05 20:18:49 +00:00
dkio.h Remove minor lingering CDDL tait of copied headers. Required 2008-03-27 23:40:09 +00:00
dklabel.h Remove minor lingering CDDL tait of copied headers. Required 2008-03-27 23:40:09 +00:00
dnlc.h Checkpoint for the night, 2008-03-05 00:58:54 +00:00
errno.h Stub out some missing headers which are expected. I'll fill 2008-03-01 18:30:12 +00:00
file.h OK, a first reasonable attempt at a solaris module/chdev shim layer. 2008-03-20 23:30:15 +00:00
int_limits.h Stub out some missing headers which are expected. I'll fill 2008-03-01 18:30:12 +00:00
int_types.h Checkpoint for the night, 2008-03-05 00:58:54 +00:00
inttypes.h Remove spl.h, just include the headers you need. 2008-03-04 20:06:29 +00:00
isa_defs.h Double large kmalloc warning size to 4 pages. It was 2 pages, and ideally 2008-04-01 16:09:18 +00:00
kidmap.h Apply fix from bug239 for rwlock deadlock. 2008-03-11 20:54:40 +00:00
kmem.h Lots of fixes here: 2008-05-06 20:38:28 +00:00
kobj.h Drop unicode support, provided in ZFS tree libport 2008-03-13 19:49:09 +00:00
kstat.h Minor atomic cleanup, this needs to be done right. 2008-03-07 00:28:32 +00:00
Makefile.am Remove spl.h, just include the headers you need. 2008-03-04 20:06:29 +00:00
mkdev.h Add missing headers 2008-03-14 00:04:01 +00:00
mntent.h Add missing headers 2008-03-14 00:04:01 +00:00
mode.h Add missing headers 2008-03-14 00:04:01 +00:00
mount.h Missing headers, more minor fixes 2008-03-15 00:05:38 +00:00
mutex.h Commit adaptive mutexes. This seems to have introduced some new 2008-05-05 20:18:49 +00:00
param.h Reorganize /include/ to add a /sys/, this way we don't need to 2008-03-01 00:45:59 +00:00
pathname.h Add missing headers 2008-03-14 00:04:01 +00:00
proc.h First commit of lustre style internal debug support. These 2008-04-18 23:39:58 +00:00
random.h Update SPL to use new debug infrastructure. This means: 2008-04-21 17:29:47 +00:00
resource.h Add two more missing headers 2008-03-13 20:41:29 +00:00
rwlock.h Prep for 0.2.1 tag 2008-04-24 17:41:23 +00:00
sdt.h Missing headers, more minor fixes 2008-03-15 00:05:38 +00:00
sid.h Remove minor lingering CDDL tait of copied headers. Required 2008-03-27 23:40:09 +00:00
signal.h Update SPL to use new debug infrastructure. This means: 2008-04-21 17:29:47 +00:00
stat.h Add two more missing headers 2008-03-13 20:41:29 +00:00
stropts.h Stub out some missing headers which are expected. I'll fill 2008-03-01 18:30:12 +00:00
sunddi.h Stack usage is my enemy. Trade cpu cycles in the debug code to 2008-04-22 16:55:26 +00:00
sunldi.h - Remapped ldi_handle_t to struct block_device * which is much more useful 2008-04-03 16:33:31 +00:00
sysevent.h - Add some more missing headers 2008-03-12 23:48:28 +00:00
sysmacros.h Prep for 0.2.1 tag 2008-04-24 17:41:23 +00:00
systeminfo.h Just filling in more of the env. 2008-03-08 00:58:32 +00:00
systm.h Remove spl.h, just include the headers you need. 2008-03-04 20:06:29 +00:00
taskq.h New an improved taskq implementation for the SPL. It allows a 2008-04-25 22:10:47 +00:00
thread.h Update the thread shim to use the current kernel threading API. 2008-04-04 04:44:16 +00:00
time.h Update SPL to use new debug infrastructure. This means: 2008-04-21 17:29:47 +00:00
timer.h Minor atomic cleanup, this needs to be done right. 2008-03-07 00:28:32 +00:00
types32.h Remove minor lingering CDDL tait of copied headers. Required 2008-03-27 23:40:09 +00:00
types.h OK, a first reasonable attempt at a solaris module/chdev shim layer. 2008-03-20 23:30:15 +00:00
uio.h Drop unicode support, provided in ZFS tree libport 2008-03-13 19:49:09 +00:00
unistd.h Add missing headers 2008-03-14 00:04:01 +00:00
utsname.h Apply fix from bug239 for rwlock deadlock. 2008-03-11 20:54:40 +00:00
va_list.h Stub out some missing headers which are expected. I'll fill 2008-03-01 18:30:12 +00:00
varargs.h Add somre debugging support 2008-03-08 00:18:21 +00:00
vfs_opreg.h Add missing headers 2008-03-14 00:04:01 +00:00
vfs.h Missing headers, more minor fixes 2008-03-15 00:05:38 +00:00
vmsystm.h Apparently it's OK for done to be NULL, which was not clear in the 2008-04-01 17:00:06 +00:00
vnode.h OK, a first reasonable attempt at a solaris module/chdev shim layer. 2008-03-20 23:30:15 +00:00
zmod.h Add missing cred.h functions 2008-03-07 20:48:44 +00:00
zone.h - Add some more missing headers 2008-03-12 23:48:28 +00:00