summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Gasparini <stephane.gasparini@linux.intel.com>2016-02-09 17:07:38 +0100
committerDavide Garberi <dade.garberi@gmail.com>2022-07-27 18:58:40 +0200
commita3338ffae56bad7e310b0110482ff237727472ee (patch)
treea5cd9d4301c5450675bce073536b1caab50ff9a5
parent17d411ef9b3e02b37192c7ca2efb0026c5d5b0ad (diff)
kernel/fs: fix I/O wait not accounted for RW O_DSYNC
When a process is doing Random Write with O_DSYNC flag the I/O wait are not accounted in the kernel (get_cpu_iowait_time_us). This is preventing the governor or the cpufreq driver to account for I/O wait and thus use the right pstate Signed-off-by: Stephane Gasparini <stephane.gasparini@linux.intel.com> Signed-off-by: Philippe Longepe <philippe.longepe@linux.intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--block/bio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bio.c b/block/bio.c
index 13526f39d1ce..f01b82325194 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -887,7 +887,7 @@ int submit_bio_wait(int rw, struct bio *bio)
bio->bi_private = &ret;
bio->bi_end_io = submit_bio_wait_endio;
submit_bio(rw, bio);
- wait_for_completion(&ret.event);
+ wait_for_completion_io(&ret.event);
return ret.error;
}