Commit Graph

  • f93f7c8dbe This should have been part of the previous autoconf commit. behlendo 2008-06-02 18:41:30 +00:00
  • 57d862349b 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. behlendo 2008-06-02 17:28:49 +00:00
  • 65a045dace Make a tag just for release to CEA, this has the URCL behlendo 2008-05-26 05:01:15 +00:00
  • 715f625146 Go through and add a header with the proper UCRL number. behlendo 2008-05-26 04:38:26 +00:00
  • b2585b36d3 Prep for for 0.3.0 tag, this is the tag which was used for all the performance results to date. behlendo 2008-05-21 21:11:47 +00:00
  • cc7449ccd6 - 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: behlendo 2008-05-19 02:49:12 +00:00
  • 6ab69573ff SPL additions to increase support for updated ZFS build behlendo 2008-05-15 23:39:19 +00:00
  • 56f9245330 Disable adaptive mutexs by default (always sleep), and while I'm at it add a module option for easy tuning. behlendo 2008-05-15 17:32:41 +00:00
  • 4efd41189a Rework condition variable implementation to be consistent with other primitive implementations. Additionally ensure that GFP_ATOMIC is use for allocations when in interrupt context. behlendo 2008-05-15 17:10:30 +00:00
  • a97df54e83 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. behlendo 2008-05-12 18:54:08 +00:00
  • 8464443f8d Add a comment so I remember to fix this. behlendo 2008-05-12 16:53:41 +00:00
  • c6dc93d6a8 By default disable extra KMEM and MUTEX debugging to aid performance. They can easily be re-enabled when new stability issues are uncovered. behlendo 2008-05-09 22:53:20 +00:00
  • 5c2bb9b2c3 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. behlendo 2008-05-09 21:21:33 +00:00
  • 04a479f706 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. behlendo 2008-05-08 23:21:47 +00:00
  • d4c540de38 Same deal as ZFS, we're quite stable now so tag it. behlendo 2008-05-07 20:12:44 +00:00
  • 427a782d7d Decrease of kmem warnign threshold back to 2 pages, no worse than a stack. behlendo 2008-05-07 19:33:01 +00:00
  • 13cdca65ec Add vmem memory accounting behlendo 2008-05-07 18:54:32 +00:00
  • 404992e31a - Relocate 'stats_per' in to proper /proc/sys/spl/mutex/ directory - Shift to spinlock for mutex list addition and removal behlendo 2008-05-07 17:58:22 +00:00
  • 4f86a887d8 Remaining issues fixed after reenabled mutex debugging. behlendo 2008-05-06 23:19:27 +00:00
  • e8b31e8482 - 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. behlendo 2008-05-06 23:00:49 +00:00
  • d6a26c6a32 Lots of fixes here: behlendo 2008-05-06 20:38:28 +00:00
  • 9ab1ac14ad 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. behlendo 2008-05-05 20:18:49 +00:00
  • bcd68186d8 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. behlendo 2008-04-25 22:10:47 +00:00
  • 839d8b438e Update kmem.h to properly use new debug subsystem. behlendo 2008-04-24 20:21:07 +00:00
  • 3561541c24 Prep for 0.2.1 tag Minor fixes to headers to use debug macros Added /proc/sys/spl/version behlendo 2008-04-24 17:41:23 +00:00
  • 1bac409fa3 Forgot to update the ChangeLog. wartens2 2008-04-24 17:24:02 +00:00
  • 8100fe56f1 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. wartens2 2008-04-24 17:07:56 +00:00
  • 6e605b6e58 Minor improvement to taskq handling. This is a small step towards dynamic taskqs which still need to be fully implemented. behlendo 2008-04-23 21:19:47 +00:00
  • 18c9eadf97 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. behlendo 2008-04-22 22:22:02 +00:00
  • 7e4e211333 Give it a real version for a tag behlendo 2008-04-22 20:10:55 +00:00
  • b831734a43 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. behlendo 2008-04-22 16:55:26 +00:00
  • 7fea96c04f 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. behlendo 2008-04-21 22:44:11 +00:00
  • e5bbd245e3 Added 4 missing subsystem flags behlendo 2008-04-21 18:43:02 +00:00
  • a8ac0b8966 Whoops, missed an instance where we could recursively stack check... bad. behlendo 2008-04-21 18:16:04 +00:00
  • 892d51061e Handful of minor stack checking fixes behlendo 2008-04-21 18:08:33 +00:00
  • 937879f11d 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 behlendo 2008-04-21 17:29:47 +00:00
  • 2fae1b3d0a Frist minor batch of fixes. Catch a dropped ;, and use SBUG instead of BUG. behlendo 2008-04-19 00:02:11 +00:00
  • ce86265693 Whoops need this! behlendo 2008-04-18 23:42:45 +00:00
  • 57d1b18858 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. behlendo 2008-04-18 23:39:58 +00:00
  • 55152ebbb4 * 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. wartens2 2008-04-16 16:37:51 +00:00
  • d61e12af5a - 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. behlendo 2008-04-15 20:53:36 +00:00
  • c5fd77fcbf Just cleanup up an error case to avoid overspamming the console. We get the stack once from the BUG() no reason to dump it twice. behlendo 2008-04-14 18:37:20 +00:00
  • f23e92fabf Add hw_serial support based on a usermodehelper which runs at spl module load time can calls hostid. The resolved hostid is then fed back in to a proc entry for latter use. It's not a pretty thing, but it will work for now. The hw_serial is required for things such as 'zpool status' to work. behlendo 2008-04-12 04:27:59 +00:00
  • 12ea923056 Adjust the condition variables to simply sleep uninteruptibly. This way we don't have to contend with superious wakeups which it appears ZFS is not so careful to handle anyway. So this is probably for the best. behlendo 2008-04-11 22:49:48 +00:00
  • 115aed0dd8 - Add more strict in_atomic() checking to the mutex entry function just to be extra safety and paranoid. behlendo 2008-04-11 17:03:57 +00:00
  • 79f92663e3 Fix race in rwlock implementation which can occur when your task is rescheduled to a different cpu after you've taken the lock but before calling RW_LOCK_HELD is called. We need the spinlock to ensure there is a wmb() there. behlendo 2008-04-07 23:54:34 +00:00
  • 728b9dd800 - Fix write-only behavior in vn-open() - Ensure we have at least 1 write-only splat test - Fix return codes for vn_* Solaris does not use negative return codes in the kernel. So linux errno's must be inverted. behlendo 2008-04-04 17:08:12 +00:00
  • 968eccd1d1 Update the thread shim to use the current kernel threading API. We need to use kthread_create() here for a few reasons. First off to old kernel_thread() API functioin will be going away. Secondly, and more importantly if I use kthread_create() we can then properly implement a thread_exit() function which terminates the kernel thread at any point with do_exit(). This fixes our cleanup bug which was caused by dropping a mutex twice after thread_exit() didn't really exit. behlendo 2008-04-04 04:44:16 +00:00
  • 996faa6869 Correctly implement atomic_cas_ptr() function. Ideally all of these atomic operations will be rewritten anyway with the correct arch specific assembly. But not today. behlendo 2008-04-03 21:48:57 +00:00
  • 0a6fd143fd - Remapped ldi_handle_t to struct block_device * which is much more useful - Added liunx block device headers to sunldi.h - Made __taskq_dispatch safe for interrupt context where it turns out we need to be useing it. - Fixed NULL const/dest bug for kmem slab caches - Places debug __dprintf debugging messages under a spin_lock_irqsave so it's safe to use then in interrupt handlers. For debugging only! behlendo 2008-04-03 16:33:31 +00:00
  • 0998fdd6db Apparently it's OK for done to be NULL, which was not clear in the Solaris man page. Anyway, since apparently this usage is accectable I've updated the function to handle it. behlendo 2008-04-01 17:00:06 +00:00
  • 6a585c61de Double large kmalloc warning size to 4 pages. It was 2 pages, and ideally it should be dropped to one page but in the short term we should be able to easily live with 4 page allocations. behlendo 2008-04-01 16:09:18 +00:00
  • e966e04fd5 Ensure all file ops pointer are NULL or we may end up calling garbage pointers on open/close etc and get what look like random crashes. behlendo 2008-04-01 03:24:17 +00:00
  • 4fd2f7eea5 Add vmem_zalloc support. behlendo 2008-03-31 23:04:07 +00:00
  • 8d0f1ee907 Add some crude debugging support. It leaves alot to be desired, but it should allow more easy kernel debugging for now. behlendo 2008-03-31 20:42:36 +00:00
  • e487ee08fb Fixed that. behlendo 2008-03-28 18:22:29 +00:00
  • 9f4c835a0e Correctly functioning 64-bit atomic shim layer. It's not what I would call effecient but it does have the advantage of being correct which is all I need right now. I added a regression test as well. behlendo 2008-03-28 18:21:09 +00:00
  • 4a4295b267 Remove minor lingering CDDL tait of copied headers. Required headers rewritten to include minimally what we need. behlendo 2008-03-27 23:40:09 +00:00
  • d429b03d85 - Thinko fix to the SPL module interface - Enhanse the VERIFY() support to output the values which failed to compare as expected before crashing. This make debugging much much much easier. behlendo 2008-03-27 22:06:59 +00:00
  • 8ac547ec4c Relocated to zfs repo behlendo 2008-03-27 17:58:10 +00:00
  • 336bb0c0c1 Two fixes to the module interface. Could be worse! behlendo 2008-03-21 19:16:25 +00:00
  • 4e62fd4104 OK, a first reasonable attempt at a solaris module/chdev shim layer. This should handle the absolute minimum I need for ZFS. It will register the chdev with the right callbacks. Then the generic registered linux callback will find the right registered solaris callback for the function and munge the args just right before passing it on. Should work, but untested (just compiled), so I expect bugs. behlendo 2008-03-20 23:30:15 +00:00
  • e4f1d29f89 OK, some pretty substantial rework here. I've merged the spl-file stuff which only inclused the getf()/releasef() in to the vnode area where it will only really be used. These calls allow a user to grab an open file struct given only the known open fd for a particular user context. ZFS makes use of these, but they're a bit tricky to test from within the kernel since you already need the file open and know the fd. So we basically spook the system calls to setup the environment we need for the splat test case and verify given just the know fd we can get the file, create the needed vnode, and then use the vnode interface as usual to read and write from it. behlendo 2008-03-18 23:20:30 +00:00
  • 5d86345d37 Initial pass at a file API getf/releasef hooks behlendo 2008-03-18 04:56:43 +00:00
  • 1ec74a114c Minimal signal handling interface. behlendo 2008-03-17 18:29:57 +00:00
  • 2bdb28fbe0 Missing headers, more minor fixes behlendo 2008-03-15 00:05:38 +00:00
  • c19c06f3b0 Fix kmem memory accounting behlendo 2008-03-14 20:56:26 +00:00
  • 79b31f3601 Fix KMEM_DEBUG support (enable by default) Add vmem_alloc/vmem_free support (and test case) Add missing time functions behlendo 2008-03-14 19:04:41 +00:00
  • af828292e5 Add missing headers Rework vnodes to be based on the slab cache, just like on Solaris. behlendo 2008-03-14 00:04:01 +00:00
  • ea19fbed05 Add missing headers behlendo 2008-03-13 22:52:23 +00:00
  • 8ddd0ee415 Add two more missing headers behlendo 2008-03-13 20:41:29 +00:00
  • 73e540a0d1 Drop unicode support, provided in ZFS tree libport Update uio support behlendo 2008-03-13 19:49:09 +00:00
  • 36e6f86146 - Add some more missing headers - Map the LE/BE_* byteorder macros to the linux versions - More minor vnodes fixes behlendo 2008-03-12 23:48:28 +00:00
  • 2f5d55aac5 Add copyin/copyout mapping Fix some vnode types behlendo 2008-03-12 21:33:28 +00:00
  • 4b17158506 - Implemented vnode interfaces and 6 test cases to the test suite. - Re-implmented kobj support based on the vnode support. - Add TESTS option to check.sh, and removed delay after module load. behlendo 2008-03-12 20:52:46 +00:00
  • 9490c14835 Apply fix from bug239 for rwlock deadlock. behlendo 2008-03-11 20:54:40 +00:00
  • b123971fc2 Two more GPL only symbols moved to helper functions in the spl module. behlendo 2008-03-11 02:08:57 +00:00
  • ee4766827a Remap gethrestime() with #define to new symbol and export that new symbol to avoid direct use of GPL only symbol. behlendo 2008-03-10 21:38:39 +00:00
  • 51f443a074 Add some typedefs to make it clearer when we passing a function, Add fm_panic define Add another bad atomic hack (need to do this right) behlendo 2008-03-10 19:25:20 +00:00
  • 4098c921b6 Fix systemic naming mistake behlendo 2008-03-10 19:04:14 +00:00
  • 6adf99e7d6 Add missing headers behlendo 2008-03-10 17:05:34 +00:00
  • 12472b242d Just filling in more of the env. behlendo 2008-03-08 00:58:32 +00:00
  • 05ae387b50 Add somre debugging support behlendo 2008-03-08 00:18:21 +00:00
  • 0b3cf046cb Add the initial vestigates of vnode support behlendo 2008-03-07 23:07:02 +00:00
  • 3b3ba48fe9 Add missing cred.h functions Resolve compiler warning with kmem_free (unused len) Add stub for byteorder.h Add zlib shim for compress2 and uncompress functions behlendo 2008-03-07 20:48:44 +00:00
  • b0dd3380aa Minor atomic cleanup, this needs to be done right. Fixed a bug in the timer code Added missing macros behlendo 2008-03-07 00:28:32 +00:00
  • ed61a7d05e Add some missing rw_lock symbols behlendo 2008-03-06 23:42:37 +00:00
  • 77b1fe8fa8 Add highbit func, Add sloopy atomic declaration which will need to be fixed (eventually) Fill out more of the Solaris VM hooks Adjust the create_thread function behlendo 2008-03-06 23:12:55 +00:00
  • a713518f5d Checkpoint for the night, added a few more stub headers, fleshed out a few stub headers, added a FIXME file, added various compatibility macros behlendo 2008-03-05 00:58:54 +00:00
  • 23f28c4f75 Remove spl.h, just include the headers you need. Add a few more stubs. behlendo 2008-03-04 20:06:29 +00:00
  • 48f940b943 Fix type behlendo 2008-03-04 19:38:27 +00:00
  • 14c5326ccd More stub headers, moved generic to sysmacros, added some more macros for kernel compatibility behlendo 2008-03-04 18:22:31 +00:00
  • dbb484ec60 Stub out some missing headers which are expected. I'll fill in what the contents need to be as I encounter the warnings about missing prototypes, symbols, and such. behlendo 2008-03-01 18:30:12 +00:00
  • d5f087adef Remaining lose ends behlendo 2008-03-01 00:51:41 +00:00
  • ea70970ff5 Almost dropped this! behlendo 2008-03-01 00:47:23 +00:00
  • f4b377415b Reorganize /include/ to add a /sys/, this way we don't need to muck with #includes in existing Solaris style source to get it to find the right stuff. behlendo 2008-03-01 00:45:59 +00:00
  • 09b414e880 Minor nit, SOLARIS should be SPL behlendo 2008-02-28 00:52:31 +00:00
  • 596e65b4e8 OK, I think this is the last of major cleanup and restructuring. We've dropped all the linux- prefixes on the file in favor of spl- which makes more sense. And we've cleaned up some of the includes so everybody should be including their own dependencies properly. All a module which wants to use the spl support needs to do in include spl.h and ensure it has access to Module.symvers. behlendo 2008-02-28 00:48:31 +00:00
  • 07d339d467 Add top level make check target which runs the validation suite. Careful with this right now one of the tests still causes a lockup on the node. This happened before the move from the ZFS repo so its not a new issue. behlendo 2008-02-28 00:16:24 +00:00
  • 7c50328b40 More cleanup. - Removed all references to kzt and replaced with splat - Moved portions of include files which do not need to be available to all source files in to local.h files in proper source subdirs. behlendo 2008-02-27 23:42:31 +00:00