Merge branch 'linux-zpios' into refs/top-bases/linux-zfs-branch
This commit is contained in:
commit
50832652c2
|
@ -46,7 +46,7 @@
|
||||||
- Minor build system improvements
|
- Minor build system improvements
|
||||||
- Minor script improvements
|
- Minor script improvements
|
||||||
- Create a full copy and not a link tree with quilt
|
- Create a full copy and not a link tree with quilt
|
||||||
- KPIOS_MAJOR changed from 231 to 232
|
- ZPIOS_MAJOR changed from 231 to 232
|
||||||
- BIO_RW_BARRIER flag removed from IO request
|
- BIO_RW_BARRIER flag removed from IO request
|
||||||
|
|
||||||
2008-06-30 Brian Behlendorf <behlendorf1@llnl.gov>
|
2008-06-30 Brian Behlendorf <behlendorf1@llnl.gov>
|
||||||
|
|
|
@ -89,9 +89,9 @@ typedef struct cmd_args {
|
||||||
uint64_t chunknoise; /* Chunk noise */
|
uint64_t chunknoise; /* Chunk noise */
|
||||||
uint64_t thread_delay; /* Thread delay */
|
uint64_t thread_delay; /* Thread delay */
|
||||||
|
|
||||||
char pre[KPIOS_PATH_SIZE]; /* Pre-exec hook */
|
char pre[ZPIOS_PATH_SIZE]; /* Pre-exec hook */
|
||||||
char post[KPIOS_PATH_SIZE]; /* Post-exec hook */
|
char post[ZPIOS_PATH_SIZE]; /* Post-exec hook */
|
||||||
char log[KPIOS_PATH_SIZE]; /* Requested log dir */
|
char log[ZPIOS_PATH_SIZE]; /* Requested log dir */
|
||||||
|
|
||||||
/* Control */
|
/* Control */
|
||||||
int current_id;
|
int current_id;
|
||||||
|
@ -112,6 +112,6 @@ int set_noise(uint64_t *noise, char *optarg, char *arg);
|
||||||
int set_load_params(cmd_args_t *args, char *optarg);
|
int set_load_params(cmd_args_t *args, char *optarg);
|
||||||
int check_mutual_exclusive_command_lines(uint32_t flag, char *arg);
|
int check_mutual_exclusive_command_lines(uint32_t flag, char *arg);
|
||||||
void print_stats_header(void);
|
void print_stats_header(void);
|
||||||
void print_stats(cmd_args_t *args, kpios_cmd_t *cmd);
|
void print_stats(cmd_args_t *args, zpios_cmd_t *cmd);
|
||||||
|
|
||||||
#endif /* _ZPIOS_H */
|
#endif /* _ZPIOS_H */
|
||||||
|
|
|
@ -259,13 +259,13 @@ args_init(int argc, char **argv)
|
||||||
args->flags |= DMU_REMOVE;
|
args->flags |= DMU_REMOVE;
|
||||||
break;
|
break;
|
||||||
case 'P': /* --prerun */
|
case 'P': /* --prerun */
|
||||||
strncpy(args->pre, optarg, KPIOS_PATH_SIZE - 1);
|
strncpy(args->pre, optarg, ZPIOS_PATH_SIZE - 1);
|
||||||
break;
|
break;
|
||||||
case 'R': /* --postrun */
|
case 'R': /* --postrun */
|
||||||
strncpy(args->post, optarg, KPIOS_PATH_SIZE - 1);
|
strncpy(args->post, optarg, ZPIOS_PATH_SIZE - 1);
|
||||||
break;
|
break;
|
||||||
case 'G': /* --log */
|
case 'G': /* --log */
|
||||||
strncpy(args->log, optarg, KPIOS_PATH_SIZE - 1);
|
strncpy(args->log, optarg, ZPIOS_PATH_SIZE - 1);
|
||||||
break;
|
break;
|
||||||
case 'I': /* --regionnoise */
|
case 'I': /* --regionnoise */
|
||||||
rc = set_noise(&args->regionnoise, optarg, "regionnoise");
|
rc = set_noise(&args->regionnoise, optarg, "regionnoise");
|
||||||
|
@ -329,18 +329,18 @@ args_init(int argc, char **argv)
|
||||||
static int
|
static int
|
||||||
dev_clear(void)
|
dev_clear(void)
|
||||||
{
|
{
|
||||||
kpios_cfg_t cfg;
|
zpios_cfg_t cfg;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
memset(&cfg, 0, sizeof(cfg));
|
memset(&cfg, 0, sizeof(cfg));
|
||||||
cfg.cfg_magic = KPIOS_CFG_MAGIC;
|
cfg.cfg_magic = ZPIOS_CFG_MAGIC;
|
||||||
cfg.cfg_cmd = KPIOS_CFG_BUFFER_CLEAR;
|
cfg.cfg_cmd = ZPIOS_CFG_BUFFER_CLEAR;
|
||||||
cfg.cfg_arg1 = 0;
|
cfg.cfg_arg1 = 0;
|
||||||
|
|
||||||
rc = ioctl(zpiosctl_fd, KPIOS_CFG, &cfg);
|
rc = ioctl(zpiosctl_fd, ZPIOS_CFG, &cfg);
|
||||||
if (rc)
|
if (rc)
|
||||||
fprintf(stderr, "Ioctl() error %lu / %d: %d\n",
|
fprintf(stderr, "Ioctl() error %lu / %d: %d\n",
|
||||||
(unsigned long) KPIOS_CFG, cfg.cfg_cmd, errno);
|
(unsigned long) ZPIOS_CFG, cfg.cfg_cmd, errno);
|
||||||
|
|
||||||
lseek(zpiosctl_fd, 0, SEEK_SET);
|
lseek(zpiosctl_fd, 0, SEEK_SET);
|
||||||
|
|
||||||
|
@ -351,18 +351,18 @@ dev_clear(void)
|
||||||
static int
|
static int
|
||||||
dev_size(int size)
|
dev_size(int size)
|
||||||
{
|
{
|
||||||
kpios_cfg_t cfg;
|
zpios_cfg_t cfg;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
memset(&cfg, 0, sizeof(cfg));
|
memset(&cfg, 0, sizeof(cfg));
|
||||||
cfg.cfg_magic = KPIOS_CFG_MAGIC;
|
cfg.cfg_magic = ZPIOS_CFG_MAGIC;
|
||||||
cfg.cfg_cmd = KPIOS_CFG_BUFFER_SIZE;
|
cfg.cfg_cmd = ZPIOS_CFG_BUFFER_SIZE;
|
||||||
cfg.cfg_arg1 = size;
|
cfg.cfg_arg1 = size;
|
||||||
|
|
||||||
rc = ioctl(zpiosctl_fd, KPIOS_CFG, &cfg);
|
rc = ioctl(zpiosctl_fd, ZPIOS_CFG, &cfg);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
fprintf(stderr, "Ioctl() error %lu / %d: %d\n",
|
fprintf(stderr, "Ioctl() error %lu / %d: %d\n",
|
||||||
(unsigned long) KPIOS_CFG, cfg.cfg_cmd, errno);
|
(unsigned long) ZPIOS_CFG, cfg.cfg_cmd, errno);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -378,7 +378,7 @@ dev_fini(void)
|
||||||
if (zpiosctl_fd != -1) {
|
if (zpiosctl_fd != -1) {
|
||||||
if (close(zpiosctl_fd) == -1) {
|
if (close(zpiosctl_fd) == -1) {
|
||||||
fprintf(stderr, "Unable to close %s: %d\n",
|
fprintf(stderr, "Unable to close %s: %d\n",
|
||||||
KPIOS_DEV, errno);
|
ZPIOS_DEV, errno);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -388,10 +388,10 @@ dev_init(void)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
zpiosctl_fd = open(KPIOS_DEV, O_RDONLY);
|
zpiosctl_fd = open(ZPIOS_DEV, O_RDONLY);
|
||||||
if (zpiosctl_fd == -1) {
|
if (zpiosctl_fd == -1) {
|
||||||
fprintf(stderr, "Unable to open %s: %d\n"
|
fprintf(stderr, "Unable to open %s: %d\n"
|
||||||
"Is the zpios module loaded?\n", KPIOS_DEV, errno);
|
"Is the zpios module loaded?\n", ZPIOS_DEV, errno);
|
||||||
rc = errno;
|
rc = errno;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
@ -415,7 +415,7 @@ error:
|
||||||
if (zpiosctl_fd != -1) {
|
if (zpiosctl_fd != -1) {
|
||||||
if (close(zpiosctl_fd) == -1) {
|
if (close(zpiosctl_fd) == -1) {
|
||||||
fprintf(stderr, "Unable to close %s: %d\n",
|
fprintf(stderr, "Unable to close %s: %d\n",
|
||||||
KPIOS_DEV, errno);
|
ZPIOS_DEV, errno);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -468,22 +468,22 @@ static int
|
||||||
run_one(cmd_args_t *args, uint32_t id, uint32_t T, uint32_t N,
|
run_one(cmd_args_t *args, uint32_t id, uint32_t T, uint32_t N,
|
||||||
uint64_t C, uint64_t S, uint64_t O)
|
uint64_t C, uint64_t S, uint64_t O)
|
||||||
{
|
{
|
||||||
kpios_cmd_t *cmd;
|
zpios_cmd_t *cmd;
|
||||||
int rc, rc2, cmd_size;
|
int rc, rc2, cmd_size;
|
||||||
|
|
||||||
dev_clear();
|
dev_clear();
|
||||||
|
|
||||||
cmd_size = sizeof(kpios_cmd_t) + ((T + N + 1) * sizeof(kpios_stats_t));
|
cmd_size = sizeof(zpios_cmd_t) + ((T + N + 1) * sizeof(zpios_stats_t));
|
||||||
cmd = (kpios_cmd_t *)malloc(cmd_size);
|
cmd = (zpios_cmd_t *)malloc(cmd_size);
|
||||||
if (cmd == NULL)
|
if (cmd == NULL)
|
||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
|
|
||||||
memset(cmd, 0, cmd_size);
|
memset(cmd, 0, cmd_size);
|
||||||
cmd->cmd_magic = KPIOS_CMD_MAGIC;
|
cmd->cmd_magic = ZPIOS_CMD_MAGIC;
|
||||||
strncpy(cmd->cmd_pool, args->pool, KPIOS_NAME_SIZE - 1);
|
strncpy(cmd->cmd_pool, args->pool, ZPIOS_NAME_SIZE - 1);
|
||||||
strncpy(cmd->cmd_pre, args->pre, KPIOS_PATH_SIZE - 1);
|
strncpy(cmd->cmd_pre, args->pre, ZPIOS_PATH_SIZE - 1);
|
||||||
strncpy(cmd->cmd_post, args->post, KPIOS_PATH_SIZE - 1);
|
strncpy(cmd->cmd_post, args->post, ZPIOS_PATH_SIZE - 1);
|
||||||
strncpy(cmd->cmd_log, args->log, KPIOS_PATH_SIZE - 1);
|
strncpy(cmd->cmd_log, args->log, ZPIOS_PATH_SIZE - 1);
|
||||||
cmd->cmd_id = id;
|
cmd->cmd_id = id;
|
||||||
cmd->cmd_chunk_size = C;
|
cmd->cmd_chunk_size = C;
|
||||||
cmd->cmd_thread_count = T;
|
cmd->cmd_thread_count = T;
|
||||||
|
@ -494,9 +494,9 @@ run_one(cmd_args_t *args, uint32_t id, uint32_t T, uint32_t N,
|
||||||
cmd->cmd_chunk_noise = args->chunknoise;
|
cmd->cmd_chunk_noise = args->chunknoise;
|
||||||
cmd->cmd_thread_delay = args->thread_delay;
|
cmd->cmd_thread_delay = args->thread_delay;
|
||||||
cmd->cmd_flags = args->flags;
|
cmd->cmd_flags = args->flags;
|
||||||
cmd->cmd_data_size = (T + N + 1) * sizeof(kpios_stats_t);
|
cmd->cmd_data_size = (T + N + 1) * sizeof(zpios_stats_t);
|
||||||
|
|
||||||
rc = ioctl(zpiosctl_fd, KPIOS_CMD, cmd);
|
rc = ioctl(zpiosctl_fd, ZPIOS_CMD, cmd);
|
||||||
if (rc)
|
if (rc)
|
||||||
args->rc = errno;
|
args->rc = errno;
|
||||||
|
|
||||||
|
|
|
@ -323,9 +323,9 @@ print_stats_header(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_stats_human_readable(cmd_args_t *args, kpios_cmd_t *cmd)
|
print_stats_human_readable(cmd_args_t *args, zpios_cmd_t *cmd)
|
||||||
{
|
{
|
||||||
kpios_stats_t *summary_stats;
|
zpios_stats_t *summary_stats;
|
||||||
double t_time, wr_time, rd_time, cr_time, rm_time;
|
double t_time, wr_time, rd_time, cr_time, rm_time;
|
||||||
char str[16];
|
char str[16];
|
||||||
|
|
||||||
|
@ -350,7 +350,7 @@ print_stats_human_readable(cmd_args_t *args, kpios_cmd_t *cmd)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
summary_stats = (kpios_stats_t *)cmd->cmd_data_str;
|
summary_stats = (zpios_stats_t *)cmd->cmd_data_str;
|
||||||
t_time = timespec_to_double(summary_stats->total_time.delta);
|
t_time = timespec_to_double(summary_stats->total_time.delta);
|
||||||
wr_time = timespec_to_double(summary_stats->wr_time.delta);
|
wr_time = timespec_to_double(summary_stats->wr_time.delta);
|
||||||
rd_time = timespec_to_double(summary_stats->rd_time.delta);
|
rd_time = timespec_to_double(summary_stats->rd_time.delta);
|
||||||
|
@ -374,9 +374,9 @@ print_stats_human_readable(cmd_args_t *args, kpios_cmd_t *cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_stats_table(cmd_args_t *args, kpios_cmd_t *cmd)
|
print_stats_table(cmd_args_t *args, zpios_cmd_t *cmd)
|
||||||
{
|
{
|
||||||
kpios_stats_t *summary_stats;
|
zpios_stats_t *summary_stats;
|
||||||
double wr_time, rd_time;
|
double wr_time, rd_time;
|
||||||
|
|
||||||
if (args->rc)
|
if (args->rc)
|
||||||
|
@ -400,7 +400,7 @@ print_stats_table(cmd_args_t *args, kpios_cmd_t *cmd)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
summary_stats = (kpios_stats_t *)cmd->cmd_data_str;
|
summary_stats = (zpios_stats_t *)cmd->cmd_data_str;
|
||||||
wr_time = timespec_to_double(summary_stats->wr_time.delta);
|
wr_time = timespec_to_double(summary_stats->wr_time.delta);
|
||||||
rd_time = timespec_to_double(summary_stats->rd_time.delta);
|
rd_time = timespec_to_double(summary_stats->rd_time.delta);
|
||||||
|
|
||||||
|
@ -431,7 +431,7 @@ print_stats_table(cmd_args_t *args, kpios_cmd_t *cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
print_stats(cmd_args_t *args, kpios_cmd_t *cmd)
|
print_stats(cmd_args_t *args, zpios_cmd_t *cmd)
|
||||||
{
|
{
|
||||||
if (args->human_readable)
|
if (args->human_readable)
|
||||||
print_stats_human_readable(args, cmd);
|
print_stats_human_readable(args, cmd);
|
||||||
|
|
|
@ -30,19 +30,19 @@
|
||||||
* CDDL HEADER END
|
* CDDL HEADER END
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _KPIOS_CTL_H
|
#ifndef _ZPIOS_CTL_H
|
||||||
#define _KPIOS_CTL_H
|
#define _ZPIOS_CTL_H
|
||||||
|
|
||||||
/* Contains shared definitions which both the userspace
|
/* Contains shared definitions which both the userspace
|
||||||
* and kernelspace portions of kpios must agree on.
|
* and kernelspace portions of zpios must agree on.
|
||||||
*/
|
*/
|
||||||
#ifndef _KERNEL
|
#ifndef _KERNEL
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define KPIOS_MAJOR 232 /* XXX - Arbitrary */
|
#define ZPIOS_MAJOR 232 /* XXX - Arbitrary */
|
||||||
#define KPIOS_MINORS 1
|
#define ZPIOS_MINORS 1
|
||||||
#define KPIOS_DEV "/dev/zpios"
|
#define ZPIOS_DEV "/dev/zpios"
|
||||||
|
|
||||||
#define DMU_IO 0x01
|
#define DMU_IO 0x01
|
||||||
|
|
||||||
|
@ -54,45 +54,45 @@
|
||||||
#define DMU_WRITE_ZC 0x20 /* Incompatible with DMU_VERIFY */
|
#define DMU_WRITE_ZC 0x20 /* Incompatible with DMU_VERIFY */
|
||||||
#define DMU_READ_ZC 0x40 /* Incompatible with DMU_VERIFY */
|
#define DMU_READ_ZC 0x40 /* Incompatible with DMU_VERIFY */
|
||||||
|
|
||||||
#define KPIOS_NAME_SIZE 16
|
#define ZPIOS_NAME_SIZE 16
|
||||||
#define KPIOS_PATH_SIZE 128
|
#define ZPIOS_PATH_SIZE 128
|
||||||
|
|
||||||
#define PHASE_PRE "pre"
|
#define PHASE_PRE "pre"
|
||||||
#define PHASE_POST "post"
|
#define PHASE_POST "post"
|
||||||
#define PHASE_WRITE "write"
|
#define PHASE_WRITE "write"
|
||||||
#define PHASE_READ "read"
|
#define PHASE_READ "read"
|
||||||
|
|
||||||
#define KPIOS_CFG_MAGIC 0x87237190U
|
#define ZPIOS_CFG_MAGIC 0x87237190U
|
||||||
typedef struct kpios_cfg {
|
typedef struct zpios_cfg {
|
||||||
uint32_t cfg_magic; /* Unique magic */
|
uint32_t cfg_magic; /* Unique magic */
|
||||||
int32_t cfg_cmd; /* Config command */
|
int32_t cfg_cmd; /* Config command */
|
||||||
int32_t cfg_arg1; /* Config command arg 1 */
|
int32_t cfg_arg1; /* Config command arg 1 */
|
||||||
int32_t cfg_rc1; /* Config response 1 */
|
int32_t cfg_rc1; /* Config response 1 */
|
||||||
} kpios_cfg_t;
|
} zpios_cfg_t;
|
||||||
|
|
||||||
typedef struct kpios_time {
|
typedef struct zpios_time {
|
||||||
struct timespec start;
|
struct timespec start;
|
||||||
struct timespec stop;
|
struct timespec stop;
|
||||||
struct timespec delta;
|
struct timespec delta;
|
||||||
} kpios_time_t;
|
} zpios_time_t;
|
||||||
|
|
||||||
typedef struct kpios_stats {
|
typedef struct zpios_stats {
|
||||||
kpios_time_t total_time;
|
zpios_time_t total_time;
|
||||||
kpios_time_t cr_time;
|
zpios_time_t cr_time;
|
||||||
kpios_time_t rm_time;
|
zpios_time_t rm_time;
|
||||||
kpios_time_t wr_time;
|
zpios_time_t wr_time;
|
||||||
kpios_time_t rd_time;
|
zpios_time_t rd_time;
|
||||||
uint64_t wr_data;
|
uint64_t wr_data;
|
||||||
uint64_t wr_chunks;
|
uint64_t wr_chunks;
|
||||||
uint64_t rd_data;
|
uint64_t rd_data;
|
||||||
uint64_t rd_chunks;
|
uint64_t rd_chunks;
|
||||||
} kpios_stats_t;
|
} zpios_stats_t;
|
||||||
|
|
||||||
#define KPIOS_CMD_MAGIC 0x49715385U
|
#define ZPIOS_CMD_MAGIC 0x49715385U
|
||||||
typedef struct kpios_cmd {
|
typedef struct zpios_cmd {
|
||||||
uint32_t cmd_magic; /* Unique magic */
|
uint32_t cmd_magic; /* Unique magic */
|
||||||
uint32_t cmd_id; /* Run ID */
|
uint32_t cmd_id; /* Run ID */
|
||||||
char cmd_pool[KPIOS_NAME_SIZE]; /* Pool name */
|
char cmd_pool[ZPIOS_NAME_SIZE]; /* Pool name */
|
||||||
uint64_t cmd_chunk_size; /* Chunk size */
|
uint64_t cmd_chunk_size; /* Chunk size */
|
||||||
uint32_t cmd_thread_count; /* Thread count */
|
uint32_t cmd_thread_count; /* Thread count */
|
||||||
uint32_t cmd_region_count; /* Region count */
|
uint32_t cmd_region_count; /* Region count */
|
||||||
|
@ -102,19 +102,19 @@ typedef struct kpios_cmd {
|
||||||
uint32_t cmd_chunk_noise; /* Chunk noise */
|
uint32_t cmd_chunk_noise; /* Chunk noise */
|
||||||
uint32_t cmd_thread_delay; /* Thread delay */
|
uint32_t cmd_thread_delay; /* Thread delay */
|
||||||
uint32_t cmd_flags; /* Test flags */
|
uint32_t cmd_flags; /* Test flags */
|
||||||
char cmd_pre[KPIOS_PATH_SIZE]; /* Pre-exec hook */
|
char cmd_pre[ZPIOS_PATH_SIZE]; /* Pre-exec hook */
|
||||||
char cmd_post[KPIOS_PATH_SIZE]; /* Post-exec hook */
|
char cmd_post[ZPIOS_PATH_SIZE]; /* Post-exec hook */
|
||||||
char cmd_log[KPIOS_PATH_SIZE]; /* Requested log dir */
|
char cmd_log[ZPIOS_PATH_SIZE]; /* Requested log dir */
|
||||||
uint64_t cmd_data_size; /* Opaque data size */
|
uint64_t cmd_data_size; /* Opaque data size */
|
||||||
char cmd_data_str[0]; /* Opaque data region */
|
char cmd_data_str[0]; /* Opaque data region */
|
||||||
} kpios_cmd_t;
|
} zpios_cmd_t;
|
||||||
|
|
||||||
/* Valid ioctls */
|
/* Valid ioctls */
|
||||||
#define KPIOS_CFG _IOWR('f', 101, long)
|
#define ZPIOS_CFG _IOWR('f', 101, long)
|
||||||
#define KPIOS_CMD _IOWR('f', 102, long)
|
#define ZPIOS_CMD _IOWR('f', 102, long)
|
||||||
|
|
||||||
/* Valid configuration commands */
|
/* Valid configuration commands */
|
||||||
#define KPIOS_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */
|
#define ZPIOS_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */
|
||||||
#define KPIOS_CFG_BUFFER_SIZE 0x002 /* Resize text buffer */
|
#define ZPIOS_CFG_BUFFER_SIZE 0x002 /* Resize text buffer */
|
||||||
|
|
||||||
#endif /* _KPIOS_CTL_H */
|
#endif /* _ZPIOS_CTL_H */
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
* CDDL HEADER END
|
* CDDL HEADER END
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _KPIOS_INTERNAL_H
|
#ifndef _ZPIOS_INTERNAL_H
|
||||||
#define _KPIOS_INTERNAL_H
|
#define _ZPIOS_INTERNAL_H
|
||||||
|
|
||||||
#include "zpios-ctl.h"
|
#include "zpios-ctl.h"
|
||||||
|
|
||||||
|
@ -49,26 +49,26 @@ typedef struct thread_data {
|
||||||
struct run_args *run_args;
|
struct run_args *run_args;
|
||||||
int thread_no;
|
int thread_no;
|
||||||
int rc;
|
int rc;
|
||||||
kpios_stats_t stats;
|
zpios_stats_t stats;
|
||||||
kmutex_t lock;
|
kmutex_t lock;
|
||||||
} thread_data_t;
|
} thread_data_t;
|
||||||
|
|
||||||
/* region for IO data */
|
/* region for IO data */
|
||||||
typedef struct kpios_region {
|
typedef struct zpios_region {
|
||||||
__u64 wr_offset;
|
__u64 wr_offset;
|
||||||
__u64 rd_offset;
|
__u64 rd_offset;
|
||||||
__u64 init_offset;
|
__u64 init_offset;
|
||||||
__u64 max_offset;
|
__u64 max_offset;
|
||||||
dmu_obj_t obj;
|
dmu_obj_t obj;
|
||||||
kpios_stats_t stats;
|
zpios_stats_t stats;
|
||||||
kmutex_t lock;
|
kmutex_t lock;
|
||||||
} kpios_region_t;
|
} zpios_region_t;
|
||||||
|
|
||||||
/* arguments for one run */
|
/* arguments for one run */
|
||||||
typedef struct run_args {
|
typedef struct run_args {
|
||||||
/* Config args */
|
/* Config args */
|
||||||
int id;
|
int id;
|
||||||
char pool[KPIOS_NAME_SIZE];
|
char pool[ZPIOS_NAME_SIZE];
|
||||||
__u64 chunk_size;
|
__u64 chunk_size;
|
||||||
__u32 thread_count;
|
__u32 thread_count;
|
||||||
__u32 region_count;
|
__u32 region_count;
|
||||||
|
@ -78,9 +78,9 @@ typedef struct run_args {
|
||||||
__u32 chunk_noise;
|
__u32 chunk_noise;
|
||||||
__u32 thread_delay;
|
__u32 thread_delay;
|
||||||
__u32 flags;
|
__u32 flags;
|
||||||
char pre[KPIOS_PATH_SIZE];
|
char pre[ZPIOS_PATH_SIZE];
|
||||||
char post[KPIOS_PATH_SIZE];
|
char post[ZPIOS_PATH_SIZE];
|
||||||
char log[KPIOS_PATH_SIZE];
|
char log[ZPIOS_PATH_SIZE];
|
||||||
|
|
||||||
/* Control data */
|
/* Control data */
|
||||||
objset_t *os;
|
objset_t *os;
|
||||||
|
@ -92,24 +92,24 @@ typedef struct run_args {
|
||||||
|
|
||||||
/* Results data */
|
/* Results data */
|
||||||
struct file *file;
|
struct file *file;
|
||||||
kpios_stats_t stats;
|
zpios_stats_t stats;
|
||||||
|
|
||||||
thread_data_t **threads;
|
thread_data_t **threads;
|
||||||
kpios_region_t regions[0]; /* Must be last element */
|
zpios_region_t regions[0]; /* Must be last element */
|
||||||
} run_args_t;
|
} run_args_t;
|
||||||
|
|
||||||
#define KPIOS_INFO_BUFFER_SIZE 65536
|
#define ZPIOS_INFO_BUFFER_SIZE 65536
|
||||||
#define KPIOS_INFO_BUFFER_REDZONE 1024
|
#define ZPIOS_INFO_BUFFER_REDZONE 1024
|
||||||
|
|
||||||
typedef struct kpios_info {
|
typedef struct zpios_info {
|
||||||
spinlock_t info_lock;
|
spinlock_t info_lock;
|
||||||
int info_size;
|
int info_size;
|
||||||
char *info_buffer;
|
char *info_buffer;
|
||||||
char *info_head; /* Internal kernel use only */
|
char *info_head; /* Internal kernel use only */
|
||||||
} kpios_info_t;
|
} zpios_info_t;
|
||||||
|
|
||||||
#define kpios_print(file, format, args...) \
|
#define zpios_print(file, format, args...) \
|
||||||
({ kpios_info_t *_info_ = (kpios_info_t *)file->private_data; \
|
({ zpios_info_t *_info_ = (zpios_info_t *)file->private_data; \
|
||||||
int _rc_; \
|
int _rc_; \
|
||||||
\
|
\
|
||||||
ASSERT(_info_); \
|
ASSERT(_info_); \
|
||||||
|
@ -119,7 +119,7 @@ typedef struct kpios_info {
|
||||||
\
|
\
|
||||||
/* Don't allow the kernel to start a write in the red zone */ \
|
/* Don't allow the kernel to start a write in the red zone */ \
|
||||||
if ((int)(_info_->info_head - _info_->info_buffer) > \
|
if ((int)(_info_->info_head - _info_->info_buffer) > \
|
||||||
(_info_->info_size - KPIOS_INFO_BUFFER_REDZONE)) { \
|
(_info_->info_size - ZPIOS_INFO_BUFFER_REDZONE)) { \
|
||||||
_rc_ = -EOVERFLOW; \
|
_rc_ = -EOVERFLOW; \
|
||||||
} else { \
|
} else { \
|
||||||
_rc_ = sprintf(_info_->info_head, format, args); \
|
_rc_ = sprintf(_info_->info_head, format, args); \
|
||||||
|
@ -131,7 +131,7 @@ typedef struct kpios_info {
|
||||||
_rc_; \
|
_rc_; \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define kpios_vprint(file, test, format, args...) \
|
#define zpios_vprint(file, test, format, args...) \
|
||||||
kpios_print(file, "%*s: " format, KPIOS_NAME_SIZE, test, args)
|
zpios_print(file, "%*s: " format, ZPIOS_NAME_SIZE, test, args)
|
||||||
|
|
||||||
#endif /* _KPIOS_INTERNAL_H */
|
#endif /* _ZPIOS_INTERNAL_H */
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#include "zpios-internal.h"
|
#include "zpios-internal.h"
|
||||||
|
|
||||||
|
|
||||||
static struct class *kpios_class;
|
static struct class *zpios_class;
|
||||||
|
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
|
@ -53,7 +53,7 @@ struct timespec timespec_add(struct timespec lhs, struct timespec rhs)
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
int kpios_upcall(char *path, char *phase, run_args_t *run_args, int rc)
|
int zpios_upcall(char *path, char *phase, run_args_t *run_args, int rc)
|
||||||
{
|
{
|
||||||
/* This is stack heavy but it should be OK since we are only
|
/* This is stack heavy but it should be OK since we are only
|
||||||
* making the upcall between tests when the stack is shallow.
|
* making the upcall between tests when the stack is shallow.
|
||||||
|
@ -106,7 +106,7 @@ int kpios_upcall(char *path, char *phase, run_args_t *run_args, int rc)
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint64_t
|
static uint64_t
|
||||||
kpios_dmu_object_create(run_args_t *run_args, objset_t *os)
|
zpios_dmu_object_create(run_args_t *run_args, objset_t *os)
|
||||||
{
|
{
|
||||||
struct dmu_tx *tx;
|
struct dmu_tx *tx;
|
||||||
uint64_t obj = 0ULL;
|
uint64_t obj = 0ULL;
|
||||||
|
@ -116,7 +116,7 @@ kpios_dmu_object_create(run_args_t *run_args, objset_t *os)
|
||||||
dmu_tx_hold_write(tx, DMU_NEW_OBJECT, 0, OBJ_SIZE);
|
dmu_tx_hold_write(tx, DMU_NEW_OBJECT, 0, OBJ_SIZE);
|
||||||
rc = dmu_tx_assign(tx, TXG_WAIT);
|
rc = dmu_tx_assign(tx, TXG_WAIT);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
kpios_print(run_args->file,
|
zpios_print(run_args->file,
|
||||||
"dmu_tx_assign() failed: %d\n", rc);
|
"dmu_tx_assign() failed: %d\n", rc);
|
||||||
dmu_tx_abort(tx);
|
dmu_tx_abort(tx);
|
||||||
return obj;
|
return obj;
|
||||||
|
@ -126,7 +126,7 @@ kpios_dmu_object_create(run_args_t *run_args, objset_t *os)
|
||||||
DMU_OT_NONE, 0, tx);
|
DMU_OT_NONE, 0, tx);
|
||||||
rc = dmu_object_set_blocksize(os, obj, 128ULL << 10, 0, tx);
|
rc = dmu_object_set_blocksize(os, obj, 128ULL << 10, 0, tx);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
kpios_print(run_args->file,
|
zpios_print(run_args->file,
|
||||||
"dmu_object_set_blocksize() failed: %d\n", rc);
|
"dmu_object_set_blocksize() failed: %d\n", rc);
|
||||||
dmu_tx_abort(tx);
|
dmu_tx_abort(tx);
|
||||||
return obj;
|
return obj;
|
||||||
|
@ -138,7 +138,7 @@ kpios_dmu_object_create(run_args_t *run_args, objset_t *os)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_dmu_object_free(run_args_t *run_args, objset_t *os, uint64_t obj)
|
zpios_dmu_object_free(run_args_t *run_args, objset_t *os, uint64_t obj)
|
||||||
{
|
{
|
||||||
struct dmu_tx *tx;
|
struct dmu_tx *tx;
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -147,7 +147,7 @@ kpios_dmu_object_free(run_args_t *run_args, objset_t *os, uint64_t obj)
|
||||||
dmu_tx_hold_free(tx, obj, 0, DMU_OBJECT_END);
|
dmu_tx_hold_free(tx, obj, 0, DMU_OBJECT_END);
|
||||||
rc = dmu_tx_assign(tx, TXG_WAIT);
|
rc = dmu_tx_assign(tx, TXG_WAIT);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
kpios_print(run_args->file,
|
zpios_print(run_args->file,
|
||||||
"dmu_tx_assign() failed: %d\n", rc);
|
"dmu_tx_assign() failed: %d\n", rc);
|
||||||
dmu_tx_abort(tx);
|
dmu_tx_abort(tx);
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -155,7 +155,7 @@ kpios_dmu_object_free(run_args_t *run_args, objset_t *os, uint64_t obj)
|
||||||
|
|
||||||
rc = dmu_object_free(os, obj, tx);
|
rc = dmu_object_free(os, obj, tx);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
kpios_print(run_args->file,
|
zpios_print(run_args->file,
|
||||||
"dmu_object_free() failed: %d\n", rc);
|
"dmu_object_free() failed: %d\n", rc);
|
||||||
dmu_tx_abort(tx);
|
dmu_tx_abort(tx);
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -167,9 +167,9 @@ kpios_dmu_object_free(run_args_t *run_args, objset_t *os, uint64_t obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_dmu_setup(run_args_t *run_args)
|
zpios_dmu_setup(run_args_t *run_args)
|
||||||
{
|
{
|
||||||
kpios_time_t *t = &(run_args->stats.cr_time);
|
zpios_time_t *t = &(run_args->stats.cr_time);
|
||||||
objset_t *os;
|
objset_t *os;
|
||||||
uint64_t obj = 0ULL;
|
uint64_t obj = 0ULL;
|
||||||
int i, rc = 0;
|
int i, rc = 0;
|
||||||
|
@ -178,23 +178,23 @@ kpios_dmu_setup(run_args_t *run_args)
|
||||||
|
|
||||||
rc = dmu_objset_open(run_args->pool, DMU_OST_ZFS, DS_MODE_USER, &os);
|
rc = dmu_objset_open(run_args->pool, DMU_OST_ZFS, DS_MODE_USER, &os);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
kpios_print(run_args->file, "Error dmu_objset_open() "
|
zpios_print(run_args->file, "Error dmu_objset_open() "
|
||||||
"failed: %d\n", rc);
|
"failed: %d\n", rc);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(run_args->flags & DMU_FPP)) {
|
if (!(run_args->flags & DMU_FPP)) {
|
||||||
obj = kpios_dmu_object_create(run_args, os);
|
obj = zpios_dmu_object_create(run_args, os);
|
||||||
if (obj == 0) {
|
if (obj == 0) {
|
||||||
rc = -EBADF;
|
rc = -EBADF;
|
||||||
kpios_print(run_args->file, "Error kpios_dmu_"
|
zpios_print(run_args->file, "Error zpios_dmu_"
|
||||||
"object_create() failed, %d\n", rc);
|
"object_create() failed, %d\n", rc);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < run_args->region_count; i++) {
|
for (i = 0; i < run_args->region_count; i++) {
|
||||||
kpios_region_t *region;
|
zpios_region_t *region;
|
||||||
|
|
||||||
region = &run_args->regions[i];
|
region = &run_args->regions[i];
|
||||||
mutex_init(®ion->lock, NULL, MUTEX_DEFAULT, NULL);
|
mutex_init(®ion->lock, NULL, MUTEX_DEFAULT, NULL);
|
||||||
|
@ -202,7 +202,7 @@ kpios_dmu_setup(run_args_t *run_args)
|
||||||
if (run_args->flags & DMU_FPP) {
|
if (run_args->flags & DMU_FPP) {
|
||||||
/* File per process */
|
/* File per process */
|
||||||
region->obj.os = os;
|
region->obj.os = os;
|
||||||
region->obj.obj = kpios_dmu_object_create(run_args, os);
|
region->obj.obj = zpios_dmu_object_create(run_args, os);
|
||||||
ASSERT(region->obj.obj > 0); /* XXX - Handle this */
|
ASSERT(region->obj.obj > 0); /* XXX - Handle this */
|
||||||
region->wr_offset = run_args->offset;
|
region->wr_offset = run_args->offset;
|
||||||
region->rd_offset = run_args->offset;
|
region->rd_offset = run_args->offset;
|
||||||
|
@ -230,25 +230,25 @@ out:
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_setup_run(run_args_t **run_args, kpios_cmd_t *kcmd, struct file *file)
|
zpios_setup_run(run_args_t **run_args, zpios_cmd_t *kcmd, struct file *file)
|
||||||
{
|
{
|
||||||
run_args_t *ra;
|
run_args_t *ra;
|
||||||
int rc, size;
|
int rc, size;
|
||||||
|
|
||||||
size = sizeof(*ra) + kcmd->cmd_region_count * sizeof(kpios_region_t);
|
size = sizeof(*ra) + kcmd->cmd_region_count * sizeof(zpios_region_t);
|
||||||
|
|
||||||
ra = vmem_zalloc(size, KM_SLEEP);
|
ra = vmem_zalloc(size, KM_SLEEP);
|
||||||
if (ra == NULL) {
|
if (ra == NULL) {
|
||||||
kpios_print(file, "Unable to vmem_zalloc() %d bytes "
|
zpios_print(file, "Unable to vmem_zalloc() %d bytes "
|
||||||
"for regions\n", size);
|
"for regions\n", size);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
*run_args = ra;
|
*run_args = ra;
|
||||||
strncpy(ra->pool, kcmd->cmd_pool, KPIOS_NAME_SIZE - 1);
|
strncpy(ra->pool, kcmd->cmd_pool, ZPIOS_NAME_SIZE - 1);
|
||||||
strncpy(ra->pre, kcmd->cmd_pre, KPIOS_PATH_SIZE - 1);
|
strncpy(ra->pre, kcmd->cmd_pre, ZPIOS_PATH_SIZE - 1);
|
||||||
strncpy(ra->post, kcmd->cmd_post, KPIOS_PATH_SIZE - 1);
|
strncpy(ra->post, kcmd->cmd_post, ZPIOS_PATH_SIZE - 1);
|
||||||
strncpy(ra->log, kcmd->cmd_log, KPIOS_PATH_SIZE - 1);
|
strncpy(ra->log, kcmd->cmd_log, ZPIOS_PATH_SIZE - 1);
|
||||||
ra->id = kcmd->cmd_id;
|
ra->id = kcmd->cmd_id;
|
||||||
ra->chunk_size = kcmd->cmd_chunk_size;
|
ra->chunk_size = kcmd->cmd_chunk_size;
|
||||||
ra->thread_count = kcmd->cmd_thread_count;
|
ra->thread_count = kcmd->cmd_thread_count;
|
||||||
|
@ -268,7 +268,7 @@ kpios_setup_run(run_args_t **run_args, kpios_cmd_t *kcmd, struct file *file)
|
||||||
mutex_init(&ra->lock_work, NULL, MUTEX_DEFAULT, NULL);
|
mutex_init(&ra->lock_work, NULL, MUTEX_DEFAULT, NULL);
|
||||||
mutex_init(&ra->lock_ctl, NULL, MUTEX_DEFAULT, NULL);
|
mutex_init(&ra->lock_ctl, NULL, MUTEX_DEFAULT, NULL);
|
||||||
|
|
||||||
rc = kpios_dmu_setup(ra);
|
rc = zpios_dmu_setup(ra);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
mutex_destroy(&ra->lock_ctl);
|
mutex_destroy(&ra->lock_ctl);
|
||||||
mutex_destroy(&ra->lock_work);
|
mutex_destroy(&ra->lock_work);
|
||||||
|
@ -280,8 +280,8 @@ kpios_setup_run(run_args_t **run_args, kpios_cmd_t *kcmd, struct file *file)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_get_work_item(run_args_t *run_args, dmu_obj_t *obj, __u64 *offset,
|
zpios_get_work_item(run_args_t *run_args, dmu_obj_t *obj, __u64 *offset,
|
||||||
__u32 *chunk_size, kpios_region_t **region, __u32 flags)
|
__u32 *chunk_size, zpios_region_t **region, __u32 flags)
|
||||||
{
|
{
|
||||||
int i, j, count = 0;
|
int i, j, count = 0;
|
||||||
unsigned int random_int;
|
unsigned int random_int;
|
||||||
|
@ -298,7 +298,7 @@ kpios_get_work_item(run_args_t *run_args, dmu_obj_t *obj, __u64 *offset,
|
||||||
*/
|
*/
|
||||||
while (count < run_args->region_count) {
|
while (count < run_args->region_count) {
|
||||||
__u64 *rw_offset;
|
__u64 *rw_offset;
|
||||||
kpios_time_t *rw_time;
|
zpios_time_t *rw_time;
|
||||||
|
|
||||||
j = i % run_args->region_count;
|
j = i % run_args->region_count;
|
||||||
*region = &(run_args->regions[j]);
|
*region = &(run_args->regions[j]);
|
||||||
|
@ -346,10 +346,10 @@ kpios_get_work_item(run_args_t *run_args, dmu_obj_t *obj, __u64 *offset,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
kpios_remove_objects(run_args_t *run_args)
|
zpios_remove_objects(run_args_t *run_args)
|
||||||
{
|
{
|
||||||
kpios_time_t *t = &(run_args->stats.rm_time);
|
zpios_time_t *t = &(run_args->stats.rm_time);
|
||||||
kpios_region_t *region;
|
zpios_region_t *region;
|
||||||
int rc = 0, i;
|
int rc = 0, i;
|
||||||
|
|
||||||
t->start = current_kernel_time();
|
t->start = current_kernel_time();
|
||||||
|
@ -358,21 +358,21 @@ kpios_remove_objects(run_args_t *run_args)
|
||||||
if (run_args->flags & DMU_FPP) {
|
if (run_args->flags & DMU_FPP) {
|
||||||
for (i = 0; i < run_args->region_count; i++) {
|
for (i = 0; i < run_args->region_count; i++) {
|
||||||
region = &run_args->regions[i];
|
region = &run_args->regions[i];
|
||||||
rc = kpios_dmu_object_free(run_args,
|
rc = zpios_dmu_object_free(run_args,
|
||||||
region->obj.os,
|
region->obj.os,
|
||||||
region->obj.obj);
|
region->obj.obj);
|
||||||
if (rc)
|
if (rc)
|
||||||
kpios_print(run_args->file, "Error "
|
zpios_print(run_args->file, "Error "
|
||||||
"removing object %d, %d\n",
|
"removing object %d, %d\n",
|
||||||
(int)region->obj.obj, rc);
|
(int)region->obj.obj, rc);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
region = &run_args->regions[0];
|
region = &run_args->regions[0];
|
||||||
rc = kpios_dmu_object_free(run_args,
|
rc = zpios_dmu_object_free(run_args,
|
||||||
region->obj.os,
|
region->obj.os,
|
||||||
region->obj.obj);
|
region->obj.obj);
|
||||||
if (rc)
|
if (rc)
|
||||||
kpios_print(run_args->file, "Error "
|
zpios_print(run_args->file, "Error "
|
||||||
"removing object %d, %d\n",
|
"removing object %d, %d\n",
|
||||||
(int)region->obj.obj, rc);
|
(int)region->obj.obj, rc);
|
||||||
}
|
}
|
||||||
|
@ -385,7 +385,7 @@ kpios_remove_objects(run_args_t *run_args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
kpios_cleanup_run(run_args_t *run_args)
|
zpios_cleanup_run(run_args_t *run_args)
|
||||||
{
|
{
|
||||||
int i, size = 0;
|
int i, size = 0;
|
||||||
|
|
||||||
|
@ -413,13 +413,13 @@ kpios_cleanup_run(run_args_t *run_args)
|
||||||
mutex_destroy(&run_args->lock_ctl);
|
mutex_destroy(&run_args->lock_ctl);
|
||||||
|
|
||||||
if (run_args->regions != NULL)
|
if (run_args->regions != NULL)
|
||||||
size = run_args->region_count * sizeof(kpios_region_t);
|
size = run_args->region_count * sizeof(zpios_region_t);
|
||||||
|
|
||||||
vmem_free(run_args, sizeof(*run_args) + size);
|
vmem_free(run_args, sizeof(*run_args) + size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_dmu_write(run_args_t *run_args, objset_t *os, uint64_t object,
|
zpios_dmu_write(run_args_t *run_args, objset_t *os, uint64_t object,
|
||||||
uint64_t offset, uint64_t size, const void *buf)
|
uint64_t offset, uint64_t size, const void *buf)
|
||||||
{
|
{
|
||||||
struct dmu_tx *tx;
|
struct dmu_tx *tx;
|
||||||
|
@ -437,7 +437,7 @@ kpios_dmu_write(run_args_t *run_args, objset_t *os, uint64_t object,
|
||||||
dmu_tx_abort(tx);
|
dmu_tx_abort(tx);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
kpios_print(run_args->file,
|
zpios_print(run_args->file,
|
||||||
"Error in dmu_tx_assign(), %d", rc);
|
"Error in dmu_tx_assign(), %d", rc);
|
||||||
dmu_tx_abort(tx);
|
dmu_tx_abort(tx);
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -455,7 +455,7 @@ kpios_dmu_write(run_args_t *run_args, objset_t *os, uint64_t object,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_dmu_read(run_args_t *run_args, objset_t *os, uint64_t object,
|
zpios_dmu_read(run_args_t *run_args, objset_t *os, uint64_t object,
|
||||||
uint64_t offset, uint64_t size, void *buf)
|
uint64_t offset, uint64_t size, void *buf)
|
||||||
{
|
{
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
@ -467,16 +467,16 @@ kpios_dmu_read(run_args_t *run_args, objset_t *os, uint64_t object,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_thread_main(void *data)
|
zpios_thread_main(void *data)
|
||||||
{
|
{
|
||||||
thread_data_t *thr = (thread_data_t *)data;
|
thread_data_t *thr = (thread_data_t *)data;
|
||||||
run_args_t *run_args = thr->run_args;
|
run_args_t *run_args = thr->run_args;
|
||||||
kpios_time_t t;
|
zpios_time_t t;
|
||||||
|
|
||||||
dmu_obj_t obj;
|
dmu_obj_t obj;
|
||||||
__u64 offset;
|
__u64 offset;
|
||||||
__u32 chunk_size;
|
__u32 chunk_size;
|
||||||
kpios_region_t *region;
|
zpios_region_t *region;
|
||||||
char *buf;
|
char *buf;
|
||||||
|
|
||||||
unsigned int random_int;
|
unsigned int random_int;
|
||||||
|
@ -511,7 +511,7 @@ kpios_thread_main(void *data)
|
||||||
thr->stats.wr_time.start = current_kernel_time();
|
thr->stats.wr_time.start = current_kernel_time();
|
||||||
mutex_exit(&thr->lock);
|
mutex_exit(&thr->lock);
|
||||||
|
|
||||||
while (kpios_get_work_item(run_args, &obj, &offset,
|
while (zpios_get_work_item(run_args, &obj, &offset,
|
||||||
&chunk_size, ®ion, DMU_WRITE)) {
|
&chunk_size, ®ion, DMU_WRITE)) {
|
||||||
if (thread_delay) {
|
if (thread_delay) {
|
||||||
get_random_bytes(&random_int, sizeof(unsigned int));
|
get_random_bytes(&random_int, sizeof(unsigned int));
|
||||||
|
@ -521,13 +521,13 @@ kpios_thread_main(void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
t.start = current_kernel_time();
|
t.start = current_kernel_time();
|
||||||
rc = kpios_dmu_write(run_args, obj.os, obj.obj,
|
rc = zpios_dmu_write(run_args, obj.os, obj.obj,
|
||||||
offset, chunk_size, buf);
|
offset, chunk_size, buf);
|
||||||
t.stop = current_kernel_time();
|
t.stop = current_kernel_time();
|
||||||
t.delta = timespec_sub(t.stop, t.start);
|
t.delta = timespec_sub(t.stop, t.start);
|
||||||
|
|
||||||
if (rc) {
|
if (rc) {
|
||||||
kpios_print(run_args->file, "IO error while doing "
|
zpios_print(run_args->file, "IO error while doing "
|
||||||
"dmu_write(): %d\n", rc);
|
"dmu_write(): %d\n", rc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -577,7 +577,7 @@ kpios_thread_main(void *data)
|
||||||
thr->stats.rd_time.start = current_kernel_time();
|
thr->stats.rd_time.start = current_kernel_time();
|
||||||
mutex_exit(&thr->lock);
|
mutex_exit(&thr->lock);
|
||||||
|
|
||||||
while (kpios_get_work_item(run_args, &obj, &offset,
|
while (zpios_get_work_item(run_args, &obj, &offset,
|
||||||
&chunk_size, ®ion, DMU_READ)) {
|
&chunk_size, ®ion, DMU_READ)) {
|
||||||
if (thread_delay) {
|
if (thread_delay) {
|
||||||
get_random_bytes(&random_int, sizeof(unsigned int));
|
get_random_bytes(&random_int, sizeof(unsigned int));
|
||||||
|
@ -590,13 +590,13 @@ kpios_thread_main(void *data)
|
||||||
memset(buf, 0, chunk_size);
|
memset(buf, 0, chunk_size);
|
||||||
|
|
||||||
t.start = current_kernel_time();
|
t.start = current_kernel_time();
|
||||||
rc = kpios_dmu_read(run_args, obj.os, obj.obj,
|
rc = zpios_dmu_read(run_args, obj.os, obj.obj,
|
||||||
offset, chunk_size, buf);
|
offset, chunk_size, buf);
|
||||||
t.stop = current_kernel_time();
|
t.stop = current_kernel_time();
|
||||||
t.delta = timespec_sub(t.stop, t.start);
|
t.delta = timespec_sub(t.stop, t.start);
|
||||||
|
|
||||||
if (rc) {
|
if (rc) {
|
||||||
kpios_print(run_args->file, "IO error while doing "
|
zpios_print(run_args->file, "IO error while doing "
|
||||||
"dmu_read(): %d\n", rc);
|
"dmu_read(): %d\n", rc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -605,7 +605,7 @@ kpios_thread_main(void *data)
|
||||||
if (run_args->flags & DMU_VERIFY) {
|
if (run_args->flags & DMU_VERIFY) {
|
||||||
for (i = 0; i < chunk_size; i++) {
|
for (i = 0; i < chunk_size; i++) {
|
||||||
if (buf[i] != 'z') {
|
if (buf[i] != 'z') {
|
||||||
kpios_print(run_args->file,
|
zpios_print(run_args->file,
|
||||||
"IO verify error: %d/%d/%d\n",
|
"IO verify error: %d/%d/%d\n",
|
||||||
(int)obj.obj, (int)offset,
|
(int)obj.obj, (int)offset,
|
||||||
(int)chunk_size);
|
(int)chunk_size);
|
||||||
|
@ -652,24 +652,24 @@ out:
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_thread_done(run_args_t *run_args)
|
zpios_thread_done(run_args_t *run_args)
|
||||||
{
|
{
|
||||||
ASSERT(run_args->threads_done <= run_args->thread_count);
|
ASSERT(run_args->threads_done <= run_args->thread_count);
|
||||||
return (run_args->threads_done == run_args->thread_count);
|
return (run_args->threads_done == run_args->thread_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_threads_run(run_args_t *run_args)
|
zpios_threads_run(run_args_t *run_args)
|
||||||
{
|
{
|
||||||
struct task_struct *tsk, **tsks;
|
struct task_struct *tsk, **tsks;
|
||||||
thread_data_t *thr = NULL;
|
thread_data_t *thr = NULL;
|
||||||
kpios_time_t *tt = &(run_args->stats.total_time);
|
zpios_time_t *tt = &(run_args->stats.total_time);
|
||||||
kpios_time_t *tw = &(run_args->stats.wr_time);
|
zpios_time_t *tw = &(run_args->stats.wr_time);
|
||||||
kpios_time_t *tr = &(run_args->stats.rd_time);
|
zpios_time_t *tr = &(run_args->stats.rd_time);
|
||||||
int i, rc = 0, tc = run_args->thread_count;
|
int i, rc = 0, tc = run_args->thread_count;
|
||||||
DEFINE_WAIT(wait);
|
DEFINE_WAIT(wait);
|
||||||
|
|
||||||
kpios_upcall(run_args->pre, PHASE_PRE, run_args, 0);
|
zpios_upcall(run_args->pre, PHASE_PRE, run_args, 0);
|
||||||
|
|
||||||
tsks = kmem_zalloc(sizeof(struct task_struct *) * tc, KM_SLEEP);
|
tsks = kmem_zalloc(sizeof(struct task_struct *) * tc, KM_SLEEP);
|
||||||
if (tsks == NULL) {
|
if (tsks == NULL) {
|
||||||
|
@ -700,8 +700,8 @@ kpios_threads_run(run_args_t *run_args)
|
||||||
mutex_init(&thr->lock, NULL, MUTEX_DEFAULT, NULL);
|
mutex_init(&thr->lock, NULL, MUTEX_DEFAULT, NULL);
|
||||||
run_args->threads[i] = thr;
|
run_args->threads[i] = thr;
|
||||||
|
|
||||||
tsk = kthread_create(kpios_thread_main, (void *)thr,
|
tsk = kthread_create(zpios_thread_main, (void *)thr,
|
||||||
"%s/%d", "kpios_io", i);
|
"%s/%d", "zpios_io", i);
|
||||||
if (IS_ERR(tsk)) {
|
if (IS_ERR(tsk)) {
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
goto taskerr;
|
goto taskerr;
|
||||||
|
@ -713,13 +713,13 @@ kpios_threads_run(run_args_t *run_args)
|
||||||
tt->start = current_kernel_time();
|
tt->start = current_kernel_time();
|
||||||
|
|
||||||
/* Wake up all threads for write phase */
|
/* Wake up all threads for write phase */
|
||||||
kpios_upcall(run_args->pre, PHASE_WRITE, run_args, 0);
|
zpios_upcall(run_args->pre, PHASE_WRITE, run_args, 0);
|
||||||
for (i = 0; i < tc; i++)
|
for (i = 0; i < tc; i++)
|
||||||
wake_up_process(tsks[i]);
|
wake_up_process(tsks[i]);
|
||||||
|
|
||||||
/* Wait for write phase to complete */
|
/* Wait for write phase to complete */
|
||||||
tw->start = current_kernel_time();
|
tw->start = current_kernel_time();
|
||||||
wait_event(run_args->waitq, kpios_thread_done(run_args));
|
wait_event(run_args->waitq, zpios_thread_done(run_args));
|
||||||
tw->stop = current_kernel_time();
|
tw->stop = current_kernel_time();
|
||||||
|
|
||||||
for (i = 0; i < tc; i++) {
|
for (i = 0; i < tc; i++) {
|
||||||
|
@ -735,7 +735,7 @@ kpios_threads_run(run_args_t *run_args)
|
||||||
mutex_exit(&thr->lock);
|
mutex_exit(&thr->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
kpios_upcall(run_args->post, PHASE_WRITE, run_args, rc);
|
zpios_upcall(run_args->post, PHASE_WRITE, run_args, rc);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
/* Wake up all threads and tell them to exit */
|
/* Wake up all threads and tell them to exit */
|
||||||
for (i = 0; i < tc; i++) {
|
for (i = 0; i < tc; i++) {
|
||||||
|
@ -754,13 +754,13 @@ kpios_threads_run(run_args_t *run_args)
|
||||||
mutex_exit(&run_args->lock_ctl);
|
mutex_exit(&run_args->lock_ctl);
|
||||||
|
|
||||||
/* Wake up all threads for read phase */
|
/* Wake up all threads for read phase */
|
||||||
kpios_upcall(run_args->pre, PHASE_READ, run_args, 0);
|
zpios_upcall(run_args->pre, PHASE_READ, run_args, 0);
|
||||||
for (i = 0; i < tc; i++)
|
for (i = 0; i < tc; i++)
|
||||||
wake_up_process(tsks[i]);
|
wake_up_process(tsks[i]);
|
||||||
|
|
||||||
/* Wait for read phase to complete */
|
/* Wait for read phase to complete */
|
||||||
tr->start = current_kernel_time();
|
tr->start = current_kernel_time();
|
||||||
wait_event(run_args->waitq, kpios_thread_done(run_args));
|
wait_event(run_args->waitq, zpios_thread_done(run_args));
|
||||||
tr->stop = current_kernel_time();
|
tr->stop = current_kernel_time();
|
||||||
|
|
||||||
for (i = 0; i < tc; i++) {
|
for (i = 0; i < tc; i++) {
|
||||||
|
@ -776,7 +776,7 @@ kpios_threads_run(run_args_t *run_args)
|
||||||
mutex_exit(&thr->lock);
|
mutex_exit(&thr->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
kpios_upcall(run_args->post, PHASE_READ, run_args, rc);
|
zpios_upcall(run_args->post, PHASE_READ, run_args, rc);
|
||||||
out:
|
out:
|
||||||
tt->stop = current_kernel_time();
|
tt->stop = current_kernel_time();
|
||||||
tt->delta = timespec_sub(tt->stop, tt->start);
|
tt->delta = timespec_sub(tt->stop, tt->start);
|
||||||
|
@ -786,7 +786,7 @@ out:
|
||||||
cleanup:
|
cleanup:
|
||||||
kmem_free(tsks, sizeof(struct task_struct *) * tc);
|
kmem_free(tsks, sizeof(struct task_struct *) * tc);
|
||||||
cleanup2:
|
cleanup2:
|
||||||
kpios_upcall(run_args->post, PHASE_POST, run_args, rc);
|
zpios_upcall(run_args->post, PHASE_POST, run_args, rc);
|
||||||
|
|
||||||
/* Returns first encountered thread error (if any) */
|
/* Returns first encountered thread error (if any) */
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -801,30 +801,30 @@ taskerr:
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_do_one_run(struct file *file, kpios_cmd_t *kcmd,
|
zpios_do_one_run(struct file *file, zpios_cmd_t *kcmd,
|
||||||
int data_size, void *data)
|
int data_size, void *data)
|
||||||
{
|
{
|
||||||
run_args_t *run_args;
|
run_args_t *run_args;
|
||||||
kpios_stats_t *stats = (kpios_stats_t *)data;
|
zpios_stats_t *stats = (zpios_stats_t *)data;
|
||||||
int i, n, m, size, rc;
|
int i, n, m, size, rc;
|
||||||
|
|
||||||
if ((!kcmd->cmd_chunk_size) || (!kcmd->cmd_region_size) ||
|
if ((!kcmd->cmd_chunk_size) || (!kcmd->cmd_region_size) ||
|
||||||
(!kcmd->cmd_thread_count) || (!kcmd->cmd_region_count)) {
|
(!kcmd->cmd_thread_count) || (!kcmd->cmd_region_count)) {
|
||||||
kpios_print(file, "Invalid chunk_size, region_size, "
|
zpios_print(file, "Invalid chunk_size, region_size, "
|
||||||
"thread_count, or region_count, %d\n", -EINVAL);
|
"thread_count, or region_count, %d\n", -EINVAL);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(kcmd->cmd_flags & DMU_WRITE) ||
|
if (!(kcmd->cmd_flags & DMU_WRITE) ||
|
||||||
!(kcmd->cmd_flags & DMU_READ)) {
|
!(kcmd->cmd_flags & DMU_READ)) {
|
||||||
kpios_print(file, "Invalid flags, minimally DMU_WRITE "
|
zpios_print(file, "Invalid flags, minimally DMU_WRITE "
|
||||||
"and DMU_READ must be set, %d\n", -EINVAL);
|
"and DMU_READ must be set, %d\n", -EINVAL);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((kcmd->cmd_flags & (DMU_WRITE_ZC | DMU_READ_ZC)) &&
|
if ((kcmd->cmd_flags & (DMU_WRITE_ZC | DMU_READ_ZC)) &&
|
||||||
(kcmd->cmd_flags & DMU_VERIFY)) {
|
(kcmd->cmd_flags & DMU_VERIFY)) {
|
||||||
kpios_print(file, "Invalid flags, DMU_*_ZC incompatible "
|
zpios_print(file, "Invalid flags, DMU_*_ZC incompatible "
|
||||||
"with DMU_VERIFY, used for performance analysis "
|
"with DMU_VERIFY, used for performance analysis "
|
||||||
"only, %d\n", -EINVAL);
|
"only, %d\n", -EINVAL);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -832,28 +832,28 @@ kpios_do_one_run(struct file *file, kpios_cmd_t *kcmd,
|
||||||
|
|
||||||
/* Opaque data on return contains structs of the following form:
|
/* Opaque data on return contains structs of the following form:
|
||||||
*
|
*
|
||||||
* kpios_stat_t stats[];
|
* zpios_stat_t stats[];
|
||||||
* stats[0] = run_args->stats;
|
* stats[0] = run_args->stats;
|
||||||
* stats[1-N] = threads[N]->stats;
|
* stats[1-N] = threads[N]->stats;
|
||||||
* stats[N+1-M] = regions[M]->stats;
|
* stats[N+1-M] = regions[M]->stats;
|
||||||
*
|
*
|
||||||
* Where N is the number of threads, and M is the number of regions.
|
* Where N is the number of threads, and M is the number of regions.
|
||||||
*/
|
*/
|
||||||
size = (sizeof(kpios_stats_t) +
|
size = (sizeof(zpios_stats_t) +
|
||||||
(kcmd->cmd_thread_count * sizeof(kpios_stats_t)) +
|
(kcmd->cmd_thread_count * sizeof(zpios_stats_t)) +
|
||||||
(kcmd->cmd_region_count * sizeof(kpios_stats_t)));
|
(kcmd->cmd_region_count * sizeof(zpios_stats_t)));
|
||||||
if (data_size < size) {
|
if (data_size < size) {
|
||||||
kpios_print(file, "Invalid size, command data buffer "
|
zpios_print(file, "Invalid size, command data buffer "
|
||||||
"size too small, (%d < %d)\n", data_size, size);
|
"size too small, (%d < %d)\n", data_size, size);
|
||||||
return -ENOSPC;
|
return -ENOSPC;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = kpios_setup_run(&run_args, kcmd, file);
|
rc = zpios_setup_run(&run_args, kcmd, file);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
rc = kpios_threads_run(run_args);
|
rc = zpios_threads_run(run_args);
|
||||||
kpios_remove_objects(run_args);
|
zpios_remove_objects(run_args);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -870,26 +870,26 @@ kpios_do_one_run(struct file *file, kpios_cmd_t *kcmd,
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
kpios_cleanup_run(run_args);
|
zpios_cleanup_run(run_args);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_open(struct inode *inode, struct file *file)
|
zpios_open(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
unsigned int minor = iminor(inode);
|
unsigned int minor = iminor(inode);
|
||||||
kpios_info_t *info;
|
zpios_info_t *info;
|
||||||
|
|
||||||
if (minor >= KPIOS_MINORS)
|
if (minor >= ZPIOS_MINORS)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
info = (kpios_info_t *)kmem_alloc(sizeof(*info), KM_SLEEP);
|
info = (zpios_info_t *)kmem_alloc(sizeof(*info), KM_SLEEP);
|
||||||
if (info == NULL)
|
if (info == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
spin_lock_init(&info->info_lock);
|
spin_lock_init(&info->info_lock);
|
||||||
info->info_size = KPIOS_INFO_BUFFER_SIZE;
|
info->info_size = ZPIOS_INFO_BUFFER_SIZE;
|
||||||
info->info_buffer = (char *)vmem_alloc(KPIOS_INFO_BUFFER_SIZE,KM_SLEEP);
|
info->info_buffer = (char *)vmem_alloc(ZPIOS_INFO_BUFFER_SIZE,KM_SLEEP);
|
||||||
if (info->info_buffer == NULL) {
|
if (info->info_buffer == NULL) {
|
||||||
kmem_free(info, sizeof(*info));
|
kmem_free(info, sizeof(*info));
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -902,27 +902,27 @@ kpios_open(struct inode *inode, struct file *file)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_release(struct inode *inode, struct file *file)
|
zpios_release(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
unsigned int minor = iminor(inode);
|
unsigned int minor = iminor(inode);
|
||||||
kpios_info_t *info = (kpios_info_t *)file->private_data;
|
zpios_info_t *info = (zpios_info_t *)file->private_data;
|
||||||
|
|
||||||
if (minor >= KPIOS_MINORS)
|
if (minor >= ZPIOS_MINORS)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
ASSERT(info);
|
ASSERT(info);
|
||||||
ASSERT(info->info_buffer);
|
ASSERT(info->info_buffer);
|
||||||
|
|
||||||
vmem_free(info->info_buffer, KPIOS_INFO_BUFFER_SIZE);
|
vmem_free(info->info_buffer, ZPIOS_INFO_BUFFER_SIZE);
|
||||||
kmem_free(info, sizeof(*info));
|
kmem_free(info, sizeof(*info));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_buffer_clear(struct file *file, kpios_cfg_t *kcfg, unsigned long arg)
|
zpios_buffer_clear(struct file *file, zpios_cfg_t *kcfg, unsigned long arg)
|
||||||
{
|
{
|
||||||
kpios_info_t *info = (kpios_info_t *)file->private_data;
|
zpios_info_t *info = (zpios_info_t *)file->private_data;
|
||||||
|
|
||||||
ASSERT(info);
|
ASSERT(info);
|
||||||
ASSERT(info->info_buffer);
|
ASSERT(info->info_buffer);
|
||||||
|
@ -936,9 +936,9 @@ kpios_buffer_clear(struct file *file, kpios_cfg_t *kcfg, unsigned long arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_buffer_size(struct file *file, kpios_cfg_t *kcfg, unsigned long arg)
|
zpios_buffer_size(struct file *file, zpios_cfg_t *kcfg, unsigned long arg)
|
||||||
{
|
{
|
||||||
kpios_info_t *info = (kpios_info_t *)file->private_data;
|
zpios_info_t *info = (zpios_info_t *)file->private_data;
|
||||||
char *buf;
|
char *buf;
|
||||||
int min, size, rc = 0;
|
int min, size, rc = 0;
|
||||||
|
|
||||||
|
@ -967,7 +967,7 @@ kpios_buffer_size(struct file *file, kpios_cfg_t *kcfg, unsigned long arg)
|
||||||
|
|
||||||
kcfg->cfg_rc1 = info->info_size;
|
kcfg->cfg_rc1 = info->info_size;
|
||||||
|
|
||||||
if (copy_to_user((struct kpios_cfg_t __user *)arg, kcfg, sizeof(*kcfg)))
|
if (copy_to_user((struct zpios_cfg_t __user *)arg, kcfg, sizeof(*kcfg)))
|
||||||
rc = -EFAULT;
|
rc = -EFAULT;
|
||||||
out:
|
out:
|
||||||
spin_unlock(&info->info_lock);
|
spin_unlock(&info->info_lock);
|
||||||
|
@ -976,35 +976,35 @@ out:
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_ioctl_cfg(struct file *file, unsigned long arg)
|
zpios_ioctl_cfg(struct file *file, unsigned long arg)
|
||||||
{
|
{
|
||||||
kpios_cfg_t kcfg;
|
zpios_cfg_t kcfg;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
if (copy_from_user(&kcfg, (kpios_cfg_t *)arg, sizeof(kcfg)))
|
if (copy_from_user(&kcfg, (zpios_cfg_t *)arg, sizeof(kcfg)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
if (kcfg.cfg_magic != KPIOS_CFG_MAGIC) {
|
if (kcfg.cfg_magic != ZPIOS_CFG_MAGIC) {
|
||||||
kpios_print(file, "Bad config magic 0x%x != 0x%x\n",
|
zpios_print(file, "Bad config magic 0x%x != 0x%x\n",
|
||||||
kcfg.cfg_magic, KPIOS_CFG_MAGIC);
|
kcfg.cfg_magic, ZPIOS_CFG_MAGIC);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (kcfg.cfg_cmd) {
|
switch (kcfg.cfg_cmd) {
|
||||||
case KPIOS_CFG_BUFFER_CLEAR:
|
case ZPIOS_CFG_BUFFER_CLEAR:
|
||||||
/* cfg_arg1 - Unused
|
/* cfg_arg1 - Unused
|
||||||
* cfg_rc1 - Unused
|
* cfg_rc1 - Unused
|
||||||
*/
|
*/
|
||||||
rc = kpios_buffer_clear(file, &kcfg, arg);
|
rc = zpios_buffer_clear(file, &kcfg, arg);
|
||||||
break;
|
break;
|
||||||
case KPIOS_CFG_BUFFER_SIZE:
|
case ZPIOS_CFG_BUFFER_SIZE:
|
||||||
/* cfg_arg1 - 0 - query size; >0 resize
|
/* cfg_arg1 - 0 - query size; >0 resize
|
||||||
* cfg_rc1 - Set to current buffer size
|
* cfg_rc1 - Set to current buffer size
|
||||||
*/
|
*/
|
||||||
rc = kpios_buffer_size(file, &kcfg, arg);
|
rc = zpios_buffer_size(file, &kcfg, arg);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
kpios_print(file, "Bad config command %d\n",
|
zpios_print(file, "Bad config command %d\n",
|
||||||
kcfg.cfg_cmd);
|
kcfg.cfg_cmd);
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
break;
|
break;
|
||||||
|
@ -1014,22 +1014,22 @@ kpios_ioctl_cfg(struct file *file, unsigned long arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_ioctl_cmd(struct file *file, unsigned long arg)
|
zpios_ioctl_cmd(struct file *file, unsigned long arg)
|
||||||
{
|
{
|
||||||
kpios_cmd_t kcmd;
|
zpios_cmd_t kcmd;
|
||||||
int rc = -EINVAL;
|
int rc = -EINVAL;
|
||||||
void *data = NULL;
|
void *data = NULL;
|
||||||
|
|
||||||
rc = copy_from_user(&kcmd, (kpios_cfg_t *)arg, sizeof(kcmd));
|
rc = copy_from_user(&kcmd, (zpios_cfg_t *)arg, sizeof(kcmd));
|
||||||
if (rc) {
|
if (rc) {
|
||||||
kpios_print(file, "Unable to copy command structure "
|
zpios_print(file, "Unable to copy command structure "
|
||||||
"from user to kernel memory, %d\n", rc);
|
"from user to kernel memory, %d\n", rc);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kcmd.cmd_magic != KPIOS_CMD_MAGIC) {
|
if (kcmd.cmd_magic != ZPIOS_CMD_MAGIC) {
|
||||||
kpios_print(file, "Bad command magic 0x%x != 0x%x\n",
|
zpios_print(file, "Bad command magic 0x%x != 0x%x\n",
|
||||||
kcmd.cmd_magic, KPIOS_CFG_MAGIC);
|
kcmd.cmd_magic, ZPIOS_CFG_MAGIC);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1037,33 +1037,33 @@ kpios_ioctl_cmd(struct file *file, unsigned long arg)
|
||||||
if (kcmd.cmd_data_size > 0) {
|
if (kcmd.cmd_data_size > 0) {
|
||||||
data = (void *)vmem_alloc(kcmd.cmd_data_size, KM_SLEEP);
|
data = (void *)vmem_alloc(kcmd.cmd_data_size, KM_SLEEP);
|
||||||
if (data == NULL) {
|
if (data == NULL) {
|
||||||
kpios_print(file, "Unable to vmem_alloc() %ld "
|
zpios_print(file, "Unable to vmem_alloc() %ld "
|
||||||
"bytes for data buffer\n",
|
"bytes for data buffer\n",
|
||||||
(long)kcmd.cmd_data_size);
|
(long)kcmd.cmd_data_size);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = copy_from_user(data, (void *)(arg + offsetof(kpios_cmd_t,
|
rc = copy_from_user(data, (void *)(arg + offsetof(zpios_cmd_t,
|
||||||
cmd_data_str)), kcmd.cmd_data_size);
|
cmd_data_str)), kcmd.cmd_data_size);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
kpios_print(file, "Unable to copy data buffer "
|
zpios_print(file, "Unable to copy data buffer "
|
||||||
"from user to kernel memory, %d\n", rc);
|
"from user to kernel memory, %d\n", rc);
|
||||||
vmem_free(data, kcmd.cmd_data_size);
|
vmem_free(data, kcmd.cmd_data_size);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = kpios_do_one_run(file, &kcmd, kcmd.cmd_data_size, data);
|
rc = zpios_do_one_run(file, &kcmd, kcmd.cmd_data_size, data);
|
||||||
|
|
||||||
if (data != NULL) {
|
if (data != NULL) {
|
||||||
/* If the test failed do not print out the stats */
|
/* If the test failed do not print out the stats */
|
||||||
if (rc)
|
if (rc)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
rc = copy_to_user((void *)(arg + offsetof(kpios_cmd_t,
|
rc = copy_to_user((void *)(arg + offsetof(zpios_cmd_t,
|
||||||
cmd_data_str)), data, kcmd.cmd_data_size);
|
cmd_data_str)), data, kcmd.cmd_data_size);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
kpios_print(file, "Unable to copy data buffer "
|
zpios_print(file, "Unable to copy data buffer "
|
||||||
"from kernel to user memory, %d\n", rc);
|
"from kernel to user memory, %d\n", rc);
|
||||||
rc = -EFAULT;
|
rc = -EFAULT;
|
||||||
}
|
}
|
||||||
|
@ -1076,7 +1076,7 @@ cleanup:
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
kpios_ioctl(struct inode *inode, struct file *file,
|
zpios_ioctl(struct inode *inode, struct file *file,
|
||||||
unsigned int cmd, unsigned long arg)
|
unsigned int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
unsigned int minor = iminor(file->f_dentry->d_inode);
|
unsigned int minor = iminor(file->f_dentry->d_inode);
|
||||||
|
@ -1086,18 +1086,18 @@ kpios_ioctl(struct inode *inode, struct file *file,
|
||||||
if ((cmd & 0xffffff00) == ((int)'T') << 8)
|
if ((cmd & 0xffffff00) == ((int)'T') << 8)
|
||||||
return -ENOTTY;
|
return -ENOTTY;
|
||||||
|
|
||||||
if (minor >= KPIOS_MINORS)
|
if (minor >= ZPIOS_MINORS)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case KPIOS_CFG:
|
case ZPIOS_CFG:
|
||||||
rc = kpios_ioctl_cfg(file, arg);
|
rc = zpios_ioctl_cfg(file, arg);
|
||||||
break;
|
break;
|
||||||
case KPIOS_CMD:
|
case ZPIOS_CMD:
|
||||||
rc = kpios_ioctl_cmd(file, arg);
|
rc = zpios_ioctl_cmd(file, arg);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
kpios_print(file, "Bad ioctl command %d\n", cmd);
|
zpios_print(file, "Bad ioctl command %d\n", cmd);
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1110,14 +1110,14 @@ kpios_ioctl(struct inode *inode, struct file *file,
|
||||||
* back to the user space, but I don't see any reason to prevent it.
|
* back to the user space, but I don't see any reason to prevent it.
|
||||||
*/
|
*/
|
||||||
static ssize_t
|
static ssize_t
|
||||||
kpios_write(struct file *file, const char __user *buf,
|
zpios_write(struct file *file, const char __user *buf,
|
||||||
size_t count, loff_t *ppos)
|
size_t count, loff_t *ppos)
|
||||||
{
|
{
|
||||||
unsigned int minor = iminor(file->f_dentry->d_inode);
|
unsigned int minor = iminor(file->f_dentry->d_inode);
|
||||||
kpios_info_t *info = (kpios_info_t *)file->private_data;
|
zpios_info_t *info = (zpios_info_t *)file->private_data;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
if (minor >= KPIOS_MINORS)
|
if (minor >= ZPIOS_MINORS)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
ASSERT(info);
|
ASSERT(info);
|
||||||
|
@ -1148,14 +1148,14 @@ out:
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t
|
static ssize_t
|
||||||
kpios_read(struct file *file, char __user *buf,
|
zpios_read(struct file *file, char __user *buf,
|
||||||
size_t count, loff_t *ppos)
|
size_t count, loff_t *ppos)
|
||||||
{
|
{
|
||||||
unsigned int minor = iminor(file->f_dentry->d_inode);
|
unsigned int minor = iminor(file->f_dentry->d_inode);
|
||||||
kpios_info_t *info = (kpios_info_t *)file->private_data;
|
zpios_info_t *info = (zpios_info_t *)file->private_data;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
if (minor >= KPIOS_MINORS)
|
if (minor >= ZPIOS_MINORS)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
ASSERT(info);
|
ASSERT(info);
|
||||||
|
@ -1183,13 +1183,13 @@ out:
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static loff_t kpios_seek(struct file *file, loff_t offset, int origin)
|
static loff_t zpios_seek(struct file *file, loff_t offset, int origin)
|
||||||
{
|
{
|
||||||
unsigned int minor = iminor(file->f_dentry->d_inode);
|
unsigned int minor = iminor(file->f_dentry->d_inode);
|
||||||
kpios_info_t *info = (kpios_info_t *)file->private_data;
|
zpios_info_t *info = (zpios_info_t *)file->private_data;
|
||||||
int rc = -EINVAL;
|
int rc = -EINVAL;
|
||||||
|
|
||||||
if (minor >= KPIOS_MINORS)
|
if (minor >= ZPIOS_MINORS)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
ASSERT(info);
|
ASSERT(info);
|
||||||
|
@ -1219,73 +1219,73 @@ static loff_t kpios_seek(struct file *file, loff_t offset, int origin)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations kpios_fops = {
|
static struct file_operations zpios_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = kpios_open,
|
.open = zpios_open,
|
||||||
.release = kpios_release,
|
.release = zpios_release,
|
||||||
.ioctl = kpios_ioctl,
|
.ioctl = zpios_ioctl,
|
||||||
.read = kpios_read,
|
.read = zpios_read,
|
||||||
.write = kpios_write,
|
.write = zpios_write,
|
||||||
.llseek = kpios_seek,
|
.llseek = zpios_seek,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct cdev kpios_cdev = {
|
static struct cdev zpios_cdev = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.kobj = { .name = "kpios", },
|
.kobj = { .name = "zpios", },
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init
|
static int __init
|
||||||
kpios_init(void)
|
zpios_init(void)
|
||||||
{
|
{
|
||||||
dev_t dev;
|
dev_t dev;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
dev = MKDEV(KPIOS_MAJOR, 0);
|
dev = MKDEV(ZPIOS_MAJOR, 0);
|
||||||
if ((rc = register_chrdev_region(dev, KPIOS_MINORS, "kpios")))
|
if ((rc = register_chrdev_region(dev, ZPIOS_MINORS, "zpios")))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* Support for registering a character driver */
|
/* Support for registering a character driver */
|
||||||
cdev_init(&kpios_cdev, &kpios_fops);
|
cdev_init(&zpios_cdev, &zpios_fops);
|
||||||
if ((rc = cdev_add(&kpios_cdev, dev, KPIOS_MINORS))) {
|
if ((rc = cdev_add(&zpios_cdev, dev, ZPIOS_MINORS))) {
|
||||||
printk(KERN_ERR "kpios: Error adding cdev, %d\n", rc);
|
printk(KERN_ERR "ZPIOS: Error adding cdev, %d\n", rc);
|
||||||
kobject_put(&kpios_cdev.kobj);
|
kobject_put(&zpios_cdev.kobj);
|
||||||
unregister_chrdev_region(dev, KPIOS_MINORS);
|
unregister_chrdev_region(dev, ZPIOS_MINORS);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Support for udev make driver info available in sysfs */
|
/* Support for udev make driver info available in sysfs */
|
||||||
kpios_class = class_create(THIS_MODULE, "kpios");
|
zpios_class = class_create(THIS_MODULE, "zpios");
|
||||||
if (IS_ERR(kpios_class)) {
|
if (IS_ERR(zpios_class)) {
|
||||||
rc = PTR_ERR(kpios_class);
|
rc = PTR_ERR(zpios_class);
|
||||||
printk(KERN_ERR "kpios: Error creating kpios class, %d\n", rc);
|
printk(KERN_ERR "ZPIOS: Error creating zpios class, %d\n", rc);
|
||||||
cdev_del(&kpios_cdev);
|
cdev_del(&zpios_cdev);
|
||||||
unregister_chrdev_region(dev, KPIOS_MINORS);
|
unregister_chrdev_region(dev, ZPIOS_MINORS);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
class_device_create(kpios_class, NULL, dev, NULL, "kpios");
|
class_device_create(zpios_class, NULL, dev, NULL, "zpios");
|
||||||
return 0;
|
return 0;
|
||||||
error:
|
error:
|
||||||
printk(KERN_ERR "kpios: Error registering kpios device, %d\n", rc);
|
printk(KERN_ERR "ZPIOS: Error registering zpios device, %d\n", rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
kpios_fini(void)
|
zpios_fini(void)
|
||||||
{
|
{
|
||||||
dev_t dev = MKDEV(KPIOS_MAJOR, 0);
|
dev_t dev = MKDEV(ZPIOS_MAJOR, 0);
|
||||||
|
|
||||||
class_device_destroy(kpios_class, dev);
|
class_device_destroy(zpios_class, dev);
|
||||||
class_destroy(kpios_class);
|
class_destroy(zpios_class);
|
||||||
|
|
||||||
cdev_del(&kpios_cdev);
|
cdev_del(&zpios_cdev);
|
||||||
unregister_chrdev_region(dev, KPIOS_MINORS);
|
unregister_chrdev_region(dev, ZPIOS_MINORS);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(kpios_init);
|
module_init(zpios_init);
|
||||||
module_exit(kpios_fini);
|
module_exit(zpios_fini);
|
||||||
|
|
||||||
MODULE_AUTHOR("LLNL / Sun");
|
MODULE_AUTHOR("LLNL / Sun");
|
||||||
MODULE_DESCRIPTION("Kernel PIOS implementation");
|
MODULE_DESCRIPTION("Kernel PIOS implementation");
|
||||||
|
|
|
@ -43,7 +43,7 @@ for PID_FILE in `ls -r --sort=time --time=ctime ${RUN_LOG_DIR}/${RUN_ID}/pids-[0
|
||||||
txg_timelimit) IDX=15;;
|
txg_timelimit) IDX=15;;
|
||||||
arc_reclaim) IDX=16;;
|
arc_reclaim) IDX=16;;
|
||||||
l2arc_feed) IDX=17;;
|
l2arc_feed) IDX=17;;
|
||||||
kpios_io) IDX=18;;
|
zpios_io) IDX=18;;
|
||||||
*) continue;;
|
*) continue;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ for PID_FILE in `ls -r --sort=time --time=ctime ${RUN_LOG_DIR}/${RUN_ID}/pids-[0
|
||||||
"zio_req_rd, zio_irq_rd, zio_req_wr, zio_irq_wr, " \
|
"zio_req_rd, zio_irq_rd, zio_req_wr, zio_irq_wr, " \
|
||||||
"zio_req_fr, zio_irq_fr, zio_req_cm, zio_irq_cm, " \
|
"zio_req_fr, zio_irq_fr, zio_req_cm, zio_irq_cm, " \
|
||||||
"zio_req_ctl, zio_irq_ctl, txg_quiesce, txg_sync, " \
|
"zio_req_ctl, zio_irq_ctl, txg_quiesce, txg_sync, " \
|
||||||
"txg_timelimit, arc_reclaim, l2arc_feed, kpios_io, " \
|
"txg_timelimit, arc_reclaim, l2arc_feed, zpios_io, " \
|
||||||
"idle"
|
"idle"
|
||||||
HEADER=0
|
HEADER=0
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -21,7 +21,7 @@ POLL_INTERVAL=2.99
|
||||||
# txg_timelimit_t
|
# txg_timelimit_t
|
||||||
# arc_reclaim_thr
|
# arc_reclaim_thr
|
||||||
# l2arc_feed_thre
|
# l2arc_feed_thre
|
||||||
# kpios_io/#
|
# zpios_io/#
|
||||||
|
|
||||||
ZIO_TASKQ_PIDS=()
|
ZIO_TASKQ_PIDS=()
|
||||||
ZIO_REQ_NUL_PIDS=()
|
ZIO_REQ_NUL_PIDS=()
|
||||||
|
@ -44,7 +44,7 @@ TXG_TIMELIMIT_PIDS=()
|
||||||
ARC_RECLAIM_PIDS=()
|
ARC_RECLAIM_PIDS=()
|
||||||
L2ARC_FEED_PIDS=()
|
L2ARC_FEED_PIDS=()
|
||||||
|
|
||||||
KPIOS_IO_PIDS=()
|
ZPIOS_IO_PIDS=()
|
||||||
|
|
||||||
show_pids() {
|
show_pids() {
|
||||||
echo "* zio_taskq: { ${ZIO_TASKQ_PIDS[@]} } = ${#ZIO_TASKQ_PIDS[@]}"
|
echo "* zio_taskq: { ${ZIO_TASKQ_PIDS[@]} } = ${#ZIO_TASKQ_PIDS[@]}"
|
||||||
|
@ -65,7 +65,7 @@ show_pids() {
|
||||||
echo "* txg_timelimit: { ${TXG_TIMELIMIT_PIDS[@]} } = ${#TXG_TIMELIMIT_PIDS[@]}"
|
echo "* txg_timelimit: { ${TXG_TIMELIMIT_PIDS[@]} } = ${#TXG_TIMELIMIT_PIDS[@]}"
|
||||||
echo "* arc_reclaim: { ${ARC_RECLAIM_PIDS[@]} } = ${#ARC_RECLAIM_PIDS[@]}"
|
echo "* arc_reclaim: { ${ARC_RECLAIM_PIDS[@]} } = ${#ARC_RECLAIM_PIDS[@]}"
|
||||||
echo "* l2arc_feed: { ${L2ARC_FEED_PIDS[@]} } = ${#L2ARC_FEED_PIDS[@]}"
|
echo "* l2arc_feed: { ${L2ARC_FEED_PIDS[@]} } = ${#L2ARC_FEED_PIDS[@]}"
|
||||||
echo "* kpios_io: { ${KPIOS_IO_PIDS[@]} } = ${#KPIOS_IO_PIDS[@]}"
|
echo "* zpios_io: { ${ZPIOS_IO_PIDS[@]} } = ${#ZPIOS_IO_PIDS[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
check_pid() {
|
check_pid() {
|
||||||
|
@ -154,13 +154,13 @@ aquire_pids() {
|
||||||
"$(echo "${L2ARC_FEED_PIDS[@]}")"` )
|
"$(echo "${L2ARC_FEED_PIDS[@]}")"` )
|
||||||
done
|
done
|
||||||
|
|
||||||
# Wait for kpios_io threads to start
|
# Wait for zpios_io threads to start
|
||||||
kill -s SIGHUP ${PPID}
|
kill -s SIGHUP ${PPID}
|
||||||
echo "* Waiting for kpios_io threads to start"
|
echo "* Waiting for zpios_io threads to start"
|
||||||
while [ ${RUN_DONE} -eq 0 ]; do
|
while [ ${RUN_DONE} -eq 0 ]; do
|
||||||
KPIOS_IO_PIDS=( `ps ax | grep kpios_io | grep -v grep | \
|
ZPIOS_IO_PIDS=( `ps ax | grep zpios_io | grep -v grep | \
|
||||||
sed 's/^ *//g' | cut -f1 -d' '` )
|
sed 's/^ *//g' | cut -f1 -d' '` )
|
||||||
if [ ${#KPIOS_IO_PIDS[@]} -gt 0 ]; then
|
if [ ${#ZPIOS_IO_PIDS[@]} -gt 0 ]; then
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
|
@ -189,7 +189,7 @@ log_pids() {
|
||||||
${TXG_TIMELIMIT_PIDS[@]} \
|
${TXG_TIMELIMIT_PIDS[@]} \
|
||||||
${ARC_RECLAIM_PIDS[@]} \
|
${ARC_RECLAIM_PIDS[@]} \
|
||||||
${L2ARC_FEED_PIDS[@]} \
|
${L2ARC_FEED_PIDS[@]} \
|
||||||
${KPIOS_IO_PIDS[@]} )
|
${ZPIOS_IO_PIDS[@]} )
|
||||||
|
|
||||||
while [ ${RUN_DONE} -eq 0 ]; do
|
while [ ${RUN_DONE} -eq 0 ]; do
|
||||||
NOW=`date +%s.%N`
|
NOW=`date +%s.%N`
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
prog=zpios.sh
|
prog=zpios.sh
|
||||||
. ../.script-config
|
. ../.script-config
|
||||||
|
|
||||||
SPL_OPTIONS="spl=spl_debug_mask=-1 spl_debug_subsys=-1 spl_debug_mb=10 ${1}"
|
SPL_OPTIONS="spl=spl_debug_mask=0 spl_debug_subsys=0 spl_debug_mb=-1 ${1}"
|
||||||
ZFS_OPTIONS="zfs=${2}"
|
ZFS_OPTIONS="zfs=${2}"
|
||||||
ZPIOS_OPTIONS=$3
|
ZPIOS_OPTIONS=$3
|
||||||
PROFILE_ZPIOS_LOGS=$4
|
PROFILE_ZPIOS_LOGS=$4
|
||||||
|
|
Loading…
Reference in New Issue