1 2010-05-21 Brian Behlendorf <behlendorf1@llnl.gov>
5 * : Build system improvements:
6 - Added support for the 'make -s' silent build option.
7 - Allow spl_config.h to be included by dependent packages.
8 - Minor spec file updates.
10 * AUTHORS, COPYING, DISCLAIMER, and INSTALL: Updated.
12 * *.c, *.h, *.sh, AUTHORS, COPYING, DISCLAIMER, and INSTALL:
13 Added standard header to source files which includes the copyright,
14 license, and author information. Additionally, updated the listed
15 top level files to the latest versions.
17 * module/spl/spl-debug.c: Debugging defaults adjusted. The default
18 log dump path is now /tmp/spl-log and panic on SBUG has been disabled.
20 * include/sys/processor.h, include/sys/systm.h, include/sys/types.h:
21 Added 3 missing typedefs processorid_t, pc_t, and index_t.
23 * include/sys/console.h: Added support for console_* functions().
25 * module/spl/spl-time.c: Updated gethrtime() to use the function
26 do_posix_clock_monotonic_gettime() as described in the comment.
28 * module/spl/spl-condvar.c: Added cv_wait_interruptible() function
29 as an extension to the existing condition variable ABI to enable
30 sleeping threads a way to cleanly handle signals in the kernel.
32 * module/spl/spl-debug.c: Dump log from current process as required.
34 * module/spl/spl-taskq.c: Assume TQ_SLEEP in taskq_dispatch() if
35 the caller does not specify, this is the Solaris default.
37 * module/spl/spl-vnode.c: Extend the vn_rdwr() implementation to
38 correctly handle the FAPPEND option.
40 * module/spl/spl-generic.c, module/spl/spl-vnode.c: Update
41 vn_set_pwd() to allow a kernal address as filename. This turns
42 out to be critical because spl_setup()->The vn_set_pwd("/") which
43 is called at module load time was failing with -EFAULT.
45 * include/sys/rwlock.h: Disable rw_tryupgrade() for kernels built
46 without CONFIG_RWSEM_GENERIC_SPINLOCK defined. The existing
47 implementation is not safe in this case and needs to be replaced
48 with a correct native per-arch implementation.
50 * module/spl/spl-kmem.c: Reduce maximum kmem based slab size.
51 Allowing MAX_ORDER-1 sized memory allocations while the system
52 is low on memory has been observed to result in deadlocks. Callers
53 should not be using the slab in this way but we should still handle
54 the case more cleanly.
56 * module/spl/spl-kmem.c: Remove kmem_set_warning() interface and
57 replace it with KM_NODEBUG flag which can be specific per allocation.
59 * module/splat/splat-kmem.c: Tweaked what the idea of a large object
60 is for the kmem:slab_large regression tests because failures were
61 observed for very large kmem objects in newer kernels.
63 * include/sys/rwlock.h, module/splat/splat-rwlock.c: The rwlock
64 implementation was simplified because failures were being observed
65 when using the non-generic implementation. This change leverages
66 the rwsem_is_locked() function instead of directly consulting the
67 rwsem internals which differ per-arch and per-kernel-version.
69 2010-03-11 Brian Behlendorf <behlendorf1@llnl.gov>
73 * : Build system improvements:
74 - Remove Module.markers and Module.symver{s} in clean target.
75 - Improved kernel source detection when none specified.
76 - Fix RPM definitions for the unknown distro/installation.
78 * config/spl-build.m4: Linux 2.6.32 compat, SPL_AC_5ARGS_PROC_HANDLER
79 macro added to handle updated proc_handler () API.
81 * module/spl/spl-err.c: Fix panic() string, which was being used as a
82 format string, instead of an already-formatted string.
84 * /module/spl/spl-taskq.c: Optimize lowest outstanding taskqid
85 calculation in taskq_lowest_id(). The motivation for this change
86 was that I was observing as much as 10% of the total CPU time go
87 to waiting on the tq->tq_lock when the pending list was long.
89 * module/spl/spl-kmem.c: Strip __GFP_ZERO from kmalloc it is not
90 available for older kernels.
92 * module/spl/spl-proc.c: Add skc_flags and full header to
95 * module/spl/spl-generic.c: Correctly handle division on 32-bit RHEL5
96 systems by returning dividend.
98 * include/sys/rwlock.h: When using x86 specific rwsem correctly
99 intepret rwsem->count. Additionally check for changed guard macro
100 in 2.6.28+ for rwsem implementation
102 * module/splat/splat-vnode.c, module/splat/splat-kmem.c,
103 module/splat/splat-taskq.c: Several new tests were added to the
104 test suite and various bug fixes.
106 * include/asm/atomic_compat.h: Atomic64 compatibility for 32-bit
107 systems without kernel support.
109 * .gitignore: Added .gitignore files.
111 2009-11-20 Brian Behlendorf <behlendorf1@llnl.gov>
115 * config/spl-build.m4: Linux 2.6.31 compat, SPL_AC_2ARGS_SET_FS_PWD
116 macro updated to explicitly include linux/fs_struct.h which was
117 dropped from linux/sched.h.
119 * include/linux/mm_compat.h: Linux 2.6.31 compat, use the macros
120 min_wmark_pages, low_wmark_pages, and high_wmark_pages which were
121 introduced. For older kernels a compability macro is used.
123 * include/sys/kmem.h: Linux 2.6.31 compat, the __GFP_NOFAIL flag
124 should no longer be used and it may disappear from the kernel at any
125 time. To handle this I have simply added *_nofail wrappers in the
126 kmem implementation which perform the retry for non-atomic allocations.
128 * module/spl/spl-kmem.c: Linux 2.6.31 compat, kmem cache alignment
129 fixes and cleanup. Always perform allocations for the kmem cache
130 using __get_free_pages() or __vmalloc() to ensure the returned
131 memory is page aligned. Also introduce helper functions which use
132 P2ROUNDUP_TYPE instead of P2ROUNDUP force all types to be explicit.
134 * include/sys/mutex.h: Add mutex_enter_nested() as wrapper for
135 mutex_lock_nested() to permit integration with the lock checker.
137 * include/sys/mutex.h: Always use the generic mutex_destroy().
139 * Makefile.am: Ensure *.order and *.markers build products are
140 removed by distclean rule.
142 2009-11-02 Brian Behlendorf <behlendorf1@llnl.gov>
146 * config/spl-build.m4: Cleanup --enable-debug-* configure options.
147 --enable-debug=<default no> generic debug support.
148 --enable-debug-kmem=<default yes> basic kmem and slab accounting.
149 --enable-debug-kmem-tracking=<default no> detailed kmem tracking.
150 --enable-debug-kstat removed option support always enabled.
151 --enable-debug-callb removed option which never did anything.
153 * module/spl/spl-atomic.c: Reimplemented atomic functions by
154 layering them on top of the Linux atomic functions. This improves
155 performance by removing the need for a global spinlock.
157 * module/spl/spl-debug.c: Rebase cmn_err on vcmn_err. Handle the
158 case where the message contains a leading ! which means only send
159 it to syslog. And suppress warnings for messages which do not end
162 * module/splat/splat-ctl.c: Update to use kobject_set_name() for
163 increased portability.
165 * module/spl/spl-generic.c: Set cwd to '/' for the task during
166 module load for SPL dependent modules. Under Solaris this is
167 the expected behavior, on a Linux system your cwd remains set
168 to whatever the tasks cwd was when loading a module.
170 * module/spl/spl-mutex.c: Reimplemented mutexs for improved
171 performance and cleaner integration with the Linux kernels built
172 in lock analyzer. As of 2.6.29 based kernels adaptive mutexs
173 are supported, for these newer kernels task_curr() does not need
174 to be exported. Finally, DEBUG_MUTEX support was dropped in
175 favor of more detailed kernel profiling which is now available.
177 * module/spl/spl-rwlock.c: Reimplemented rwlocks for improved
178 performance and cleaner integration with the Linux kernels built
179 in lock analyzer. Additionally, the rwlock regression tests were
180 improved to help validate correctness.
182 * spl-modules.spec.in: Various spec file tweaks for the supported
183 distros: RHEL5, RHEL6, SLES10, SLES11, Chaos4, Fedora 11.
185 2009-08-04 Brian Behlendorf <behlendorf1@llnl.gov>
189 * FC11 and SLES11 support: This includes all compatibility changes
190 to support 2.6.29 based kernels and the required build system
192 * module/spl/spl-module.c: Register a basic compat ioctl handler
193 for 32-bit user vs 64-bit kernel compatibility. This is the default
194 build environment for all 64-bit SLES systems.
195 * config/spl-build.m4: Check arch/default path when detecting kernel
196 objects under SLES. We still preferentially use arch/arch if
197 available but if that fails it is acceptable to use default.
198 * module/spl/spl-vnode.: Use HAVE_PATH_IN_NAMEIDATA compat macros
199 for maximum kernel compatibility.
200 * config/spl-build.m4: Remove LINUXINCLUDE from autoconf wrapper.
201 This breaks the 2.6.28+ kernels build system, all kernel build systems
202 at least post 2.6.16 will set this properly so we should not.
203 * include/sys/vmsystm.h, module/spl/spl-kmem.c: Perferentially use the
204 global_page_state() API when your kernel supports the required enums.
205 * include/sys/debug.h: Add ASSERTV macro to simplify removing
206 variables (the V in ASSERTV) which are only used in ASSERT().
207 * include/sys/debug.h: Disable stack overflow checking by default
208 when build with --enable-debug, modern kernels now provide this.
209 * patches/fc11-spl-export-symbols.patch: Recommended missing symbols
210 patch for FC11. This is not required for correct functionality but
211 it is recommended for individuals who are already patching the kernel.
213 * Additional Solaris API emulation:
214 * include/sys/taskq.h: Add basic taskq support for the flag
215 TASKQ_THREADS_CPU_PCT which is used to scale the number of threads
216 based on the number of online CPUs.
217 * include/sys/file.hi, module/spl/spl-generic.c: Add support for
218 fake ioctls which originate from the kernel instead of user space.
219 * include/sys/acl.h: Add ACE_ALL_PERMS ACL definition.
220 * include/sys/cred.h, module/splat/splat-cred.c: Add basic credential
221 support and splat regression tests.
224 * include/sys/isa_defs.h: Add more endianess paranoia.
225 * module/spl/spl-time.c: Integer overflow after ~164 days.
226 * include/sys/debug.h: NULL dereference by tcd_for_each().
227 * module/splat/splat-kmem.c: Allow kmem or vmem based slabs for
228 slab_lock and slab_overcommit tests. This may still be an issue on
229 32-bit systems due to the small virtual address space.
230 * module/spl/spl-module.c: Positive Solaris ioctl return codes are
231 need to be negated for use by libc to ensure errno is set correctly.
233 2009-07-02 Brian Behlendorf <behlendorf1@llnl.gov>
237 * : Generic distro friendly build system / packaging improvements
238 for rpm based distros including CHAOS, RHEL, Fedora, and SLES.
240 spl-<version>.src.rpm
241 - Fully rebuildable source rpm for utils.
242 spl-modules-<version>.src.rpm
243 - Fully rebuildable source rpm for kernel modules.
245 spl-<version>.<arch>.rpm
246 - Binary rpm for utils. The utils in this package are compatible
247 with all spl-module rpms of the same version.
249 spl-modules-<verion>-<kernel>.arch.rpm
250 - Binary rpm containing the kernel modules for a specific kernel build.
251 The package name contains the kernel version and you should have one
252 of these packages installed to match every kernel on your system.
253 spl-modules-devel-<verion>-<kernel>.arch.rpm
254 - Binary rpm containing development header and module symbols needed
255 for building additional kernel modules which are dependent on the
258 * : Added SLES10 support. This includes all compatibility
259 changes to support 2.6.16 based kernels and the required
260 build system improvements.
262 * : Build System changes for SLES10:
263 - Exclude -obj when detecting installed kernel source.
264 - Detect -obj directory for out of tree kernel builds.
265 - Allow kernel build system to set CC to ensure -m64 is set properly.
266 This is an issue on 64-bit SLES systems which by default always
267 build 32-bit binaries (unlike RHEL/Fedora which default to 64-bit)
269 * : Configure Checks added for SLES10:
270 - div64_64() renamed to div64_u64() as of 2.6.26.
271 - global_page_state() fuction was introduced in 2.6.18 kernels.
272 The earlier 2.6.16 based SLES10 must not try and use it,
273 thankfully get_zone_counts() is still available.
274 - monotonic_clock() is unavailable __gethrtime() must perform the
275 HZ division as an 'unsigned long long' because the SPL only
276 implements __udivdi3(), and not __divdi3() for 'long long'
277 division on 32-bit arches.
278 - mutex_lock_nested() was introduced as part of the mutex
279 validator in 2.6.18, when it is unavailable it is safe to
280 fallback to using a plain mutex_lock().
281 - SLES specific API change to vfs_unlink() and vfs_rename() which
282 added a 'struct vfsmount *' argument. This was for something
283 called the linux-security-module, but it appears that it was
284 never adopted upstream.
285 - spl_device_create() correctly mapped to class_device_create()
286 for 2.6.13 to 2.6.17 based kernels, this is the preferred API.
287 - Prior to 2.6.17 there were no *_pgdat helper functions in
288 mm/mmzone.c. Instead for_each_zone() operated directly on
289 pgdat_list which may or may not have been exported depending on
290 how your kernel was compiled. A configure check was added to
291 determine if you have the helpers or not, and if the needed
292 symbols are exported. If they are not exported then they are
293 dynamically aquired at runtime by kallsyms_lookup_name().
295 * : Packaging changes for SLES10
296 - Properly honor --prefix in build system and rpm spec file.
297 - Add '--define require_kdir' to spec file to support building
298 rpms against kernel sources installed in non-default locations.
299 - Add '--define require_kobj' to spec file to support building
300 rpms against kernel object installed in non-default locations.
301 - Stop suppressing errors in autogen.sh script.
302 - Improved logic to detect missing kernel objects when they are
303 not located with the source. This is the common case for SLES
304 as well as in-tree chaos kernel builds and is done to simply
305 support for multiple arches.
306 - Moved spl-devel build products to /usr/src/spl-<version>, a
307 spl symlink is created to reference the last installed version.
308 - Allow checking for exported symbols in both Module.symvers
309 and Module.symvers. My stock SLES kernel ships an objects
310 directory with Module.symvers, yet produces a Module.symvers
311 in the local build directory.
313 * : Added powerpc64 support.
314 - Enable builds for powerpc64 ISA type.
315 - Add DIV_ROUND_UP and roundup macros if unavailable.
316 - Cast 64-bit values for %lld format string to (long long) to
317 quiet compile warning.
319 * module/splat/splat-ctl.c: Proper ioctl() 32/64-bit binary
320 compatibility. We need to ensure the ioctl data itself is always
321 packed the same for 32/64-bit binaries. Additionally, the correct
322 thing to do is encode this size in bytes as part of the command
325 * modules/spl/spl-kmem.c: Fixed a long standing bug in the debug
326 tracing. The tcd_for_each() macro expected a NULL to terminate
327 the trace_data[i] array but this was only ever true due to luck.
328 All trace_data[] iterators are now properly capped by TCD_TYPE_MAX.
330 * modules/spl/spl-kmem.c: To simplify debugging all symbols aquired
331 dynamically using spl_kallsyms_lookup_name() are initially poisoned
334 2009-03-20 Brian Behlendorf <behlendorf1@llnl.gov>
338 * configure.ac, *Makefile.am: Build system update. This includes
339 resolving various build issues and adding support for the remaining
340 common build targets. Available targets now include:
342 - make all # Build everything
343 - make install # Install everything
344 - make clean # Clean up build products
345 - make distclean # Clean up everything
346 - make dist # Create package tarball
347 - make srpm # Create package source RPM
348 - make rpm # Create package binary RPMs
349 - make tags # Create ctags and etags for everything
351 Extra care was taken to ensure that the source RPMs are fully
352 rebuildable against Fedora/RHEL/Chaos kernels. To build binary
353 RPMs from the source RPM for your system simply run:
355 rpmbuild --rebuild spl-x.y.z-1.src.rpm
357 This will produce two binary RPMs with correct 'requires'
358 dependencies for your kernel. One will contain all zpl modules
359 and support utilities, the other is a devel package for compiling
360 additional kernel modules which are dependent on the spl.
362 spl-x.y.z-1_<kernel version>.x86_64.rpm
363 spl-devel-x.y.2-1_<kernel version>.x86_64.rpm
365 * : FC10 (linux-2.6.27.19) and i686 compatibility update. The
366 list of support platforms has been extended to include FC10
367 systems and x86 architectures. It should be noted that kernels
368 older the 2.6.27.19 should work but have not have not been tested.
370 * configure.ac: Fix build issue preventing spl_config.h from being
371 cleanly included by dependent packages.
373 * module/spl/spl-taskq.c: Fix taskq_wait() not waiting bug.
375 * module/spl/spl-xdr.c: Add XDR implementation provided by Ricardo
378 * module/spl/spl-kmem.c: Linux VM integration cleanup.
380 * module/spl/spl-kmem.c: Slab cache improvements and fixes.
382 * modules/splat/*: Include additional SPLAT regression tests.
384 * : Various bug fixes are more clearly detailed in the git
385 commit logs. For a detailed summary of changes post version
386 0.4.2 check the git commit logs.
390 2009-02-05 Brian Behlendorf <behlendorf1@llnl.gov>
394 * module/spl/spl-kmem.c include/sys/kmem.h: Slab cache improvements:
395 - Implement kmem cache alignment.
396 - Implement slab ageing.
397 - Optimized slab packing algorithm.
398 - Fixed deadlock due to calling call kv_free() under the skc_lock.
399 - Added additional SPLAT test cases
400 - Performance optimizations
402 * module/spl/spl-kmem.c include/sys/kmem.h: Linux VM integration.
403 The Solaris global VM symbols minfree, desfree, lotsfree, needfree,
404 swapfs_minfree, swapfs_reserve, availrmem, freemem, and physmem are
405 now available and loosely integrating with the Linux VM. Some
406 tuning will undoubtably be needed and these tunables are available
407 in /proc/sys/kernel/spl/vm/* for this very reason.
409 * config/spl-build.m4: New configure checks needed when building
410 against 2.6.27+ kernels. More work is needed here.
412 * : Minor cleanup see the 'git log' for full details.
414 2009-01-21 Brian Behlendorf <behlendorf1@llnl.gov>
418 * : Implement ksid_*, ddi_strto*, and system taskq functionality.
419 In addition, several other small Solaris compatibility changes
420 were made, see the 'git log' for full details.
422 2008-11-26 Brian Behlendorf <behlendorf1@llnl.gov>
424 * : Tag spl-0.4.0 (Development now done with Git)
426 * : Imported SPL SVN repo in to Git Repo for core development.
428 2008-11-26 Brian Behlendorf <behlendorf1@llnl.gov>
432 * : Include META file support.
434 2008-11-05 Jim Garlick <garlick@llnl.gov>
436 * : Add autogen.sh products.
438 * configure.ac : Use AC_CONFIG_AUX_DIR to put autograph products
441 * autogen.sh : Use --copy to avoid symlinks, remove error
442 redirection, run aclocal before libtoolize.
444 2008-11-13 Brian Behlendorf <behlendorf1@llnl.gov>
446 * include/sys/sunddi.h, modules/spl/spl-module.c : Removed default
447 udev support from sunddi implementation because it uses GPL-only
448 symbols. This support is optionally available for SPL consumers
449 if they define HAVE_GPL_ONLY_SYMBOLS and license their module as
450 GPL using the MODULE_LICENSE("GPL") macro.
452 2008-11-05 Brian Behlendorf <behlendorf1@llnl.gov>
458 * : Patches from Ricardo M. Correia <Ricardo.M.Correia@sun.com>
459 applied with minor revisions:
461 spl-00-rm-gpl-symbol-notifier_chain.patch
462 spl-01-rm-gpl-symbol-set_cpus_allowed.patch
463 spl-02-rm-gpl-symbols-device.patch
464 spl-03-rm-gpl-symbol-ktime_get_ts.patch
465 spl-04-fix-taskq-spinlock-lockup.patch
467 spl-06-atomic64.patch
468 spl-07-kmem-cleanup.patch
469 spl-08-km-sleep-nofail.patch
470 spl-09-fix-kmem-track-oops.patch
471 spl-10-fix-assert-verify-ndebug.patch
473 2008-06-30 Brian Behlendorf <behlendorf1@llnl.gov>
477 * : modules/sys/kmem-slab.c : Refined SPL slab to include
478 per-cpu caches, removed internal hash, other general
479 performance improvements. Much work remain but it's pretty
480 good for an initial implementation.
482 2008-06-13 Brian Behlendorf <behlendorf1@llnl.gov>
484 * : modules/sys/kmem-slab.c : Re-implemented the slab to no
485 longer be based on the linux slab but to be it's own complete
486 implementation. The new slab behaves much more like the
487 Solaris slab than the Linux slab.
489 2008-06-04 Brian Behlendorf <behlendorf1@llnl.gov>
493 * : Extensive improvements to the build system to detect kernel
494 API changes so we can flexibly build with a wider range of kernel
495 versions. The code has now been testing with the 2.6.18-32chaos
496 and 2.6.25.3-18.fc9 kernels, however we should also be compatible
497 with other kernels in the range of 2.6.18-2.6.25.
499 2008-05-25 Brian Behlendorf <behlendorf1@llnl.gov>
501 * configure.ac, autoconf/* : Initial pass at resolving
502 API changes introduced by kernels newer than 2.6.18.
504 2008-05-21 Brian Behlendorf <behlendorf1@llnl.gov>
508 * : License headers including URCL added for release.
510 2008-05-21 Brian Behlendorf <behlendorf1@llnl.gov>
514 * configure.ac: Improved autotools support.
516 2008-04-26 Brian Behlendorf <behlendorf1@llnl.gov>
518 * include/sys/mutex.h : Implemented a close approximation
519 of adaptive mutexes. These changes however required me to
520 export a new symbol from the kernel proper 'task_curr()'
521 which means we are now dependant on a patched kernel.
523 2008-04-24 Brian Behlendorf <behlendorf1@llnl.gov>
527 * modules/spl/spl-proc.c : Add /proc/sys/spl/version.
529 2008-04-24 Herb Wartens <wartens2@llnl.gov>
531 * include/sys/kmem.h : Make sure that when calling __vmem_alloc
532 that we do not have __GFP_ZERO set. Once the memory is allocated
533 then zero out the memory if __GFP_ZERO is passed to
536 2008-04-16 Herb Wartens <wartens2@llnl.gov>
538 * modules/spl/spl-kmem.c : Make sure to disable interrupts
539 when necessary to avoid deadlocks. We were seeing the deadlock
540 when calling kmem_cache_generic_constructor() and then an interrupt
541 forced us to end up calling kmem_cache_generic_destructor()
542 which caused our deadlock.
544 2008-02-26 Brian Behlendorf <behlendorf1@llnl.gov>
546 : Initial commit of the solaris porting layer (spl). Included
547 in addition to the source is an initial autoconf / configure