]> git.proxmox.com Git - mirror_spl-debian.git/log
mirror_spl-debian.git
15 years agoEnsure -NDEBUG does not get added to spl_config.h and is only set in the build option...
Brian Behlendorf [Tue, 20 Jan 2009 19:59:47 +0000 (11:59 -0800)]
Ensure -NDEBUG does not get added to spl_config.h and is only set in the build options.  This allows other kernel modules to use spl_config to leverage the reset of the config checks without getting confused with the debug options

15 years agoRefresh libtool
Brian Behlendorf [Thu, 15 Jan 2009 18:47:24 +0000 (10:47 -0800)]
Refresh libtool

15 years agoRename modules to module and update references
Brian Behlendorf [Thu, 15 Jan 2009 18:44:54 +0000 (10:44 -0800)]
Rename modules to module and update references

15 years agoMake the splat load message caps just for consistency
Brian Behlendorf [Tue, 13 Jan 2009 19:45:02 +0000 (11:45 -0800)]
Make the splat load message caps just for consistency

15 years agoTASKQ_DYNAMIC not yet support, do not create the global taskq with that flag or we...
Brian Behlendorf [Tue, 13 Jan 2009 19:43:05 +0000 (11:43 -0800)]
TASKQ_DYNAMIC not yet support, do not create the global taskq with that flag or we crash with debug enabled.  Also don't bother dumping debug when debugging is diabled, it's pointless

15 years agoRework ddi_strtox calls to a native implementation which actuall supports the EINVAL...
Brian Behlendorf [Tue, 13 Jan 2009 17:30:59 +0000 (09:30 -0800)]
Rework ddi_strtox calls to a native implementation which actuall supports the EINVAL, ERANGE error handling, plus add a regression suite to ensure I got it atleast mostly right

15 years agoAdd missing stub headers
Brian Behlendorf [Sat, 10 Jan 2009 00:04:44 +0000 (16:04 -0800)]
Add missing stub headers

15 years agoAdd basic ksid_lookupdomain and ksiddomain_rele support, just allocations
Brian Behlendorf [Fri, 9 Jan 2009 23:30:53 +0000 (15:30 -0800)]
Add basic ksid_lookupdomain and ksiddomain_rele support, just allocations

15 years agoMake sure we export ddi_quiesce_not_needed
Brian Behlendorf [Fri, 9 Jan 2009 22:30:30 +0000 (14:30 -0800)]
Make sure we export ddi_quiesce_not_needed

15 years agoAdd two new stub headers
Brian Behlendorf [Fri, 9 Jan 2009 22:04:13 +0000 (14:04 -0800)]
Add two new stub headers

15 years agoAdd VOP_SEEK
Brian Behlendorf [Fri, 9 Jan 2009 21:59:39 +0000 (13:59 -0800)]
Add VOP_SEEK

15 years agoAdd missing policy includes, add missing sun ddi bits
Brian Behlendorf [Fri, 9 Jan 2009 18:49:47 +0000 (10:49 -0800)]
Add missing policy includes, add missing sun ddi bits

15 years agoAdd share.h stub
Brian Behlendorf [Fri, 9 Jan 2009 18:06:18 +0000 (10:06 -0800)]
Add share.h stub

15 years agoDrat fix missing ;
Brian Behlendorf [Fri, 9 Jan 2009 18:05:03 +0000 (10:05 -0800)]
Drat fix missing ;

15 years agoAdd missing callback_context_t and fid_t types
Brian Behlendorf [Fri, 9 Jan 2009 18:03:37 +0000 (10:03 -0800)]
Add missing callback_context_t and fid_t types

15 years agoAdd stubs for three more includes
Brian Behlendorf [Fri, 9 Jan 2009 17:47:27 +0000 (09:47 -0800)]
Add stubs for three more includes

15 years agoAdd active test for splat list tests
Brian Behlendorf [Wed, 7 Jan 2009 21:48:36 +0000 (13:48 -0800)]
Add active test for splat list tests

15 years agoAdd 5 splat tests for list handling
Brian Behlendorf [Wed, 7 Jan 2009 20:54:03 +0000 (12:54 -0800)]
Add 5 splat tests for list handling

15 years agoAdd include/sys/compress.h header
Brian Behlendorf [Tue, 6 Jan 2009 17:47:00 +0000 (09:47 -0800)]
Add include/sys/compress.h header

15 years agoAdd P2BOUNDARY macro
Brian Behlendorf [Tue, 6 Jan 2009 17:23:13 +0000 (09:23 -0800)]
Add P2BOUNDARY macro

15 years agoPull in some default page typedefs
Brian Behlendorf [Tue, 6 Jan 2009 00:14:38 +0000 (16:14 -0800)]
Pull in some default page typedefs

15 years agoAdd DTRACE_PROBE(a)
Brian Behlendorf [Tue, 6 Jan 2009 00:09:21 +0000 (16:09 -0800)]
Add DTRACE_PROBE(a)

15 years agoStub u8_textprep.h for inclusion purposes
Brian Behlendorf [Mon, 5 Jan 2009 23:37:07 +0000 (15:37 -0800)]
Stub u8_textprep.h for inclusion purposes

15 years agoAdd system taskq support
Brian Behlendorf [Mon, 5 Jan 2009 23:08:03 +0000 (15:08 -0800)]
Add system taskq support

15 years agoRemove u8_textprep, we will not be implementing this nightmare yet
Brian Behlendorf [Mon, 5 Jan 2009 19:32:08 +0000 (11:32 -0800)]
Remove u8_textprep, we will not be implementing this nightmare yet

15 years agoInclude the header
Brian Behlendorf [Wed, 24 Dec 2008 00:48:15 +0000 (16:48 -0800)]
Include the header

15 years agoAdd sys/thread.h
Brian Behlendorf [Wed, 24 Dec 2008 00:27:36 +0000 (16:27 -0800)]
Add sys/thread.h

15 years agoDefine needfree
Brian Behlendorf [Tue, 23 Dec 2008 23:59:36 +0000 (15:59 -0800)]
Define needfree

15 years agoAdd timer.h header
Brian Behlendorf [Tue, 23 Dec 2008 23:40:20 +0000 (15:40 -0800)]
Add timer.h header

15 years agoAdd u8 stub
Brian Behlendorf [Tue, 23 Dec 2008 23:38:15 +0000 (15:38 -0800)]
Add u8 stub

15 years agoMove sunddi include
Brian Behlendorf [Tue, 23 Dec 2008 21:32:07 +0000 (13:32 -0800)]
Move sunddi include

15 years agoAdd sunddi to uio
Brian Behlendorf [Tue, 23 Dec 2008 21:30:04 +0000 (13:30 -0800)]
Add sunddi to uio

15 years agoMinor updates
Brian Behlendorf [Tue, 23 Dec 2008 21:25:52 +0000 (13:25 -0800)]
Minor updates

15 years agoPull in lock types
Brian Behlendorf [Tue, 23 Dec 2008 21:18:39 +0000 (13:18 -0800)]
Pull in lock types

15 years agoAdd header
Brian Behlendorf [Tue, 23 Dec 2008 21:05:50 +0000 (13:05 -0800)]
Add header

15 years agoAdd a few more missing header which the upstream stock kernel context expects
Brian Behlendorf [Tue, 23 Dec 2008 21:03:09 +0000 (13:03 -0800)]
Add a few more missing header which the upstream stock kernel context expects

15 years agoAdd struct ddi_strtox functions
Brian Behlendorf [Sat, 6 Dec 2008 00:23:57 +0000 (16:23 -0800)]
Add struct ddi_strtox functions

15 years agoRefresh
Brian Behlendorf [Sat, 6 Dec 2008 00:20:09 +0000 (16:20 -0800)]
Refresh

15 years agoPrefix META_ALIAS with SPL_
Brian Behlendorf [Wed, 26 Nov 2008 21:26:05 +0000 (13:26 -0800)]
Prefix META_ALIAS with SPL_

15 years agoPrefix all META_* #defines with SPL to prevent colisions which include our spl_config...
Brian Behlendorf [Wed, 26 Nov 2008 21:09:37 +0000 (13:09 -0800)]
Prefix all META_* #defines with SPL to prevent colisions which include our spl_config.h.  Dependent packages may do this to leverage the autoconf check we have already run aganst the kernel.

15 years agoRebase on Git from SVN as of version 0.4.0.
Brian Behlendorf [Wed, 26 Nov 2008 17:57:29 +0000 (09:57 -0800)]
Rebase on Git from SVN as of version 0.4.0.

15 years agoTag spl-0.3.5
behlendo [Wed, 26 Nov 2008 17:44:40 +0000 (17:44 +0000)]
Tag spl-0.3.5

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

15 years agoAdd libtool script
behlendo [Wed, 26 Nov 2008 17:43:44 +0000 (17:43 +0000)]
Add libtool script

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

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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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