summaryrefslogtreecommitdiff
path: root/mm/page_io.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2018-07-03 11:14:53 -0400
committerJens Axboe <axboe@kernel.dk>2018-07-09 09:07:54 -0600
commit0d1e0c7cd5909d6c6aa0957179318e13fcca971a (patch)
tree891b19b5a5c21e0a9daddcf281892184113265dc /mm/page_io.c
parent903d23f0a354f226fa78f1c1c34b60aaf992e812 (diff)
downloadlwn-0d1e0c7cd5909d6c6aa0957179318e13fcca971a.tar.gz
lwn-0d1e0c7cd5909d6c6aa0957179318e13fcca971a.zip
blk: introduce REQ_SWAP
Just like REQ_META, it's important to know the IO coming down is swap in order to guard against potential IO priority inversion issues with cgroups. Add REQ_SWAP and use it for all swap IO, and add it to our bio_issue_as_root_blkg helper. Signed-off-by: Josef Bacik <jbacik@fb.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'mm/page_io.c')
-rw-r--r--mm/page_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_io.c b/mm/page_io.c
index b41cf9644585..a552cb37e220 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -338,7 +338,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
ret = -ENOMEM;
goto out;
}
- bio->bi_opf = REQ_OP_WRITE | wbc_to_write_flags(wbc);
+ bio->bi_opf = REQ_OP_WRITE | REQ_SWAP | wbc_to_write_flags(wbc);
count_swpout_vm_event(page);
set_page_writeback(page);
unlock_page(page);