blk-wbt: cleanup disable-by-default for CFQ
Make it clear that we are disabling wbt for the specified queued, if it was enabled by default. This is in preparation for allowing users to re-enable wbt, and not have it disabled automatically again. Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
80e091d10e
commit
fa224eed2b
|
@ -665,15 +665,21 @@ void wbt_set_write_cache(struct rq_wb *rwb, bool write_cache_on)
|
||||||
rwb->wc = write_cache_on;
|
rwb->wc = write_cache_on;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wbt_disable(struct rq_wb *rwb)
|
/*
|
||||||
|
* Disable wbt, if enabled by default. Only called from CFQ, if we have
|
||||||
|
* cgroups enabled
|
||||||
|
*/
|
||||||
|
void wbt_disable_default(struct request_queue *q)
|
||||||
{
|
{
|
||||||
|
struct rq_wb *rwb = q->rq_wb;
|
||||||
|
|
||||||
if (rwb) {
|
if (rwb) {
|
||||||
del_timer_sync(&rwb->window_timer);
|
del_timer_sync(&rwb->window_timer);
|
||||||
rwb->win_nsec = rwb->min_lat_nsec = 0;
|
rwb->win_nsec = rwb->min_lat_nsec = 0;
|
||||||
wbt_update_limits(rwb);
|
wbt_update_limits(rwb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(wbt_disable);
|
EXPORT_SYMBOL_GPL(wbt_disable_default);
|
||||||
|
|
||||||
u64 wbt_default_latency_nsec(struct request_queue *q)
|
u64 wbt_default_latency_nsec(struct request_queue *q)
|
||||||
{
|
{
|
||||||
|
|
|
@ -105,7 +105,7 @@ void wbt_exit(struct request_queue *);
|
||||||
void wbt_update_limits(struct rq_wb *);
|
void wbt_update_limits(struct rq_wb *);
|
||||||
void wbt_requeue(struct rq_wb *, struct blk_issue_stat *);
|
void wbt_requeue(struct rq_wb *, struct blk_issue_stat *);
|
||||||
void wbt_issue(struct rq_wb *, struct blk_issue_stat *);
|
void wbt_issue(struct rq_wb *, struct blk_issue_stat *);
|
||||||
void wbt_disable(struct rq_wb *);
|
void wbt_disable_default(struct request_queue *);
|
||||||
|
|
||||||
void wbt_set_queue_depth(struct rq_wb *, unsigned int);
|
void wbt_set_queue_depth(struct rq_wb *, unsigned int);
|
||||||
void wbt_set_write_cache(struct rq_wb *, bool);
|
void wbt_set_write_cache(struct rq_wb *, bool);
|
||||||
|
@ -141,7 +141,7 @@ static inline void wbt_requeue(struct rq_wb *rwb, struct blk_issue_stat *stat)
|
||||||
static inline void wbt_issue(struct rq_wb *rwb, struct blk_issue_stat *stat)
|
static inline void wbt_issue(struct rq_wb *rwb, struct blk_issue_stat *stat)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
static inline void wbt_disable(struct rq_wb *rwb)
|
static inline void wbt_disable_default(struct request_queue *q)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
static inline void wbt_set_queue_depth(struct rq_wb *rwb, unsigned int depth)
|
static inline void wbt_set_queue_depth(struct rq_wb *rwb, unsigned int depth)
|
||||||
|
|
|
@ -3780,13 +3780,10 @@ static void check_blkcg_changed(struct cfq_io_cq *cic, struct bio *bio)
|
||||||
/*
|
/*
|
||||||
* If we have a non-root cgroup, we can depend on that to
|
* If we have a non-root cgroup, we can depend on that to
|
||||||
* do proper throttling of writes. Turn off wbt for that
|
* do proper throttling of writes. Turn off wbt for that
|
||||||
* case.
|
* case, if it was enabled by default.
|
||||||
*/
|
*/
|
||||||
if (nonroot_cg) {
|
if (nonroot_cg)
|
||||||
struct request_queue *q = cfqd->queue;
|
wbt_disable_default(cfqd->queue);
|
||||||
|
|
||||||
wbt_disable(q->rq_wb);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Drop reference to queues. New queues will be assigned in new
|
* Drop reference to queues. New queues will be assigned in new
|
||||||
|
|
Loading…
Reference in New Issue