-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- API and BM Tool changes to support general KV SSD features (key size: 4~255 / value size 0~2048KB / iterate ) - update to spdk 18.04.1 / dpdk 18.05 - bug fixes and refactorings
- Loading branch information
1 parent
c80ea2e
commit dfb875c
Showing
5,514 changed files
with
1,708,975 additions
and
446,562 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
KV_DD_LIB = ../../bin/libuio_20180905.a | ||
|
||
ifeq ($(KV_DIR),) | ||
export KV_DIR = $(shell pwd)/../../ | ||
endif | ||
|
||
|
||
# if you want specific version fio instead of system's fio, enable both below options | ||
# ex) fio-3.3 -> FIO_MAJOR_VERSION=3, FIO_MINOR_VERSION=3 | ||
#FIO_MAJOR_VERSION=3 | ||
#FIO_MINOR_VERSION=3 | ||
|
||
ifneq ($(FIO_MAJOR_VERSION), ) | ||
ifneq ($(FIO_MINOR_VERSION), ) | ||
SYSTEM_FIO_VERSION = fio-$(FIO_MAJOR_VERSION).$(FIO_MINOR_VERSION) | ||
endif | ||
endif | ||
|
||
ifeq ($(SYSTEM_FIO_VERSION), ) | ||
SYSTEM_FIO_VERSION := $(shell fio -version) | ||
VERSION_ONLY = $(shell echo $(SYSTEM_FIO_VERSION) |cut -d'-' -f 2) | ||
FIO_MAJOR_VERSION := $(shell echo $(VERSION_ONLY) |cut -d'.' -f 1) | ||
FIO_MINOR_VERSION := $(shell echo $(VERSION_ONLY) |cut -d'.' -f 2) | ||
endif | ||
|
||
# if system fio does not existing | ||
ifeq ($(SYSTEM_FIO_VERSION), ) | ||
$(error fio not found) | ||
endif | ||
|
||
CURRENT_DIR=$(shell pwd) | ||
ifeq (,$(wildcard $(CURRENT_DIR)/fio/$(SYSTEM_FIO_VERSION).tar.gz)) | ||
NOT_SUPPORTED_FIO_VERSION = 1 | ||
FIO_MAJOR_VERSION = 2 | ||
FIO_MINOR_VERSION = 18 | ||
SYSTEM_FIO_VERSION = fio-$(FIO_MAJOR_VERSION).$(FIO_MINOR_VERSION) | ||
endif | ||
|
||
FIO_SOURCE_DIR := fio-$(SYSTEM_FIO_VERSION) | ||
LIBS += $(KV_DD_LIB) -lm -pthread -lrt -ldl -luuid | ||
CFLAGS += -O2 -march=native -m64 -D_GNU_SOURCE -I../../include -I../../driver/include -I$(CURRENT_DIR)/fio/$(FIO_SOURCE_DIR) -I$(KV_DIR)/include -std=gnu99 -fPIC -DFIO_MAJOR_VERSION=$(FIO_MAJOR_VERSION) -DFIO_MINOR_VERSION=$(FIO_MINOR_VERSION) | ||
override LDFLAGS += -shared -rdynamic | ||
|
||
APP = unvme2_fio_plugin | ||
C_SRCS = $(APP:%=%.c) | ||
OBJS = $(C_SRCS:.c=.o) | ||
LINK_C = $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) | ||
|
||
ifeq (,$(wildcard $(CURRENT_DIR)/fio/$(FIO_SOURCE_DIR)/config-host.h)) | ||
all: prepare $(APP) | ||
else | ||
all: $(APP) | ||
endif | ||
|
||
$(APP): $(OBJS) | ||
$(LINK_C) | ||
@cd $(CURRENT_DIR)/fio/$(FIO_SOURCE_DIR) && cp fio $(CURRENT_DIR)/$(SYSTEM_FIO_VERSION) | ||
ifdef NOT_SUPPORTED_FIO_VERSION | ||
$(info **** NOTE:: Your system's FIO version is not supported. Use default(fio-$(FIO_MAJOR_VERSION).$(FIO_MINOR_VERSION))) | ||
endif | ||
prepare: | ||
@cd $(CURRENT_DIR)/fio && tar -xvf $(SYSTEM_FIO_VERSION).tar.gz | ||
@cd $(CURRENT_DIR)/fio/$(FIO_SOURCE_DIR) && ./configure && make -j 4 | ||
clean: | ||
rm -f $(OBJS) $(APP) fio-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
#!/bin/bash | ||
|
||
#### JSON DESCRIPTION | ||
SSD_TYPE=lba | ||
|
||
#### FIO DESCRIPTION | ||
BLOCKSIZE=4k | ||
TIME_BASED=0 | ||
RAMP_TIME=0 | ||
RUNTIME=0 | ||
SIZE=10G | ||
|
||
#### DO NOT MODIFY BELOW | ||
IOENGINE=./unvme2_fio_plugin | ||
JSON_CONF=./basic_test_config.json | ||
FIO_JOB_FILE=./basic_test_config.fio | ||
FIO=`ls | grep fio-` | ||
|
||
# make_json(dev_id, core_mask(, dev_id2, core_mask2)) | ||
make_json() | ||
{ | ||
if [ -f $JSON_CONF ]; then | ||
rm -f $JSON_CONF | ||
fi | ||
|
||
echo "{" > $JSON_CONF | ||
echo \"ssd_type\":\"$SSD_TYPE\", >> $JSON_CONF | ||
echo \"device_description\":"[" >> $JSON_CONF | ||
echo "{" >> $JSON_CONF | ||
echo \"dev_id\":\"$1\", >> $JSON_CONF | ||
echo \"core_mask\":\"$2\" >> $JSON_CONF | ||
if [ ! -z $3 ]; then | ||
echo "}," >> $JSON_CONF | ||
echo "{" >> $JSON_CONF | ||
echo \"dev_id\":\"$3\", >> $JSON_CONF | ||
echo \"core_mask\":\"$4\" >> $JSON_CONF | ||
fi | ||
echo "}" >> $JSON_CONF | ||
echo "]" >> $JSON_CONF | ||
echo "}" >> $JSON_CONF | ||
} | ||
|
||
# make_fio_description(numjobs, device_bdf(, device_bdf2)) | ||
make_fio_description() | ||
{ | ||
if [ -f $FIO_JOB_FILE ]; then | ||
rm -f $FIO_JOB_FILE | ||
fi | ||
|
||
echo "[global]" > $FIO_JOB_FILE | ||
echo "ioengine=$IOENGINE" >> $FIO_JOB_FILE | ||
echo "json_path=$JSON_CONF" >> $FIO_JOB_FILE | ||
echo "size=$SIZE" >> $FIO_JOB_FILE | ||
echo "time_based=$TIME_BASED" >> $FIO_JOB_FILE | ||
echo "ramp_time=$RAMP_TIME" >> $FIO_JOB_FILE | ||
echo "runtime=$RUNTIME" >> $FIO_JOB_FILE | ||
echo "blocksize=$BLOCKSIZE" >> $FIO_JOB_FILE | ||
echo "thread=1" >> $FIO_JOB_FILE | ||
echo "direct=1" >> $FIO_JOB_FILE | ||
echo "group_reporting=1" >> $FIO_JOB_FILE | ||
echo "verify=0" >> $FIO_JOB_FILE | ||
echo "norandommap=1" >> $FIO_JOB_FILE | ||
|
||
echo "[test0]" >> $FIO_JOB_FILE | ||
FILE_LEN=${#2} | ||
if [ $FILE_LEN -le 12 ]; then | ||
echo "filename=`echo $2 | sed -e s/:/./g`" >> $FIO_JOB_FILE | ||
else | ||
echo "filename=$2" >> $FIO_JOB_FILE | ||
fi | ||
echo "numjobs=$1" >> $FIO_JOB_FILE | ||
if [ ! -z $3 ]; then | ||
echo "[test1]" >> $FIO_JOB_FILE | ||
echo "filename=`echo $3 | sed -e s/:/./g`" >> $FIO_JOB_FILE | ||
echo "numjobs=$1" >> $FIO_JOB_FILE | ||
fi | ||
} | ||
|
||
# run_fio() | ||
run_fio() | ||
{ | ||
for OP in "write" "read" | ||
do | ||
for IODEPTH in 1 4 16 64 256 | ||
do | ||
echo "[OP: $OP IODEPTH: $IODEPTH]" | ||
./$FIO --readwrite=$OP --iodepth=$IODEPTH $FIO_JOB_FILE | ||
done | ||
done | ||
} | ||
|
||
|
||
|
||
if [ -z $FIO ];then | ||
echo "Please install FIO and uNVMe FIO plugin first" | ||
exit 0 | ||
fi | ||
|
||
if [ -z $1 ]; then | ||
echo "Please specify devices(max 2)" | ||
echo "e.g) ./basic_validation.sh 0000:01:00.0" | ||
echo " ./basic_validation.sh 0000:01:00.0 0000:02:00.0" | ||
exit 0 | ||
fi | ||
|
||
DEVICE_BDF=$1 | ||
if [ ! -z $2 ]; then | ||
DEVICE_BDF2=$2 | ||
fi | ||
|
||
#======================= Single Device ========================= | ||
# Device : Job = 1 : 1 | ||
CORE_MASK=0x1 | ||
NUMJOBS=1 | ||
make_json $DEVICE_BDF $CORE_MASK | ||
make_fio_description $NUMJOBS $DEVICE_BDF | ||
run_fio | ||
|
||
# 1 : N | ||
CORE_MASK=0xF | ||
NUMJOBS=4 | ||
make_json $DEVICE_BDF $CORE_MASK | ||
make_fio_description $NUMJOBS $DEVICE_BDF | ||
run_fio | ||
#=============================================================== | ||
|
||
if [ -z $DEVICE_BDF2 ]; then | ||
exit 0 | ||
fi | ||
|
||
#======================= Multiple Devices ====================== | ||
# Device : Job = N : 1 | ||
CORE_MASK=0x1 | ||
CORE_MASK2=0x1 | ||
NUMJOBS=1 | ||
FILENAME="`echo $DEVICE_BDF | sed -e s/:/./g`:`echo $DEVICE_BDF2 | sed -e s/:/./g`" | ||
make_json $DEVICE_BDF $CORE_MASK $DEVICE_BDF2 $CORE_MASK2 | ||
make_fio_description $NUMJOBS $FILENAME | ||
run_fio | ||
|
||
# N : N | ||
CORE_MASK=0x1 | ||
CORE_MASK2=0x2 | ||
NUMJOBS=1 | ||
make_json $DEVICE_BDF $CORE_MASK $DEVICE_BDF2 $CORE_MASK2 | ||
make_fio_description $NUMJOBS $DEVICE_BDF $DEVICE_BDF2 | ||
run_fio | ||
|
||
# N : M*N | ||
CORE_MASK=0xF | ||
CORE_MASK2=0xF0 | ||
NUMJOBS=4 | ||
make_json $DEVICE_BDF $CORE_MASK $DEVICE_BDF2 $CORE_MASK2 | ||
make_fio_description $NUMJOBS $DEVICE_BDF $DEVICE_BDF2 | ||
run_fio | ||
#=============================================================== | ||
|
||
rm -f $JSON_CONF | ||
rm -f $FIO_JOB_FILE |
Oops, something went wrong.