From b28cb12edb62ff49ceda216250855ecf3c0e2fe4 Mon Sep 17 00:00:00 2001 From: allanjude Date: Sat, 16 Jan 2016 18:39:54 +0000 Subject: MFC: r287337 Apply the noline attribute to vdev_queue_max_async_writes This makes it possible to analyze the performance of the new ZFS write throttle with dtrace PR: 200316 Sponsored by: FreeBSD Mastery: Advanced ZFS --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/cddl') diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c index 49d87e6..9f83abb 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c @@ -520,7 +520,7 @@ vdev_queue_class_min_active(zio_priority_t p) } } -static int +static __noinline int vdev_queue_max_async_writes(spa_t *spa) { int writes; -- cgit v1.1 From 0458c393d2b4a489b4776083282db929d14e971f Mon Sep 17 00:00:00 2001 From: dim Date: Tue, 19 Jan 2016 18:35:22 +0000 Subject: MFC r294102: MFV r294101: 6527 Possible access beyond end of string in zpool comment Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Dan McDonald Approved by: Gordon Ross illumos/illumos-gate@2bd7a8d078223b122d65fea49bb8641f858b1409 This fixes erroneous double increments of the 'check' variable in a loop in spa_prop_validate(). I ran into this in the clang380-import branch, where clang 3.8.0 warns about it. (It is already fixed there.) --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c | 1 - 1 file changed, 1 deletion(-) (limited to 'sys/cddl') diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c index fd3e537..ee0b52f 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c @@ -607,7 +607,6 @@ spa_prop_validate(spa_t *spa, nvlist_t *props) error = SET_ERROR(EINVAL); break; } - check++; } if (strlen(strval) > ZPROP_MAX_COMMENT) error = E2BIG; -- cgit v1.1 From 77733541d454c3b987e985b85df345fc8c7f205d Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 20 Jan 2016 01:09:53 +0000 Subject: MFC 289769,289822,290143,290144: Rename remaining linux32 symbols from linux_* to linux32_*. 289769: Rename remaining linux32 symbols such as linux_sysent[] and linux_syscallnames[] from linux_* to linux32_* to avoid conflicts with linux64.ko. While here, add support for linux64 binaries to systrace. - Update NOPROTO entries in amd64/linux/syscalls.master to match the main table to fix systrace build. - Add a special case for union l_semun arguments to the systrace generation. - The systrace_linux32 module now only builds the systrace_linux32.ko. module on amd64. - Add a new systrace_linux module that builds on both i386 and amd64. For i386 it builds the existing systrace_linux.ko. For amd64 it builds a systrace_linux.ko for 64-bit binaries. 289822: Fix build for the KTR-enabled kernels. 290143: Fix build with DEBUG defined. 290144: Update for LINUX32 rename. The assembler didn't complain about undefined symbols but just used 0 after the rename. --- sys/cddl/dev/systrace/systrace.c | 44 +++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 10 deletions(-) (limited to 'sys/cddl') diff --git a/sys/cddl/dev/systrace/systrace.c b/sys/cddl/dev/systrace/systrace.c index 921393c..1796091 100644 --- a/sys/cddl/dev/systrace/systrace.c +++ b/sys/cddl/dev/systrace/systrace.c @@ -60,24 +60,37 @@ #ifdef LINUX_SYSTRACE #if defined(__amd64__) -#include -#include -#include -#include -#define MODNAME "linux32" +#include +#include +#include +#include #elif defined(__i386__) #include #include #include #include -#define MODNAME "linux" #else #error Only i386 and amd64 are supported. #endif +#define MODNAME "linux" extern struct sysent linux_sysent[]; #define MAXSYSCALL LINUX_SYS_MAXSYSCALL #define SYSCALLNAMES linux_syscallnames #define SYSENT linux_sysent +#elif defined(LINUX32_SYSTRACE) +#if defined(__amd64__) +#include +#include +#include +#include +#else +#error Only amd64 is supported. +#endif +#define MODNAME "linux32" +extern struct sysent linux32_sysent[]; +#define MAXSYSCALL LINUX32_SYS_MAXSYSCALL +#define SYSCALLNAMES linux32_syscallnames +#define SYSENT linux32_sysent #elif defined(FREEBSD32_SYSTRACE) /* * The syscall arguments are processed into a DTrace argument array @@ -103,6 +116,7 @@ extern const char *freebsd32_syscallnames[]; #define MAXSYSCALL SYS_MAXSYSCALL #define SYSCALLNAMES syscallnames #define SYSENT sysent +#define NATIVE_ABI #endif #define PROVNAME "syscall" @@ -132,7 +146,7 @@ static void systrace_load(void *); static struct cdevsw systrace_cdevsw = { .d_version = D_VERSION, .d_open = systrace_open, -#ifdef LINUX_SYSTRACE +#ifndef NATIVE_ABI .d_name = "systrace_" MODNAME, #else .d_name = "systrace", @@ -171,7 +185,7 @@ static dtrace_provider_id_t systrace_id; typedef void (*systrace_dtrace_probe_t)(dtrace_id_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); -#if !defined(LINUX_SYSTRACE) +#ifdef NATIVE_ABI /* * Probe callback function. * @@ -314,7 +328,7 @@ systrace_load(void *dummy) NULL, &systrace_pops, NULL, &systrace_id) != 0) return; -#if !defined(LINUX_SYSTRACE) +#ifdef NATIVE_ABI systrace_probe_func = systrace_probe; #endif } @@ -328,7 +342,7 @@ systrace_unload() if ((error = dtrace_unregister(systrace_id)) != 0) return (error); -#if !defined(LINUX_SYSTRACE) +#ifdef NATIVE_ABI systrace_probe_func = NULL; #endif @@ -370,6 +384,16 @@ SYSINIT(systrace_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, systrace_load, NULL SYSUNINIT(systrace_unload, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, systrace_unload, NULL); #ifdef LINUX_SYSTRACE +DEV_MODULE(systrace_linux, systrace_modevent, NULL); +MODULE_VERSION(systrace_linux, 1); +#ifdef __amd64__ +MODULE_DEPEND(systrace_linux, linux64, 1, 1, 1); +#else +MODULE_DEPEND(systrace_linux, linux, 1, 1, 1); +#endif +MODULE_DEPEND(systrace_linux, dtrace, 1, 1, 1); +MODULE_DEPEND(systrace_linux, opensolaris, 1, 1, 1); +#elif defined(LINUX32_SYSTRACE) DEV_MODULE(systrace_linux32, systrace_modevent, NULL); MODULE_VERSION(systrace_linux32, 1); MODULE_DEPEND(systrace_linux32, linux, 1, 1, 1); -- cgit v1.1