Merge branch 'linux-zpios' into refs/top-bases/linux-zfs-branch
This commit is contained in:
commit
20989cd4f2
|
@ -45,7 +45,7 @@
|
|||
#include "zpios.h"
|
||||
|
||||
static const char short_opt[] = "t:l:h:e:n:i:j:k:o:m:q:r:c:a:b:g:s:A:B:C:"
|
||||
"L:p:xP:R:G:I:N:T:VzOHv?";
|
||||
"L:p:xP:R:G:I:N:T:VzOfHv?";
|
||||
static const struct option long_opt[] = {
|
||||
{"threadcount", required_argument, 0, 't' },
|
||||
{"threadcount_low", required_argument, 0, 'l' },
|
||||
|
@ -79,6 +79,7 @@ static const struct option long_opt[] = {
|
|||
{"verify", no_argument, 0, 'V' },
|
||||
{"zerocopy", no_argument, 0, 'z' },
|
||||
{"nowait", no_argument, 0, 'O' },
|
||||
{"noprefetch", no_argument, 0, 'f' },
|
||||
{"human-readable", no_argument, 0, 'H' },
|
||||
{"verbose", no_argument, 0, 'v' },
|
||||
{"help", no_argument, 0, '?' },
|
||||
|
@ -127,6 +128,7 @@ usage(void)
|
|||
" --verify -V\n"
|
||||
" --zerocopy -z\n"
|
||||
" --nowait -O\n"
|
||||
" --noprefetch -f\n"
|
||||
" --human-readable -H\n"
|
||||
" --verbose -v =increase verbosity\n"
|
||||
" --help -? =this help\n\n");
|
||||
|
@ -283,6 +285,9 @@ args_init(int argc, char **argv)
|
|||
case 'O': /* --nowait */
|
||||
args->flags |= DMU_WRITE_NOWAIT;
|
||||
break;
|
||||
case 'f': /* --noprefetch */
|
||||
args->flags |= DMU_READ_NOPF;
|
||||
break;
|
||||
case 'H': /* --human-readable */
|
||||
args->human_readable = 1;
|
||||
break;
|
||||
|
|
|
@ -46,14 +46,15 @@
|
|||
|
||||
#define DMU_IO 0x01
|
||||
|
||||
#define DMU_WRITE 0x01
|
||||
#define DMU_READ 0x02
|
||||
#define DMU_VERIFY 0x04
|
||||
#define DMU_REMOVE 0x08
|
||||
#define DMU_FPP 0x10
|
||||
#define DMU_WRITE_ZC 0x20 /* Incompatible with DMU_VERIFY */
|
||||
#define DMU_READ_ZC 0x40 /* Incompatible with DMU_VERIFY */
|
||||
#define DMU_WRITE_NOWAIT 0x80
|
||||
#define DMU_WRITE 0x0001
|
||||
#define DMU_READ 0x0002
|
||||
#define DMU_VERIFY 0x0004
|
||||
#define DMU_REMOVE 0x0008
|
||||
#define DMU_FPP 0x0010
|
||||
#define DMU_WRITE_ZC 0x0020 /* Incompatible w/DMU_VERIFY */
|
||||
#define DMU_READ_ZC 0x0040 /* Incompatible w/DMU_VERIFY */
|
||||
#define DMU_WRITE_NOWAIT 0x0080
|
||||
#define DMU_READ_NOPF 0x0100
|
||||
|
||||
#define ZPIOS_NAME_SIZE 16
|
||||
#define ZPIOS_PATH_SIZE 128
|
||||
|
|
|
@ -469,7 +469,10 @@ zpios_dmu_read(run_args_t *run_args, objset_t *os, uint64_t object,
|
|||
if (run_args->flags & DMU_READ_ZC)
|
||||
flags |= DMU_READ_ZEROCOPY;
|
||||
|
||||
return dmu_read_impl(os, object, offset, size, buf, flags);
|
||||
if (run_args->flags & DMU_READ_NOPF)
|
||||
flags |= DMU_READ_NO_PREFETCH;
|
||||
|
||||
return dmu_read(os, object, offset, size, buf, flags);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -50,16 +50,16 @@ zpios_survey_base() {
|
|||
|
||||
# Disable ZFS's prefetching. For some reason still not clear to me
|
||||
# current prefetching policy is quite bad for a random workload.
|
||||
# Allowint the algorithm to detect a random workload and not do
|
||||
# Allowing the algorithm to detect a random workload and not do
|
||||
# anything may be the way to address this issue.
|
||||
zpios_survey_prefetch() {
|
||||
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+prefetch"
|
||||
print_header ${TEST_NAME}
|
||||
|
||||
./zfs.sh ${VERBOSE_FLAG} \
|
||||
zfs="zfs_prefetch_disable=1" | \
|
||||
tee -a ${ZPIOS_SURVEY_LOG}
|
||||
./zpios.sh ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} | \
|
||||
-o "--noprefetch" | \
|
||||
tee -a ${ZPIOS_SURVEY_LOG}
|
||||
./zfs.sh -u ${VERBOSE_FLAG} | \
|
||||
tee -a ${ZPIOS_SURVEY_LOG}
|
||||
|
@ -144,12 +144,11 @@ zpios_survey_all() {
|
|||
print_header ${TEST_NAME}
|
||||
|
||||
./zfs.sh ${VERBOSE_FLAG} \
|
||||
zfs="zfs_prefetch_disable=1" \
|
||||
zfs="zfs_vdev_max_pending=1024" \
|
||||
zfs="zio_bulk_flags=0x100" | \
|
||||
tee -a ${ZPIOS_SURVEY_LOG}
|
||||
./zpios.sh ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} \
|
||||
-o "--zerocopy" \
|
||||
-o "--noprefetch --zerocopy" \
|
||||
-s "set checksum=off" | \
|
||||
tee -a ${ZPIOS_SURVEY_LOG}
|
||||
./zfs.sh -u ${VERBOSE_FLAG} | \
|
||||
|
|
Loading…
Reference in New Issue