Go to file
Brian Behlendorf d4899f4747 kmem-cache: Fix slab ageing soft lockup
Commit a10287e00d slightly reworked
the slab ageing code such that it is no longer dependent on the
Linux delayed work queue interfaces.

This was good for portability and performance, but it requires us
to use the on_each_cpu() function to execute the spl_magazine_age()
function.  That means that the function is now executing in interrupt
context whereas before it was scheduled in normal process context.
And that means we need to be slightly more careful about the locking
in the interrupt handler.

With the reworked code it's possible that we'll be holding the
skc->skc_lock and be interrupted to handle the spl_magazine_age()
IRQ.  This will result in a deadlock and soft lockup errors unless
we're careful to detect the contention and avoid taking the lock in
the interupt handler.  So that's what this patch does.

Alternately, (and slightly more conventionally) we could have used
spin_lock_irqsave() to prevent this race entirely but I'd perfer to
avoid disabling interrupts as much as possible due to performance
concerns.  There is absolutely no penalty for us not aging objects
out of the magazine due to contention.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Closes zfsonlinux/zfs#1193
2013-01-14 10:07:58 -08:00
cmd splat command verbose behavior 2012-12-11 15:08:19 -08:00
config Check for ZLIB_INFLATE and ZLIB_DEFLATE 2013-01-09 16:40:25 -08:00
include RHEL 6.4 compat, fallocate() 2013-01-08 09:53:13 -08:00
lib Remove autotools products 2012-08-27 11:46:23 -07:00
module kmem-cache: Fix slab ageing soft lockup 2013-01-14 10:07:58 -08:00
patches Reimplement rwlocks for Linux lock profiling/analysis. 2009-09-18 16:09:47 -07:00
scripts Remove autotools products 2012-08-27 11:46:23 -07:00
.gitignore Remove autotools products 2012-09-11 10:12:47 -07:00
AUTHORS Refresh AUTHORS 2012-12-19 09:40:18 -08:00
autogen.sh Remove autotools products 2012-08-27 11:46:23 -07:00
configure.ac Support building a spl-modules-dkms sub package 2012-08-08 13:49:40 -07:00
copy-builtin Add script for builtin module building. 2012-07-26 15:13:09 -07:00
COPYING Public Release Prep 2010-05-17 15:18:00 -07:00
DISCLAIMER Public Release Prep 2010-05-17 15:18:00 -07:00
dkms.conf.in Support building a spl-modules-dkms sub package 2012-08-08 13:49:40 -07:00
dkms.postinst Support building a spl-modules-dkms sub package 2012-08-08 13:49:40 -07:00
INSTALL Public Release Prep 2010-05-17 15:18:00 -07:00
Makefile.am Do not use KERNEL_DIR env var in Makefile.am 2012-12-17 10:59:12 -08:00
META SPL 0.6.0-rc13 2012-12-20 11:01:47 -08:00
PKGBUILD-spl-modules.in Add make rule for building Arch Linux packages 2011-12-14 16:44:10 -08:00
PKGBUILD-spl.in Add make rule for building Arch Linux packages 2011-12-14 16:44:10 -08:00
README.markdown Add script for builtin module building. 2012-07-26 15:13:09 -07:00
spl-modules.spec.in Cleanly remove spl-modules-devel headers 2012-08-13 16:34:32 -07:00
spl.release.in Move spl.release generation to configure step 2012-07-12 12:13:47 -07:00
spl.spec.in Remove the ChangeLog 2012-12-19 09:28:18 -08:00

The Solaris Porting Layer (SPL) is a Linux kernel module which provides many of the Solaris kernel APIs. This shim layer makes it possible to run Solaris kernel code in the Linux kernel with relatively minimal modification. This can be particularly useful when you want to track upstream Solaris development closely and dont want the overhead of maintaining a large patch which converts Solaris primitives to Linux primitives.

To build packages for your distribution:

$ ./configure
$ make pkg

To copy the kernel code inside your kernel source tree for builtin compilation:

$ ./configure --enable-linux-builtin --with-linux=/usr/src/linux-...
$ ./copy-builtin /usr/src/linux-...

Full documentation for building, configuring, and using the SPL can be found at: http://zfsonlinux.org