mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 14:40:12 -04:00
Merge tag 'block-5.18-2022-04-29' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: - Revert of a patch that caused timestamp issues (Tejun) - iocost warning fix (Tejun) - bfq warning fix (Jan) * tag 'block-5.18-2022-04-29' of git://git.kernel.dk/linux-block: bfq: Fix warning in bfqq_request_over_limit() Revert "block: inherit request start time from bio for BLK_CGROUP" iocost: don't reset the inuse weight of under-weighted debtors
This commit is contained in:
@@ -569,7 +569,7 @@ static bool bfqq_request_over_limit(struct bfq_queue *bfqq, int limit)
|
||||
struct bfq_entity *entity = &bfqq->entity;
|
||||
struct bfq_entity *inline_entities[BFQ_LIMIT_INLINE_DEPTH];
|
||||
struct bfq_entity **entities = inline_entities;
|
||||
int depth, level;
|
||||
int depth, level, alloc_depth = BFQ_LIMIT_INLINE_DEPTH;
|
||||
int class_idx = bfqq->ioprio_class - 1;
|
||||
struct bfq_sched_data *sched_data;
|
||||
unsigned long wsum;
|
||||
@@ -578,15 +578,21 @@ static bool bfqq_request_over_limit(struct bfq_queue *bfqq, int limit)
|
||||
if (!entity->on_st_or_in_serv)
|
||||
return false;
|
||||
|
||||
retry:
|
||||
spin_lock_irq(&bfqd->lock);
|
||||
/* +1 for bfqq entity, root cgroup not included */
|
||||
depth = bfqg_to_blkg(bfqq_group(bfqq))->blkcg->css.cgroup->level + 1;
|
||||
if (depth > BFQ_LIMIT_INLINE_DEPTH) {
|
||||
if (depth > alloc_depth) {
|
||||
spin_unlock_irq(&bfqd->lock);
|
||||
if (entities != inline_entities)
|
||||
kfree(entities);
|
||||
entities = kmalloc_array(depth, sizeof(*entities), GFP_NOIO);
|
||||
if (!entities)
|
||||
return false;
|
||||
alloc_depth = depth;
|
||||
goto retry;
|
||||
}
|
||||
|
||||
spin_lock_irq(&bfqd->lock);
|
||||
sched_data = entity->sched_data;
|
||||
/* Gather our ancestors as we need to traverse them in reverse order */
|
||||
level = 0;
|
||||
|
||||
@@ -2322,7 +2322,17 @@ static void ioc_timer_fn(struct timer_list *timer)
|
||||
iocg->hweight_donating = hwa;
|
||||
iocg->hweight_after_donation = new_hwi;
|
||||
list_add(&iocg->surplus_list, &surpluses);
|
||||
} else {
|
||||
} else if (!iocg->abs_vdebt) {
|
||||
/*
|
||||
* @iocg doesn't have enough to donate. Reset
|
||||
* its inuse to active.
|
||||
*
|
||||
* Don't reset debtors as their inuse's are
|
||||
* owned by debt handling. This shouldn't affect
|
||||
* donation calculuation in any meaningful way
|
||||
* as @iocg doesn't have a meaningful amount of
|
||||
* share anyway.
|
||||
*/
|
||||
TRACE_IOCG_PATH(inuse_shortage, iocg, &now,
|
||||
iocg->inuse, iocg->active,
|
||||
iocg->hweight_inuse, new_hwi);
|
||||
|
||||
@@ -1131,14 +1131,7 @@ void blk_mq_start_request(struct request *rq)
|
||||
trace_block_rq_issue(rq);
|
||||
|
||||
if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags)) {
|
||||
u64 start_time;
|
||||
#ifdef CONFIG_BLK_CGROUP
|
||||
if (rq->bio)
|
||||
start_time = bio_issue_time(&rq->bio->bi_issue);
|
||||
else
|
||||
#endif
|
||||
start_time = ktime_get_ns();
|
||||
rq->io_start_time_ns = start_time;
|
||||
rq->io_start_time_ns = ktime_get_ns();
|
||||
rq->stats_sectors = blk_rq_sectors(rq);
|
||||
rq->rq_flags |= RQF_STATS;
|
||||
rq_qos_issue(q, rq);
|
||||
|
||||
Reference in New Issue
Block a user