mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
blk-wbt: allow wbt to be enabled always through sysfs
Currently there's no way to enable wbt if it's not enabled in the kernel config by default for a device. Allow a write to the 'wbt_lat_usec' queue sysfs file to enable wbt. This is useful for both the kernel config case, but also if the device is CFQ managed and it was turned off by default. Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
fa224eed2b
commit
d62118b6dd
3 changed files with 29 additions and 7 deletions
|
|
@ -21,6 +21,15 @@ enum {
|
|||
WBT_NUM_RWQ = 2,
|
||||
};
|
||||
|
||||
/*
|
||||
* Enable states. Either off, or on by default (done at init time),
|
||||
* or on through manual setup in sysfs.
|
||||
*/
|
||||
enum {
|
||||
WBT_STATE_ON_DEFAULT = 1,
|
||||
WBT_STATE_ON_MANUAL = 2,
|
||||
};
|
||||
|
||||
static inline void wbt_clear_state(struct blk_issue_stat *stat)
|
||||
{
|
||||
stat->time &= BLK_STAT_TIME_MASK;
|
||||
|
|
@ -61,6 +70,8 @@ struct rq_wb {
|
|||
int scale_step;
|
||||
bool scaled_max;
|
||||
|
||||
short enable_state; /* WBT_STATE_* */
|
||||
|
||||
/*
|
||||
* Number of consecutive periods where we don't have enough
|
||||
* information to make a firm scale up/down decision.
|
||||
|
|
|
|||
Loading…
Reference in a new issue