android_kernel_samsung_msm8976/block
Diogo Ferreira 819f593aa3 bfq-sched: Forcefully lookup entities when the cache is inconsistent
bfq maintains a 'next-in-service' cache to prevent expensive lookups in
the hot path. However, the cache sometimes becomes inconsistent and
triggers a BUG:

[44042.622839] -(3)[154:mmcqd/0]BUG: failure at ../../../../../../kernel/cyanogen/mt6735/block/bfq-sched.c:72/bfq_check_next_in_service()!
[44042.622858] -(3)[154:mmcqd/0]Unable to handle kernel paging request at virtual address 0000dead
[44042.622866] -(3)[154:mmcqd/0]pgd = ffffffc001361000
[44042.622872] [0000dead] *pgd=000000007d816003, *pud=000000007d816003, *pmd=000000007d817003, *pte=0000000000000000
[44042.622890] -(3)[154:mmcqd/0]Internal error: Oops: 96000045 [#1] PREEMPT SMP
[44042.622907] -(3)[154:mmcqd/0]CPU: 3 PID: 154 Comm: mmcqd/0 Tainted:
[44042.622915] -(3)[154:mmcqd/0]Hardware name: MT6735 (DT)
[44042.622922] -(3)[154:mmcqd/0]task: ffffffc0378a6000 ti: ffffffc0378c4000
[44042.622936] -(3)[154:mmcqd/0]PC is at bfq_dispatch_requests+0x6c4/0x9bc
[44042.622944] -(3)[154:mmcqd/0]LR is at bfq_dispatch_requests+0x6bc/0x9bc
[44042.622952] -(3)[154:mmcqd/0]pc : [<ffffffc000306a68>] lr : [<ffffffc000306a60>] pstate: 800001c5
[44042.622958] -(3)[154:mmcqd/0]sp : ffffffc0378c7d30
[44042.622962] x29: ffffffc0378c7d30 x28: 0000000000000000
[44042.622972] x27: 0000000000000000 x26: ffffffc006c58810
[44042.622981] x25: ffffffc037f89820 x24: ffffffc000f14000
[44042.622990] x23: ffffffc036adb088 x22: ffffffc0369b2800
[44042.623000] x21: ffffffc036adb098 x20: ffffffc01d6a3b60
[44042.623009] x19: ffffffc036adb0c8 x18: 0000007f8cfa1500
[44042.623018] x17: 0000007f8db44f40 x16: ffffffc00012d0c0
[44042.623027] x15: 0000007f8dde04d8 x14: 676f6e6179632f6c
[44042.623037] x13: 656e72656b2f2e2e x12: 2f2e2e2f2e2e2f2e
[44042.623046] x11: 2e2f2e2e2f2e2e20 x10: 7461206572756c69
[44042.623055] x9 : 6166203a4755425d x8 : 00000000001f0cc5
[44042.623064] x7 : ffffffc000f3d5a0 x6 : 000000000000008b
[44042.623073] x5 : 0000000000000000 x4 : 0000000000000004
[44042.623082] x3 : 0000000000000002 x2 : 0000000000000001
[44042.623091] x1 : 0000000000000aee x0 : 000000000000dead

This patch makes the lookup resilient to cache inconsistencies by doing
the expensive recomputation in cases where the bug would otherwise be
triggered.

Ticket: PORRDIGE-527

Change-Id: I5dd701960057983a42d3d3bd57521e8d17c03d7f
2020-08-08 02:55:27 +02:00
..
partitions This is the 3.10.99 stable release 2017-04-18 17:17:46 +02:00
Kconfig
Kconfig.iosched block: cgroups, kconfig, build bits for BFQ-v7r8-3.10.8+ 2017-04-18 04:37:19 +02:00
Makefile block: cgroups, kconfig, build bits for BFQ-v7r8-3.10.8+ 2017-04-18 04:37:19 +02:00
bfq-cgroup.c block: introduce the BFQ-v7r8 I/O sched for 3.10.8+ 2017-04-18 04:37:19 +02:00
bfq-ioc.c block: introduce the BFQ-v7r8 I/O sched for 3.10.8+ 2017-04-18 04:37:19 +02:00
bfq-iosched.c block, bfq: add Early Queue Merge (EQM) to BFQ-v7r8 for 3.10.8+ 2017-04-18 04:37:20 +02:00
bfq-sched.c bfq-sched: Forcefully lookup entities when the cache is inconsistent 2020-08-08 02:55:27 +02:00
bfq.h block, bfq: add Early Queue Merge (EQM) to BFQ-v7r8 for 3.10.8+ 2017-04-18 04:37:20 +02:00
blk-cgroup.c blkcg: fix gendisk reference leak in blkg_conf_prep() 2015-08-10 12:20:30 -07:00
blk-cgroup.h Update of blkg_stat and blkg_rwstat may happen in bh context. While u64_stats_fetch_retry is only preempt_disable on 32bit UP system. This is not enough to avoid preemption by bh and may read strange 64 bit value. 2013-12-11 22:36:27 -08:00
blk-core.c block: remove WQ_POWER_EFFICIENT from kblockd 2019-07-27 22:11:05 +02:00
blk-exec.c
blk-flush.c
blk-integrity.c
blk-ioc.c block: queue work on power efficient wq 2019-07-27 22:11:02 +02:00
blk-iopoll.c arch: Mass conversion of smp_mb__*() 2014-08-15 11:45:28 -07:00
blk-lib.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
blk-map.c treewide: Fix typo in Documentation/DocBook 2019-07-27 22:10:20 +02:00
blk-merge.c dm: dm-req-crypt: Split read requests to reduce decryption latency 2015-01-14 12:20:01 -08:00
blk-settings.c This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
blk-softirq.c kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS 2014-02-07 15:55:40 -08:00
blk-sysfs.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
blk-tag.c block: don't assume last put of shared tags is for the host 2014-07-31 12:53:48 -07:00
blk-throttle.c blk-throttle: check stats_cpu before reading it from sysfs 2015-03-06 14:40:54 -08:00
blk-timeout.c block: fix race between request completion and timeout handling 2013-11-29 11:11:50 -08:00
blk.h Revert "block: do not requeue completed request" 2015-02-02 17:07:57 +02:00
bsg-lib.c
bsg.c BACKPORT: block: add blk_rq_set_block_pc() 2017-04-22 23:03:01 +02:00
cfq-iosched.c cfq: fix starvation of asynchronous writes 2019-07-27 21:42:46 +02:00
compat_ioctl.c kernel-wide: fix missing validations on __get/__put/__copy_to/__copy_from_user() 2019-07-27 22:10:26 +02:00
deadline-iosched.c
elevator.c Merge upstream linux-stable v3.10.28 into msm-3.10 2014-03-24 14:28:34 -07:00
genhd.c block: queue work on power efficient wq 2019-07-27 22:11:02 +02:00
ioctl.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
noop-iosched.c
partition-generic.c block: fix an error code in add_partition() 2019-07-27 21:44:48 +02:00
row-iosched.c block: row: Fix crash when adding a new field in bio struct 2014-06-22 16:18:04 +03:00
scsi_ioctl.c block: allow WRITE_SAME commands with the SG_IO ioctl 2019-07-27 21:43:28 +02:00
test-iosched.c block: test-iosched: expose sector_range variable to user 2015-01-13 16:17:04 +02:00