All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iocost: treat as root level when parents are activated
@ 2019-11-11  7:37 Jiufei Xue
  2019-11-11 16:25 ` Tejun Heo
  0 siblings, 1 reply; 4+ messages in thread
From: Jiufei Xue @ 2019-11-11  7:37 UTC (permalink / raw)
  To: axboe, tj; +Cc: cgroups, linux-block, joseph.qi, Jiufei Xue

Internal nodes that issued IOs are treated as root when leaves are
activated. However, leaf nodes can still be activated when internal
nodes are active, leaving the sum of hweights exceeds HWEIGHT_WHOLE.

I think we should also treat the leaf nodes as root while leaf-only
constraint broken.

Signed-off-by: Jiufei Xue <jiufei.xue@linux.alibaba.com>
---
 block/blk-iocost.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index a7ed434..d3ca6e8 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -1057,8 +1057,8 @@ static bool iocg_activate(struct ioc_gq *iocg, struct ioc_now *now)
 	atomic64_set(&iocg->active_period, cur_period);
 
 	/* already activated or breaking leaf-only constraint? */
-	for (i = iocg->level; i > 0; i--)
-		if (!list_empty(&iocg->active_list))
+	for (i = iocg->level - 1; i > 0; i--)
+		if (!list_empty(&iocg->ancestors[i]->active_list))
 			goto fail_unlock;
 	if (iocg->child_active_sum)
 		goto fail_unlock;
-- 
1.8.3.1


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

end of thread, other threads:[~2019-11-12 15:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-11  7:37 [PATCH] iocost: treat as root level when parents are activated Jiufei Xue
2019-11-11 16:25 ` Tejun Heo
2019-11-12  1:38   ` Jiufei Xue
2019-11-12 15:31     ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.