mirror_zfs/module/os/linux/spl
Matthew Macy 8056a75672
Disambiguate condvar API contract
On Illumos callers of cv_timedwait and cv_timedwait_hires
can't distinguish between whether or not the cv was signaled
or the call timed out. Illumos handles this (for some definition
of handles) by calling cv_signal in the return path if we were
signaled but the return value indicates instead that we timed
out. This would make sense if it were possible to query the the
cv for its net signal disposition. However, this isn't possible
and, in spite of the fact that there are places in the code that
clearly take a different and incompatible path if a timeout value
is indicated, this distinction appears to be rather subtle to most
developers. This problem is further compounded by the fact that on
Linux, calling cv_signal in the return path wouldn't even do the
right thing unless there are other waiters.

Since it is possible for the caller to independently determine how
much time is remaining but it is not possible to query if the cv
was in fact signaled, prioritizing signalling over timeout seems
like a cleaner solution. In addition, judging from usage patterns
within the code itself, it is also less error prone.

Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #10471
2020-06-18 10:17:50 -07:00
..
Makefile.in Add zfs_file_* interface, remove vnodes 2019-11-21 09:32:57 -08:00
README.md Change http://zfsonlinux.org links to https://zfsonlinux.org 2020-01-13 16:43:59 -08:00
spl-atomic.c OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00
spl-condvar.c Disambiguate condvar API contract 2020-06-18 10:17:50 -07:00
spl-cred.c Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
spl-err.c OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00
spl-generic.c Replace static per-cpu with dynamic per-cpu data 2020-02-06 09:26:13 -08:00
spl-kmem-cache.c Linux 5.8 compat: __vmalloc() 2020-06-08 16:32:02 -07:00
spl-kmem.c Move GFP flags kernel compatibility code 2020-06-08 16:33:46 -07:00
spl-kstat.c Linux 5.6 compat: struct proc_ops 2020-02-07 11:03:53 -08:00
spl-proc.c Linux 5.6 compat: struct proc_ops 2020-02-07 11:03:53 -08:00
spl-procfs-list.c Linux 5.6 compat: struct proc_ops 2020-02-07 11:03:53 -08:00
spl-taskq.c Improve performance of zio_taskq_member 2020-03-03 10:29:38 -08:00
spl-thread.c Linux 4.14, 4.19, 5.0+ compat: SIMD save/restore 2019-10-24 10:17:33 -07:00
spl-trace.c Add tracepoints for taskq entry lifetime events 2019-11-01 13:14:54 -07:00
spl-tsd.c cppcheck: (error) Uninitialized variable 2019-12-18 17:24:29 -08:00
spl-vmem.c cppcheck: (error) Uninitialized variable 2019-12-18 17:24:29 -08:00
spl-xdr.c OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00
spl-zlib.c Add kmem_cache flag for forcing kvmalloc 2019-11-13 10:05:23 -08:00
THIRDPARTYLICENSE.gplv2 OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00
THIRDPARTYLICENSE.gplv2.descrip OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00

The Solaris Porting Layer, SPL, is a Linux kernel module which provides a compatibility layer used by the ZFS on Linux project.

Installation

The latest version of the SPL is maintained as part of this repository. Only when building ZFS version 0.7.x or earlier must an external SPL release be used. These releases can be found at:

Release

The SPL is released under a GPLv2 license.
For more details see the NOTICE and THIRDPARTYLICENSE files; UCRL-CODE-235197