android_kernel_oneplus_msm8998/block
Ritesh Harjani 8c7501882b cfq: Give a chance to arm slice idle timer in case of group_idle
In below scenario blkio cgroup does not work as per their assigned
weights :-
1. When the underlying device is nonrotational with a single HW queue
with depth of > 5
2. When the use case is forming two blkio cgroups cg1(weight 1000) &
cg2(wight 100) and two processes(file1 and file2) doing sync IO in
their respective blkio cgroups.

For above usecase result of fio (without this patch):-
file1: (groupid=0, jobs=1): err= 0: pid=685: Thu Jan  1 19:41:49 1970
  write: IOPS=1315, BW=41.1MiB/s (43.1MB/s)(1024MiB/24906msec)
<...>
file2: (groupid=0, jobs=1): err= 0: pid=686: Thu Jan  1 19:41:49 1970
  write: IOPS=1295, BW=40.5MiB/s (42.5MB/s)(1024MiB/25293msec)
<...>
// both the process BW is equal even though they belong to different
cgroups with weight of 1000(cg1) and 100(cg2)

In above case as soon as the request from cg1 is completed and even
though it is provided with higher slice_idle=10, because of CFQ
algorithm when the driver tries to fetch the request, CFQ expires
this group without providing any idle time nor weight priority
and schedules another cfq group (in this case cg2).
And thus both cfq groups(cg1 & cg2) keep alternating to get the
disk time and hence loses the cgroup weight based scheduling.

Below patch gives a chance to cfq algorithm (cfq_arm_slice_timer)
to arm the slice timer in case group_idle is enabled.

With this patch result of fio(for above usecase) :-
file1: (groupid=0, jobs=1): err= 0: pid=690: Thu Jan  1 00:06:08 1970
  write: IOPS=1706, BW=53.3MiB/s (55.9MB/s)(1024MiB/19197msec)
<..>
file2: (groupid=0, jobs=1): err= 0: pid=691: Thu Jan  1 00:06:08 1970
  write: IOPS=1043, BW=32.6MiB/s (34.2MB/s)(1024MiB/31401msec)
<..>
// In this processes BW is as per their respective cgroups weight.

Change-Id: I2eb20e48d6fd8ee48e01f00c514a1ee1476fd19c
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2020-11-03 21:30:28 +01:00
..
partitions partitions/aix: fix usage of uninitialized lv_info and lvname structures 2018-09-19 22:48:59 +02:00
bfq-cgroup.c block, bfq: update to latest bfq-v8-v4.4 state 2020-11-03 21:30:16 +01:00
bfq-ioc.c block: introduce the BFQ-v7r11 I/O sched for 4.4.0 2020-11-03 21:30:16 +01:00
bfq-iosched.c block, bfq: fix build breakage 2020-11-03 21:30:17 +01:00
bfq-sched.c block, bfq: update to latest bfq-v8-v4.4 state 2020-11-03 21:30:16 +01:00
bfq.h block, bfq: update to latest bfq-v8-v4.4 state 2020-11-03 21:30:16 +01:00
bio-integrity.c bio-integrity: Do not allocate integrity context for bio w/o data 2018-04-13 19:50:17 +02:00
bio.c Merge android-4.4.179 (aab9adb) into msm-4.4 2019-05-02 10:52:27 +05:30
blk-cgroup.c Merge android-4.4.157 (c139ea66) into msm-4.4 2018-09-28 12:12:40 +05:30
blk-core.c Merge android-4.4.189 (74c8219) into msm-4.4 2019-08-12 10:43:48 +05:30
blk-exec.c block: move PM request support to IDE 2015-05-05 13:40:42 -06:00
blk-flush.c block: blk-flush: Add support for Barrier flag 2016-03-22 11:01:36 -07:00
blk-integrity.c block: Use pointer to backing_dev_info from request_queue 2017-10-18 12:05:43 +05:30
blk-ioc.c mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd 2015-11-06 17:50:42 -08:00
blk-iopoll.c Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
blk-lib.c block: re-add discard_granularity and alignment checks 2015-10-28 09:12:58 +09:00
blk-map.c Don't feed anything but regular iovec's to blk_rq_map_user_iov 2016-12-10 19:07:26 +01:00
blk-merge.c Merge branch 'v4.4-16.09-android-tmp' into lsk-v4.4-16.09-android 2016-12-16 13:52:17 -08:00
blk-mq-cpu.c blk-mq: add file comments and update copyright notices 2014-05-28 10:15:41 -06:00
blk-mq-cpumap.c blk-mq: use static mapping 2016-09-21 22:46:40 +05:30
blk-mq-sysfs.c block: add block polling support 2015-11-07 10:40:47 -07:00
blk-mq-tag.c mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd 2015-11-06 17:50:42 -08:00
blk-mq-tag.h blk-mq: factor out a helper to iterate all tags for a request_queue 2015-10-01 10:10:57 +02:00
blk-mq.c Merge android-4.4.128 (89904cc) into msm-4.4 2018-04-20 13:05:36 +05:30
blk-mq.h blk-mq: use static mapping 2016-09-21 22:46:40 +05:30
blk-settings.c Merge android-4.4.172 (b3e9e81) into msm-4.4 2019-01-29 16:37:33 +05:30
blk-softirq.c block: fix regression with block enabled tagging 2014-04-09 21:54:06 -06:00
blk-sysfs.c Merge android-4.4.172 (b3e9e81) into msm-4.4 2019-01-29 16:37:33 +05:30
blk-tag.c block: support different tag allocation policy 2015-01-23 14:15:46 -07:00
blk-throttle.c blk-throttle: make sure expire time isn't too big 2018-03-22 09:23:22 +01:00
blk-timeout.c block: fix blk_abort_request for blk-mq drivers 2015-11-24 15:24:10 -07:00
blk.h Block: Add support to measure bio latencies 2017-01-04 16:58:34 -08:00
bounce.c Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2015-09-19 18:57:09 -07:00
bsg-lib.c Revert "bsg-lib: don't free job in bsg_prepare_job" 2017-10-21 17:09:03 +02:00
bsg.c sg_write()/bsg_write() is not fit to be called under KERNEL_DS 2017-01-09 08:07:53 +01:00
cfq-iosched.c cfq: Give a chance to arm slice idle timer in case of group_idle 2020-11-03 21:30:28 +01:00
cmdline-parser.c block: remove unrelated header files and export symbol 2014-01-21 20:18:26 -08:00
compat_ioctl.c take floppy compat ioctls to sodding floppy.c 2019-08-04 09:34:51 +02:00
deadline-iosched.c block: Stop abusing csd.list for fifo_time 2014-02-24 14:46:32 -08:00
elevator.c block: don't allow nr_pending to go negative 2016-03-22 11:02:02 -07:00
genhd.c block: Use pointer to backing_dev_info from request_queue 2017-10-18 12:05:43 +05:30
ioctl.c block: add an API for Persistent Reservations 2015-10-21 14:46:56 -06:00
ioprio.c block: fix use-after-free in sys_ioprio_get() 2016-11-18 16:45:13 -08:00
Kconfig Block: Add support to measure bio latencies 2017-01-04 16:58:34 -08:00
Kconfig.iosched block: cgroups, kconfig, build bits for BFQ-v7r11-4.4.0 2020-11-03 21:30:24 +01:00
Makefile block: cgroups, kconfig, build bits for BFQ-v7r11-4.4.0 2020-11-03 21:30:24 +01:00
noop-iosched.c elevator: use list_{first,prev,next}_entry 2015-11-16 15:21:48 -07:00
partition-generic.c This is the 4.4.128 stable release 2018-04-14 15:35:32 +02:00
scsi_ioctl.c block: allow WRITE_SAME commands with the SG_IO ioctl 2017-03-30 09:35:20 +02:00
t10-pi.c block: Consolidate static integrity profile properties 2015-10-21 14:42:38 -06:00
test-iosched.c block: test-iosched: Fix compilation error in end_test_bio 2016-03-22 11:02:03 -07:00