diff options
| author | Joshua M. Clulow <josh@sysmgr.org> | 2021-06-25 21:45:53 -0700 |
|---|---|---|
| committer | Joshua M. Clulow <josh@sysmgr.org> | 2021-06-25 21:45:53 -0700 |
| commit | fd440315ab0e76440256b0b1ca08098f64bc7832 (patch) | |
| tree | d0ce89f6a4c5f0b1ef610d4380d43696187786df | |
| parent | 6f43873c1c66055abf8e3c15d5fec716e84f69ba (diff) | |
| download | illumos-joyent-fd440315ab0e76440256b0b1ca08098f64bc7832.tar.gz | |
13908 disable kernel FPU by default until it is stable
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Patrick Mooney <pmooney@pfmooney.com>
Approved by: Dan McDonald <danmcd@joyent.com>
| -rw-r--r-- | usr/src/uts/common/fs/zfs/spa_misc.c | 9 | ||||
| -rw-r--r-- | usr/src/uts/common/fs/zfs/sys/simd.h | 11 |
2 files changed, 18 insertions, 2 deletions
diff --git a/usr/src/uts/common/fs/zfs/spa_misc.c b/usr/src/uts/common/fs/zfs/spa_misc.c index c9ceeb6873..dd44829a43 100644 --- a/usr/src/uts/common/fs/zfs/spa_misc.c +++ b/usr/src/uts/common/fs/zfs/spa_misc.c @@ -316,6 +316,15 @@ uint64_t zfs_deadman_checktime_ms = 5000ULL; */ int zfs_deadman_enabled = -1; +#if defined(__amd64__) || defined(__i386__) +/* + * Should we allow the use of mechanisms that depend on saving and restoring + * the FPU state? This is currently off by default due to stability issues in + * the kernel FPU routines; e.g., see bug 13717. + */ +int zfs_fpu_enabled = 0; +#endif + /* * The worst case is single-sector max-parity RAID-Z blocks, in which * case the space requirement is exactly (VDEV_RAIDZ_MAXPARITY + 1) diff --git a/usr/src/uts/common/fs/zfs/sys/simd.h b/usr/src/uts/common/fs/zfs/sys/simd.h index c504e00326..1ee17c902d 100644 --- a/usr/src/uts/common/fs/zfs/sys/simd.h +++ b/usr/src/uts/common/fs/zfs/sys/simd.h @@ -18,8 +18,6 @@ #if defined(__amd64__) || defined(__i386__) - -#define kfpu_allowed() 1 #define kfpu_initialize(tsk) do {} while (0) #define kfpu_init() (0) #define kfpu_fini() do {} while (0) @@ -32,6 +30,14 @@ #include <sys/disp.h> #include <sys/cpuvar.h> +static inline int +kfpu_allowed(void) +{ + extern int zfs_fpu_enabled; + + return (zfs_fpu_enabled != 0 ? 1 : 0); +} + static inline void kfpu_begin(void) { @@ -99,6 +105,7 @@ zfs_avx2_available(void) #include <sys/auxv.h> #include <sys/auxv_386.h> +#define kfpu_allowed() 1 #define kfpu_begin() do {} while (0) #define kfpu_end() do {} while (0) |
