From: Krishna Kanth Reddy <krish.reddy@samsung.com>
To: axboe@kernel.dk
Cc: fio@vger.kernel.org, Ankit Kumar <ankit.kumar@samsung.com>,
Krishna Kanth Reddy <krish.reddy@samsung.com>
Subject: [PATCH 2/9] Introducing new offsets for the copy operation.
Date: Tue, 1 Dec 2020 17:10:27 +0530 [thread overview]
Message-ID: <20201201114034.8307-3-krish.reddy@samsung.com> (raw)
In-Reply-To: <20201201114034.8307-1-krish.reddy@samsung.com>
From: Ankit Kumar <ankit.kumar@samsung.com>
Signed-off-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
---
options.c | 11 ++++++++++-
parse.c | 28 ++++++++++++++++++++++++++++
parse.h | 2 ++
3 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/options.c b/options.c
index 1e91b3e9..f68ae8c2 100644
--- a/options.c
+++ b/options.c
@@ -2154,6 +2154,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
.off1 = offsetof(struct thread_options, bs[DDIR_READ]),
.off2 = offsetof(struct thread_options, bs[DDIR_WRITE]),
.off3 = offsetof(struct thread_options, bs[DDIR_TRIM]),
+ .off4 = offsetof(struct thread_options, bs[DDIR_COPY]),
.minval = 1,
.help = "Block size unit",
.def = "4096",
@@ -2171,6 +2172,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
.off1 = offsetof(struct thread_options, ba[DDIR_READ]),
.off2 = offsetof(struct thread_options, ba[DDIR_WRITE]),
.off3 = offsetof(struct thread_options, ba[DDIR_TRIM]),
+ .off4 = offsetof(struct thread_options, ba[DDIR_COPY]),
.minval = 1,
.help = "IO block offset alignment",
.parent = "rw",
@@ -2190,6 +2192,8 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
.off4 = offsetof(struct thread_options, max_bs[DDIR_WRITE]),
.off5 = offsetof(struct thread_options, min_bs[DDIR_TRIM]),
.off6 = offsetof(struct thread_options, max_bs[DDIR_TRIM]),
+ .off7 = offsetof(struct thread_options, min_bs[DDIR_COPY]),
+ .off8 = offsetof(struct thread_options, max_bs[DDIR_COPY]),
.minval = 1,
.help = "Set block size range (in more detail than bs)",
.parent = "rw",
@@ -2349,9 +2353,10 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
.off1 = offsetof(struct thread_options, perc_rand[DDIR_READ]),
.off2 = offsetof(struct thread_options, perc_rand[DDIR_WRITE]),
.off3 = offsetof(struct thread_options, perc_rand[DDIR_TRIM]),
+ .off4 = offsetof(struct thread_options, perc_rand[DDIR_COPY]),
.maxval = 100,
.help = "Percentage of seq/random mix that should be random",
- .def = "100,100,100",
+ .def = "100,100,100,100",
.interval = 5,
.inverse = "percentage_sequential",
.category = FIO_OPT_C_IO,
@@ -3579,6 +3584,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
.off1 = offsetof(struct thread_options, rate[DDIR_READ]),
.off2 = offsetof(struct thread_options, rate[DDIR_WRITE]),
.off3 = offsetof(struct thread_options, rate[DDIR_TRIM]),
+ .off4 = offsetof(struct thread_options, rate[DDIR_COPY]),
.help = "Set bandwidth rate",
.category = FIO_OPT_C_IO,
.group = FIO_OPT_G_RATE,
@@ -3591,6 +3597,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
.off1 = offsetof(struct thread_options, ratemin[DDIR_READ]),
.off2 = offsetof(struct thread_options, ratemin[DDIR_WRITE]),
.off3 = offsetof(struct thread_options, ratemin[DDIR_TRIM]),
+ .off4 = offsetof(struct thread_options, ratemin[DDIR_COPY]),
.help = "Job must meet this rate or it will be shutdown",
.parent = "rate",
.hide = 1,
@@ -3604,6 +3611,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
.off1 = offsetof(struct thread_options, rate_iops[DDIR_READ]),
.off2 = offsetof(struct thread_options, rate_iops[DDIR_WRITE]),
.off3 = offsetof(struct thread_options, rate_iops[DDIR_TRIM]),
+ .off4 = offsetof(struct thread_options, rate_iops[DDIR_COPY]),
.help = "Limit IO used to this number of IO operations/sec",
.hide = 1,
.category = FIO_OPT_C_IO,
@@ -3616,6 +3624,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
.off1 = offsetof(struct thread_options, rate_iops_min[DDIR_READ]),
.off2 = offsetof(struct thread_options, rate_iops_min[DDIR_WRITE]),
.off3 = offsetof(struct thread_options, rate_iops_min[DDIR_TRIM]),
+ .off4 = offsetof(struct thread_options, rate_iops_min[DDIR_COPY]),
.help = "Job must meet this rate or it will be shut down",
.parent = "rate_iops",
.hide = 1,
diff --git a/parse.c b/parse.c
index f4cefcf6..84d24435 100644
--- a/parse.c
+++ b/parse.c
@@ -669,6 +669,10 @@ static int __handle_option(const struct fio_option *o, const char *ptr,
if (o->off3)
val_store(ilp, ull, o->off3, 0, data, o);
}
+ if (curr == 3) {
+ if (o->off4)
+ val_store(ilp, ull, o->off4, 0, data, o);
+ }
if (!more) {
if (curr < 1) {
if (o->off2)
@@ -678,6 +682,10 @@ static int __handle_option(const struct fio_option *o, const char *ptr,
if (o->off3)
val_store(ilp, ull, o->off3, 0, data, o);
}
+ if (curr < 3) {
+ if (o->off4)
+ val_store(ilp, ull, o->off4, 0, data, o);
+ }
}
} else if (o->type == FIO_OPT_ULL) {
if (first)
@@ -690,6 +698,10 @@ static int __handle_option(const struct fio_option *o, const char *ptr,
if (o->off3)
val_store(ullp, ull, o->off3, 0, data, o);
}
+ if (curr == 3) {
+ if (o->off4)
+ val_store(ullp, ull, o->off4, 0, data, o);
+ }
if (!more) {
if (curr < 1) {
if (o->off2)
@@ -699,6 +711,10 @@ static int __handle_option(const struct fio_option *o, const char *ptr,
if (o->off3)
val_store(ullp, ull, o->off3, 0, data, o);
}
+ if (curr < 3) {
+ if (o->off4)
+ val_store(ullp, ull, o->off4, 0, data, o);
+ }
}
} else {
if (first)
@@ -879,6 +895,12 @@ static int __handle_option(const struct fio_option *o, const char *ptr,
val_store(ullp, ull2, o->off6, 0, data, o);
}
}
+ if (curr == 3) {
+ if (o->off7 && o->off8) {
+ val_store(ullp, ull1, o->off7, 0, data, o);
+ val_store(ullp, ull2, o->off8, 0, data, o);
+ }
+ }
if (!more) {
if (curr < 1) {
if (o->off3 && o->off4) {
@@ -892,6 +914,12 @@ static int __handle_option(const struct fio_option *o, const char *ptr,
val_store(ullp, ull2, o->off6, 0, data, o);
}
}
+ if (curr < 3) {
+ if (o->off7 && o->off8) {
+ val_store(ullp, ull1, o->off7, 0, data, o);
+ val_store(ullp, ull2, o->off8, 0, data, o);
+ }
+ }
}
}
diff --git a/parse.h b/parse.h
index e6663ed4..643cd8dc 100644
--- a/parse.h
+++ b/parse.h
@@ -54,6 +54,8 @@ struct fio_option {
unsigned int off4;
unsigned int off5;
unsigned int off6;
+ unsigned int off7;
+ unsigned int off8;
unsigned long long maxval; /* max and min value */
int minval;
double maxfp; /* max and min floating value */
--
2.17.1
next prev parent reply other threads:[~2020-12-01 11:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20201201114048epcas5p3e12de26128ce442bbe8406082eaccde9@epcas5p3.samsung.com>
2020-12-01 11:40 ` [PATCH 0/9] v1 Patchset : Simple Copy Command support Krishna Kanth Reddy
2020-12-01 11:40 ` [PATCH 1/9] Adding the necessary ddir changes to introduce copy operation Krishna Kanth Reddy
2020-12-01 11:40 ` Krishna Kanth Reddy [this message]
2020-12-01 11:40 ` [PATCH 3/9] Added support for printing of stats and estimate time for " Krishna Kanth Reddy
2020-12-01 11:40 ` [PATCH 4/9] Adding a new " Krishna Kanth Reddy
2020-12-01 11:40 ` [PATCH 5/9] Added the changes for copy operation support in FIO Krishna Kanth Reddy
2020-12-01 11:40 ` [PATCH 6/9] New ioctl based synchronous IO engine. Only supports copy command Krishna Kanth Reddy
2020-12-01 11:40 ` [PATCH 7/9] Example configuration for simple " Krishna Kanth Reddy
2020-12-01 11:40 ` [PATCH 8/9] Support copy operation for zoned block devices Krishna Kanth Reddy
2020-12-01 12:11 ` Damien Le Moal
2020-12-10 14:14 ` Krishna Kanth Reddy
2020-12-11 0:37 ` Damien Le Moal
2020-12-01 11:40 ` [PATCH 9/9] Add a new test case to test the copy operation Krishna Kanth Reddy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201201114034.8307-3-krish.reddy@samsung.com \
--to=krish.reddy@samsung.com \
--cc=ankit.kumar@samsung.com \
--cc=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.