Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch
This commit is contained in:
commit
8283120116
|
@ -45,7 +45,7 @@
|
||||||
#include "zpios.h"
|
#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:"
|
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[] = {
|
static const struct option long_opt[] = {
|
||||||
{"threadcount", required_argument, 0, 't' },
|
{"threadcount", required_argument, 0, 't' },
|
||||||
{"threadcount_low", required_argument, 0, 'l' },
|
{"threadcount_low", required_argument, 0, 'l' },
|
||||||
|
@ -79,6 +79,7 @@ static const struct option long_opt[] = {
|
||||||
{"verify", no_argument, 0, 'V' },
|
{"verify", no_argument, 0, 'V' },
|
||||||
{"zerocopy", no_argument, 0, 'z' },
|
{"zerocopy", no_argument, 0, 'z' },
|
||||||
{"nowait", no_argument, 0, 'O' },
|
{"nowait", no_argument, 0, 'O' },
|
||||||
|
{"noprefetch", no_argument, 0, 'f' },
|
||||||
{"human-readable", no_argument, 0, 'H' },
|
{"human-readable", no_argument, 0, 'H' },
|
||||||
{"verbose", no_argument, 0, 'v' },
|
{"verbose", no_argument, 0, 'v' },
|
||||||
{"help", no_argument, 0, '?' },
|
{"help", no_argument, 0, '?' },
|
||||||
|
@ -127,6 +128,7 @@ usage(void)
|
||||||
" --verify -V\n"
|
" --verify -V\n"
|
||||||
" --zerocopy -z\n"
|
" --zerocopy -z\n"
|
||||||
" --nowait -O\n"
|
" --nowait -O\n"
|
||||||
|
" --noprefetch -f\n"
|
||||||
" --human-readable -H\n"
|
" --human-readable -H\n"
|
||||||
" --verbose -v =increase verbosity\n"
|
" --verbose -v =increase verbosity\n"
|
||||||
" --help -? =this help\n\n");
|
" --help -? =this help\n\n");
|
||||||
|
@ -283,6 +285,9 @@ args_init(int argc, char **argv)
|
||||||
case 'O': /* --nowait */
|
case 'O': /* --nowait */
|
||||||
args->flags |= DMU_WRITE_NOWAIT;
|
args->flags |= DMU_WRITE_NOWAIT;
|
||||||
break;
|
break;
|
||||||
|
case 'f': /* --noprefetch */
|
||||||
|
args->flags |= DMU_READ_NOPF;
|
||||||
|
break;
|
||||||
case 'H': /* --human-readable */
|
case 'H': /* --human-readable */
|
||||||
args->human_readable = 1;
|
args->human_readable = 1;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -601,13 +601,6 @@ dmu_read(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
return (err);
|
return (err);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
dmu_read(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
|
||||||
void *buf)
|
|
||||||
{
|
|
||||||
return dmu_read_impl(os, object, offset, size, buf, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
dmu_write_impl(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
dmu_write_impl(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
const void *buf, dmu_tx_t *tx, int flags)
|
const void *buf, dmu_tx_t *tx, int flags)
|
||||||
|
@ -651,6 +644,13 @@ dmu_write_impl(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
dmu_buf_rele_array(dbp, numbufs, FTAG);
|
dmu_buf_rele_array(dbp, numbufs, FTAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
|
const void *buf, dmu_tx_t *tx)
|
||||||
|
{
|
||||||
|
dmu_write_impl(os, object, offset, size, buf, tx, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
dmu_tx_t *tx)
|
dmu_tx_t *tx)
|
||||||
|
@ -672,13 +672,6 @@ dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
dmu_buf_rele_array(dbp, numbufs, FTAG);
|
dmu_buf_rele_array(dbp, numbufs, FTAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
|
||||||
const void *buf, dmu_tx_t *tx)
|
|
||||||
{
|
|
||||||
dmu_write_impl(os, object, offset, size, buf, tx, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(_KERNEL) && defined(HAVE_UIO_RW)
|
#if defined(_KERNEL) && defined(HAVE_UIO_RW)
|
||||||
int
|
int
|
||||||
dmu_read_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size)
|
dmu_read_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size)
|
||||||
|
@ -1299,7 +1292,6 @@ dmu_fini(void)
|
||||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||||
EXPORT_SYMBOL(dmu_bonus_hold);
|
EXPORT_SYMBOL(dmu_bonus_hold);
|
||||||
EXPORT_SYMBOL(dmu_free_range);
|
EXPORT_SYMBOL(dmu_free_range);
|
||||||
EXPORT_SYMBOL(dmu_read_impl);
|
|
||||||
EXPORT_SYMBOL(dmu_read);
|
EXPORT_SYMBOL(dmu_read);
|
||||||
EXPORT_SYMBOL(dmu_write_impl);
|
EXPORT_SYMBOL(dmu_write_impl);
|
||||||
EXPORT_SYMBOL(dmu_write);
|
EXPORT_SYMBOL(dmu_write);
|
||||||
|
|
|
@ -158,8 +158,6 @@ void zfs_znode_byteswap(void *buf, size_t size);
|
||||||
*/
|
*/
|
||||||
#define DMU_MAX_ACCESS (10<<20) /* 10MB */
|
#define DMU_MAX_ACCESS (10<<20) /* 10MB */
|
||||||
#define DMU_MAX_DELETEBLKCNT (20480) /* ~5MB of indirect blocks */
|
#define DMU_MAX_DELETEBLKCNT (20480) /* ~5MB of indirect blocks */
|
||||||
#define DMU_WRITE_ZEROCOPY 0x0001
|
|
||||||
#define DMU_READ_ZEROCOPY 0x0002
|
|
||||||
|
|
||||||
#define DMU_USERUSED_OBJECT (-1ULL)
|
#define DMU_USERUSED_OBJECT (-1ULL)
|
||||||
#define DMU_GROUPUSED_OBJECT (-2ULL)
|
#define DMU_GROUPUSED_OBJECT (-2ULL)
|
||||||
|
@ -481,6 +479,8 @@ int dmu_free_object(objset_t *os, uint64_t object);
|
||||||
*/
|
*/
|
||||||
#define DMU_READ_PREFETCH 0 /* prefetch */
|
#define DMU_READ_PREFETCH 0 /* prefetch */
|
||||||
#define DMU_READ_NO_PREFETCH 1 /* don't prefetch */
|
#define DMU_READ_NO_PREFETCH 1 /* don't prefetch */
|
||||||
|
#define DMU_READ_ZEROCOPY 2 /* zerocopy on read (test) */
|
||||||
|
#define DMU_WRITE_ZEROCOPY 4 /* zerocopy on write (test) */
|
||||||
int dmu_read(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
int dmu_read(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
void *buf, uint32_t flags);
|
void *buf, uint32_t flags);
|
||||||
void dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
void dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
|
||||||
|
|
|
@ -46,14 +46,15 @@
|
||||||
|
|
||||||
#define DMU_IO 0x01
|
#define DMU_IO 0x01
|
||||||
|
|
||||||
#define DMU_WRITE 0x01
|
#define DMU_WRITE 0x0001
|
||||||
#define DMU_READ 0x02
|
#define DMU_READ 0x0002
|
||||||
#define DMU_VERIFY 0x04
|
#define DMU_VERIFY 0x0004
|
||||||
#define DMU_REMOVE 0x08
|
#define DMU_REMOVE 0x0008
|
||||||
#define DMU_FPP 0x10
|
#define DMU_FPP 0x0010
|
||||||
#define DMU_WRITE_ZC 0x20 /* Incompatible with DMU_VERIFY */
|
#define DMU_WRITE_ZC 0x0020 /* Incompatible w/DMU_VERIFY */
|
||||||
#define DMU_READ_ZC 0x40 /* Incompatible with DMU_VERIFY */
|
#define DMU_READ_ZC 0x0040 /* Incompatible w/DMU_VERIFY */
|
||||||
#define DMU_WRITE_NOWAIT 0x80
|
#define DMU_WRITE_NOWAIT 0x0080
|
||||||
|
#define DMU_READ_NOPF 0x0100
|
||||||
|
|
||||||
#define ZPIOS_NAME_SIZE 16
|
#define ZPIOS_NAME_SIZE 16
|
||||||
#define ZPIOS_PATH_SIZE 128
|
#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)
|
if (run_args->flags & DMU_READ_ZC)
|
||||||
flags |= DMU_READ_ZEROCOPY;
|
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
|
static int
|
||||||
|
|
|
@ -50,16 +50,16 @@ zpios_survey_base() {
|
||||||
|
|
||||||
# Disable ZFS's prefetching. For some reason still not clear to me
|
# Disable ZFS's prefetching. For some reason still not clear to me
|
||||||
# current prefetching policy is quite bad for a random workload.
|
# 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.
|
# anything may be the way to address this issue.
|
||||||
zpios_survey_prefetch() {
|
zpios_survey_prefetch() {
|
||||||
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+prefetch"
|
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+prefetch"
|
||||||
print_header ${TEST_NAME}
|
print_header ${TEST_NAME}
|
||||||
|
|
||||||
./zfs.sh ${VERBOSE_FLAG} \
|
./zfs.sh ${VERBOSE_FLAG} \
|
||||||
zfs="zfs_prefetch_disable=1" | \
|
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zpios.sh ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} | \
|
./zpios.sh ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} | \
|
||||||
|
-o "--noprefetch" | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zfs.sh -u ${VERBOSE_FLAG} | \
|
./zfs.sh -u ${VERBOSE_FLAG} | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
|
@ -144,12 +144,11 @@ zpios_survey_all() {
|
||||||
print_header ${TEST_NAME}
|
print_header ${TEST_NAME}
|
||||||
|
|
||||||
./zfs.sh ${VERBOSE_FLAG} \
|
./zfs.sh ${VERBOSE_FLAG} \
|
||||||
zfs="zfs_prefetch_disable=1" \
|
|
||||||
zfs="zfs_vdev_max_pending=1024" \
|
zfs="zfs_vdev_max_pending=1024" \
|
||||||
zfs="zio_bulk_flags=0x100" | \
|
zfs="zio_bulk_flags=0x100" | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zpios.sh ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} \
|
./zpios.sh ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} \
|
||||||
-o "--zerocopy" \
|
-o "--noprefetch --zerocopy" \
|
||||||
-s "set checksum=off" | \
|
-s "set checksum=off" | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zfs.sh -u ${VERBOSE_FLAG} | \
|
./zfs.sh -u ${VERBOSE_FLAG} | \
|
||||||
|
|
Loading…
Reference in New Issue