mmc: card: Add long sequential read test to test-iosched

Long sequential read test measures read throughput
at the driver level by reading large requests sequentially.

Change-Id: I3b6d685930e1d0faceabbc7d20489111734cc9d4
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
[merez@codeaurora.org: Fix conflicts as BKOPS tests were removed]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora.org: Drop changes to mmc_block_test.c]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
This commit is contained in:
Lee Susman 2014-12-04 00:11:56 +02:00 committed by David Keitel
parent a98628c1c4
commit 0162f826f3
2 changed files with 9 additions and 1 deletions

View file

@ -95,6 +95,9 @@ static void check_test_completion(void)
return; return;
} }
ptd->test_info.test_duration = jiffies -
ptd->test_info.test_duration;
test_pr_info("%s: Test is completed", __func__); test_pr_info("%s: Test is completed", __func__);
test_iosched_mark_test_completion(); test_iosched_mark_test_completion();
@ -124,7 +127,7 @@ static void end_test_req(struct request *rq, int err)
test_rq = (struct test_request *)rq->elv.priv[0]; test_rq = (struct test_request *)rq->elv.priv[0];
BUG_ON(!test_rq); BUG_ON(!test_rq);
test_pr_info("%s: request %d completed, err=%d", test_pr_debug("%s: request %d completed, err=%d",
__func__, test_rq->req_id, err); __func__, test_rq->req_id, err);
test_rq->req_completed = true; test_rq->req_completed = true;
@ -671,6 +674,7 @@ int test_iosched_start_test(struct test_info *t_info)
goto error; goto error;
} }
ptd->test_info.test_duration = jiffies;
ret = run_test(ptd); ret = run_test(ptd);
if (ret) { if (ret) {
test_pr_err("%s: failed to run the test\n", __func__); test_pr_err("%s: failed to run the test\n", __func__);
@ -680,6 +684,7 @@ int test_iosched_start_test(struct test_info *t_info)
test_pr_info("%s: Waiting for the test completion", __func__); test_pr_info("%s: Waiting for the test completion", __func__);
wait_event(ptd->wait_q, ptd->test_state == TEST_COMPLETED); wait_event(ptd->wait_q, ptd->test_state == TEST_COMPLETED);
t_info->test_duration = ptd->test_info.test_duration;
del_timer_sync(&ptd->timeout_timer); del_timer_sync(&ptd->timeout_timer);
ret = check_test_result(ptd); ret = check_test_result(ptd);

View file

@ -128,6 +128,8 @@ struct test_request {
* @check_test_result_fn: Test specific test result checking * @check_test_result_fn: Test specific test result checking
* callback * callback
* @get_test_case_str_fn: Test specific function to get the test name * @get_test_case_str_fn: Test specific function to get the test name
* @test_duration: A jiffies value saved for timing
* calculations
* @data: Test specific private data * @data: Test specific private data
*/ */
struct test_info { struct test_info {
@ -138,6 +140,7 @@ struct test_info {
check_test_result_fn *check_test_result_fn; check_test_result_fn *check_test_result_fn;
post_test_fn *post_test_fn; post_test_fn *post_test_fn;
get_test_case_str_fn *get_test_case_str_fn; get_test_case_str_fn *get_test_case_str_fn;
unsigned long test_duration;
void *data; void *data;
}; };