Commit Graph

1128 Commits

Author SHA1 Message Date
Brian Behlendorf
8920c6918a SPL 0.6.0-rc8 2012-03-26 11:57:13 -07:00
Darik Horn
c58098585c PPA 0.6.0.55-0ubuntu1 release. 2012-03-23 18:40:30 -05:00
Darik Horn
d91485e63d Merge branch 'upstream' 2012-03-23 18:39:21 -05:00
Brian Behlendorf
0835057ee7 Add SPL_META_RELEASE to module load/unload messages
Include the ZFS_META_RELEASE in the module load/unload messages
to more clearly indicate exactly what version of the SPL has
been loaded.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2012-03-23 12:11:50 -07:00
Darik Horn
2a08388b43 PPA 0.6.0.54-0ubuntu1 release. 2012-03-16 23:31:52 -05:00
Darik Horn
44f47614fc Merge branch 'upstream' 2012-03-16 23:30:43 -05:00
Brian Behlendorf
5d139aaa2b SPL 0.6.0-rc7 2012-03-16 11:28:28 -07:00
Darik Horn
10829621c7 PPA 0.6.0.53-0ubuntu1 release. 2012-03-09 20:16:40 -06:00
Darik Horn
d0cad257a5 Merge branch 'upstream' 2012-03-09 20:12:50 -06:00
Brian Behlendorf
a3a69b74cd Fix distribution detection
Improve the distribution detection by moving the tests for
distribution specific files first.  The Ubuntu and Debian
checks are left for last because they are the least likely
to be unique.  This is particularly true in the case of Debian
since so many distributions are based on Debian.

Since this is currently only used to identify the correct
packaging method for this system the result in many instances
is simply cosmetic.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2012-03-05 10:38:38 -08:00
Darik Horn
93dc71ce6e Improve debian/copyright syntax conformance.
Remove tailing dots from copyright attributions and remove the GPL
stub from the header paragraph.
2012-02-28 13:38:07 -06:00
Darik Horn
2a61acb822 Correct the debian/changelog Upstream-Name field. 2012-02-28 13:34:07 -06:00
Darik Horn
4ceeedfa88 PPA 0.6.0.52-0ubuntu2 release. 2012-02-27 20:19:56 -06:00
Darik Horn
afc8754c3b Revert "Change POST_INSTALL to POST_BUILD in dkms.conf"
This reverts commit a68ebb5f24.

The POST_BUILD variable is not in the internal dkms_conf_variables
list, which makes it a no-op on most systems. This is a DKMS bug.
2012-02-27 20:16:52 -06:00
Darik Horn
7087dab7a5 PPA 0.6.0.52-0ubuntu1 release. 2012-02-27 19:21:46 -06:00
Darik Horn
4e0a3b70e5 Merge branch 'upstream' 2012-02-27 19:19:21 -06:00
Brian Behlendorf
3c208a5480 Cleanly support debug packages
Allow a source rpm to be rebuilt with debugging enabled.  This
avoids the need to have to manually modify the spec file.  By
default debugging is still largely disabled.  To enable specific
debugging features use the following options with rpmbuild.

  '--with debug'               - Enables ASSERTs
  '--with debug-log'           - Enables the internal debug log
  '--with debug-kmem'          - Enables basic memory accounting
  '--with debug-kmem-tracking' - Enables detailed memory tracking

  # For example:
  $ rpmbuild --rebuild --with debug spl-modules-0.6.0-rc6.src.rpm

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2012-02-27 14:24:22 -08:00
Darik Horn
8f54606770 Add machine readable debian/copyright file.
Update the copyright file for DEP-5 policy conformance:

  http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2012-02-25 10:05:50 -06:00
Fajar A. Nugraha
a68ebb5f24 Change POST_INSTALL to POST_BUILD in dkms.conf
* Moved cp command to POST_BUILD so you can compile zfs module
    as long as spl module already build, without it having to be
    installed. Useful when testing multiple version of spl module
    in dkms tree

Partial cherry-pick from:
  fajarnugraha/spl@74db6cd775
2012-02-25 08:16:50 -06:00
Darik Horn
477ae4441c PPA 0.6.0.51-0ubuntu1 release. 2012-02-12 19:00:21 -06:00
Darik Horn
6311cf747a Merge branch 'upstream' 2012-02-12 18:57:18 -06:00
Brian Behlendorf
feedc43601 Add missing spl_debug_* helpers
When building the spl with --disable-debug-log the __SDEBUG()
macro and spl_debug_* helper functions were undefined.  This
change adds the missing functions so the upper layers compiling
against the spl don't need to be aware of how the spl was built.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2012-02-09 16:41:46 -08:00
Darik Horn
aa7187df89 PPA 0.6.0.50-0ubuntu1 release. 2012-02-08 17:48:53 -06:00
Darik Horn
9be0865cd6 PPA 0.6.0.49-0ubuntu1 release. 2012-02-03 14:27:19 -06:00
Darik Horn
072ee174b1 Merge branch 'upstream' 2012-02-03 14:25:17 -06:00
Brian Behlendorf
9a8b7a7458 Add basic dynamic kstat support
Add the bare minimum functionality to support dynamic kstats.  A
complete kstat implementation should be done as part of issue #84.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #84
2012-02-02 11:28:00 -08:00
Brian Behlendorf
4b2220f0b9 Add --enable-debug-log configure option
Until now the notion of an internal debug logging infrastructure
was conflated with enabling ASSERT()s.  This patch clarifies things
by cleanly breaking the two subsystem apart.  The result of this
is the following behavior.

--enable-debug      - Enable/disable code wrapped in ASSERT()s.
--disable-debug       ASSERT()s are used to check invariants and
                      are never required for correct operation.
                      They are disabled by default because they
                      may impact performance.

--enable-debug-log  - Enable/disable the debug log infrastructure.
--disable-debug-log   This infrastructure allows the spl code and
                      its consumer to log messages to an in-kernel
                      log.  The granularity of the logging can be
                      controlled by a debug mask.  By default the
                      mask disables most debug messages resulting
                      in a negligible performance impact.  Because
                      of this the debug log is enabled by default.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2012-02-02 11:27:54 -08:00
Darik Horn
133ba6c85f PPA 0.6.0.48-0ubuntu1 release. 2012-01-19 20:18:50 -06:00
Darik Horn
22948f1d2e Merge branch 'upstream' 2012-01-19 20:17:43 -06:00
Ned Bass
3c6ed5410b Taskq locking optimizations
Testing has shown that tq->tq_lock can be highly contended when a
large number of small work items are dispatched.  The lock hold time
is reduced by the following changes:

1) Use exclusive threads in the work_waitq

When a single work item is dispatched we only need to wake a single
thread to service it.  The current implementation uses non-exclusive
threads so all threads are woken when the dispatcher calls wake_up().
If a large number of threads are in the queue this overhead can become
non-negligible.

2) Conditionally add/remove threads from work waitq

Taskq threads need only add themselves to the work wait queue if
there are no pending work items.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #32
2012-01-19 14:42:49 -08:00
Ned Bass
0bb43ca282 Revert "Taskq locking optimizations"
This reverts commit ec2b41049f.

A race condition was introduced by which a wake_up() call can be lost
after the taskq thread determines there is no pending work items,
leading to deadlock:

1. taksq thread enables interrupts
2. dispatcher thread runs, queues work item, call wake_up()
3. taskq thread runs, adds self to waitq, sleeps

This could easily happen if an interrupt for an IO completion was
outstanding at the point where the taskq thread reenables interrupts,
just before the call to add_wait_queue_exclusive().  The handler would
run immediately within the race window.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #32
2012-01-19 14:42:39 -08:00
Darik Horn
5c49a8f388 PPA 0.6.0.47-0ubuntu1 release. 2012-01-18 18:22:04 -06:00
Darik Horn
8e397e7597 Merge branch 'upstream' 2012-01-18 18:20:02 -06:00
Brian Behlendorf
87d1123924 Fix rpm dependencies
This change updates the rpm spec files to have strictly correct
package dependencies.  That means a few things:

* Add a dependency to the spl package for the spl-modules package.
  This ensures that when running 'yum install spl' that newest
  version of the spl-modules will be installed.

* Remove the redundant distribution release extension.  This
  is already added once because it is part of the kernel package
  release name.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2012-01-18 11:24:36 -08:00
Brian Behlendorf
a2eda2ff48 Add the release component to headers
When the original build system code was added the release
component was accidentally omited from the development header
install path.  This patch adds the missing path component so
it's always clear exactly what release your compiling against.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2012-01-18 11:06:26 -08:00
Ned Bass
ec2b41049f Taskq locking optimizations
Testing has shown that tq->tq_lock can be highly contended when a
large number of small work items are dispatched.  The lock hold time
is reduced by the following changes:

1) Use exclusive threads in the work_waitq

When a single work item is dispatched we only need to wake a single
thread to service it.  The current implementation uses non-exclusive
threads so all threads are woken when the dispatcher calls wake_up().
If a large number of threads are in the queue this overhead can become
non-negligible.

2) Conditionally add/remove threads from work waitq outside of tq_lock

Taskq threads need only add themselves to the work wait queue if there
are no pending work items.  Furthermore, the add and remove function
calls can be made outside of the taskq lock since the wait queues are
protected from concurrent access by their own spinlocks.

3) Call wake_up() outside of tq->tq_lock

Again, the wait queues are protected by their own spinlock, so the
dispatcher functions can drop tq->tq_lock before calling wake_up().

A new splat test taskq:contention was added in a prior commit to measure
the impact of these changes.  The following table summarizes the
results using data from the kernel lock profiler.

                        tq_lock time    %diff   Wall clock (s)  %diff
original:               39117614.10     0       41.72           0
exclusive threads:      31871483.61     18.5    34.2            18.0
unlocked add/rm waitq:  13794303.90     64.7    16.17           61.2
unlocked wake_up():     1589172.08      95.9    16.61           60.2

Each row reflects the average result over 5 test runs.
/proc/lock_stats was zeroed out before and collected after each run.
Column 1 is the cumulative hold time in microseconds for tq->tq_lock.
The tests are cumulative; each row reflects the code changes of the
previous rows.  %diff is calculated with respect to "original" as
100*(orig-new)/orig.

Although calling wake_up() outside of the taskq lock dramatically
reduced the taskq lock hold time, the test actually took slightly more
wall clock time.  This is because the point of contention shifts from
the taskq lock to the wait queue lock.  But the change still seems
worthwhile since it removes our taskq implementation as a bottleneck,
assuming the small increase in wall clock time to be statistical
noise.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #32
2012-01-18 10:36:57 -08:00
Ned Bass
cf5d23fa1e Add taskq contention splat test
Add a test designed to generate contention on the taskq spinlock by
using a large number of threads (100) to perform a large number (131072)
of trivial work items from a single queue.  This simulates conditions
that may occur with the zio free taskq when a 1TB file is removed from a
ZFS filesystem, for example.  This test should always pass.  Its purpose
is to provide a benchmark to easily measure the effectiveness of taskq
optimizations using statistics from the kernel lock profiler.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #32
2012-01-18 10:36:51 -08:00
Darik Horn
3ea372479c PPA 0.6.0.46-0ubuntu1 release. 2012-01-18 11:47:05 -06:00
Darik Horn
ce8ebcc8e0 Remove the debian/rules make distclean kludge.
The modules/Makefile.am template produced a broken distclean rule for
userland configurations. The packaging kludge was made redundant by
commit zfslinux/spl@966e5200d3.
2012-01-18 11:38:33 -06:00
Darik Horn
de6b478050 Merge branch 'upstream' 2012-01-18 11:37:17 -06:00
Darik Horn
966e5200d3 Fix make distclean for --with-config=user
Apply the same fix to SPL that was applied to ZFS earlier at:
zfsonlinux/zfs@d433c20651

Additionally quote @LINUX_SYMBOLS@ because it is a null substitution
in this configuration, which results in a `[ -f  ]` expression that
incorrectly evaluates to true.

  # ./configure --with-config=user
  # make distclean

  Making distclean in module
  make[1]: Entering directory `/spl/module'
  make -C  SUBDIRS=`pwd`  clean
  make: Entering an unknown directory
  make: *** SUBDIRS=/spl/module: No such file or directory.  Stop.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2012-01-17 10:06:00 -08:00
Darik Horn
133bd0aa31 PPA 0.6.0.45-0ubuntu1 release. 2012-01-15 18:36:38 -06:00
Darik Horn
40f6f9813b Merge branch 'fhs' 2012-01-15 18:32:56 -06:00
Darik Horn
a79112fc8c Merge branch 'upstream' 2012-01-15 18:32:50 -06:00
Darik Horn
28aa903715 FHS conformance and DKMS multiarch, SPL interface.
Improve FHS conformance by installing intermediary build products --
currently the spl_config.h and Module.symvers files -- into the
/var/lib/dkms area instead of /usr/src.

This has the beneficial side-effect of enabling DKMS multiarch
support for SPL because the autoconf templates and `make install`
rules are not aware of the target architecture.

Mitigates: zfsonlinux/zfs#511
2012-01-14 00:37:56 -06:00
Darik Horn
1e4c5cbbad Wrap long lines in the dkms.conf file. 2012-01-13 23:53:13 -06:00
Brian Behlendorf
0b14b9f327 Run SPL_AC_PACMAN only if $VENDOR is "arch"
Unfortunately, Arch's package manager `pacman` shares it's name with a
popular arcade video game. Thus, in order to refrain from executing the
video game when we mean to execute the package manager, SPL_AC_PACMAN is
now only run when $VENDOR is determined to be "arch".

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes zfsonlinux/zfs#517
2012-01-13 09:08:12 -08:00
Darik Horn
baaf6ea3c6 PPA 0.6.0.44-0ubuntu1 release. 2012-01-12 19:26:00 -06:00
Darik Horn
dee7282350 Merge branch 'upstream' 2012-01-12 19:24:02 -06:00
Darik Horn
588d900433 Linux 3.2 compat: rw_semaphore.wait_lock is raw
The wait_lock member of the rw_semaphore struct became a raw_spinlock_t
in Linux 3.2 at torvalds/linux@ddb6c9b58a.

Wrap spin_lock_* function calls in a new spl_rwsem_* interface to
ensure type safety if raw_spinlock_t becomes architecture specific,
and to satisfy these compiler warnings:

  warning: passing argument 1 of ‘spinlock_check’
    from incompatible pointer type [enabled by default]
  note: expected ‘struct spinlock_t *’
    but argument is of type ‘struct raw_spinlock_t *’

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes: #76
Closes: zfsonlinux/zfs#463
2012-01-11 16:28:05 -08:00