mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 01:21:58 +00:00
blkcg: associate a blkg for pages being evicted by swap
A prior patch in this series added blkg association to bios issued by cgroups. There are two other paths that we want to attribute work back to the appropriate cgroup: swap and writeback. Here we modify the way swap tags bios to include the blkg. Writeback will be tackle in the next patch. Signed-off-by: Dennis Zhou <dennis@kernel.org> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
e439bedf6b
commit
6a7f6d86a5
3 changed files with 42 additions and 28 deletions
|
@ -505,10 +505,10 @@ do { \
|
|||
disk_devt((bio)->bi_disk)
|
||||
|
||||
#if defined(CONFIG_MEMCG) && defined(CONFIG_BLK_CGROUP)
|
||||
int bio_associate_blkcg_from_page(struct bio *bio, struct page *page);
|
||||
void bio_associate_blkg_from_page(struct bio *bio, struct page *page);
|
||||
#else
|
||||
static inline int bio_associate_blkcg_from_page(struct bio *bio,
|
||||
struct page *page) { return 0; }
|
||||
static inline void bio_associate_blkg_from_page(struct bio *bio,
|
||||
struct page *page) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BLK_CGROUP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue