linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] blk-cgroup: don't account iostat for root cgroup
@ 2020-06-01 23:11 Boris Burkov
  2020-06-02  2:51 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Boris Burkov @ 2020-06-01 23:11 UTC (permalink / raw)
  To: Tejun Heo, Jens Axboe
  Cc: cgroups, linux-block, linux-kernel, kernel-team, Boris Burkov

This data is never flushed by rstat, so it is never used. We shouldn't
bother collecting it. We can access global disk stats to compute io
statistics for the root cgroup.

Signed-off-by: Boris Burkov <boris@bur.io>
---
 include/linux/blk-cgroup.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h
index a57ebe2f00ab..e9de4ec07182 100644
--- a/include/linux/blk-cgroup.h
+++ b/include/linux/blk-cgroup.h
@@ -591,7 +591,7 @@ static inline bool blkcg_bio_issue_check(struct request_queue *q,
 
 	throtl = blk_throtl_bio(q, blkg, bio);
 
-	if (!throtl) {
+	if (blkg->parent && !throtl) {
 		struct blkg_iostat_set *bis;
 		int rwd, cpu;
 
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] blk-cgroup: don't account iostat for root cgroup
  2020-06-01 23:11 [PATCH] blk-cgroup: don't account iostat for root cgroup Boris Burkov
@ 2020-06-02  2:51 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2020-06-02  2:51 UTC (permalink / raw)
  To: Boris Burkov; +Cc: Jens Axboe, cgroups, linux-block, linux-kernel, kernel-team

On Mon, Jun 01, 2020 at 04:11:41PM -0700, Boris Burkov wrote:
> This data is never flushed by rstat, so it is never used. We shouldn't
> bother collecting it. We can access global disk stats to compute io
> statistics for the root cgroup.
> 
> Signed-off-by: Boris Burkov <boris@bur.io>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-02  2:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-01 23:11 [PATCH] blk-cgroup: don't account iostat for root cgroup Boris Burkov
2020-06-02  2:51 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).