[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YjGkRT+ccoZ0ZNDq@infradead.org>
Date: Wed, 16 Mar 2022 01:48:05 -0700
From: Christoph Hellwig <hch@...radead.org>
To: cgel.zte@...il.com
Cc: axboe@...nel.dk, viro@...iv.linux.org.uk, hannes@...xchg.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, akpm@...ux-foundation.org,
Yang Yang <yang.yang29@....com.cn>,
Ran Xiaokai <ran.xiaokai@....com.cn>
Subject: Re: [PATCH] block/psi: make PSI annotations of submit_bio only work
for file pages
> @@ -1035,8 +1035,9 @@ void __bio_add_page(struct bio *bio, struct page *page,
> bio->bi_iter.bi_size += len;
> bio->bi_vcnt++;
>
> - if (!bio_flagged(bio, BIO_WORKINGSET) && unlikely(PageWorkingset(page)))
> - bio_set_flag(bio, BIO_WORKINGSET);
> + if (!bio_flagged(bio, BIO_WORKINGSET_FILE) &&
> + unlikely(PageWorkingset(page)) && !PageSwapBacked(page))
> + bio_set_flag(bio, BIO_WORKINGSET_FILE);
This needs to go out of the block I/O fast path, not grow even more
checks.
Powered by blists - more mailing lists