summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_powersave.c
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@wdc.com>2018-11-20 10:52:38 +0900
committerJens Axboe <axboe@kernel.dk>2018-11-19 19:03:50 -0700
commit20578bdfd0418efb11ec316229e670d085cd574a (patch)
treeda06d71830298114eafa0e4d68473a709f1770c7 /drivers/cpufreq/cpufreq_powersave.c
parent668ffc03418bc779f699797c72ecf968cd6525a9 (diff)
downloadtalos-op-linux-20578bdfd0418efb11ec316229e670d085cd574a.tar.gz
talos-op-linux-20578bdfd0418efb11ec316229e670d085cd574a.zip
block: Initialize BIO I/O priority early
For the synchronous I/O path case (read(), write() etc system calls), a BIO I/O priority is not initialized until the execution of blk_init_request_from_bio() when the BIO is submitted and a request initialized for the BIO execution. This is due to the ki_ioprio field of the struct kiocb defined on stack being always initialized to IOPRIO_CLASS_NONE, regardless of the calling process I/O context ioprio value set with ioprio_set(). This late initialization can result in the BIO being merged to pending requests even when the I/O priorities differ. Fix this by initializing the ki_iopriority field of on stack struct kiocb using the get_current_ioprio() helper, ensuring that all BIOs allocated and submitted for the system call execution see the correct intended I/O priority early. With this, since a BIO I/O priority is always set to the intended effective value for both the sync and async path, blk_init_request_from_bio() can be simplified. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Adam Manzanares <adam.manzanares@wdc.com> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/cpufreq/cpufreq_powersave.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud