Re: SDHCI Regression with 6ce3dd6eec11 ("blk-mq: issue directly if hw queue isn't busy in case of 'none'")

2018-08-22 Thread Jarkko Nikula

On 08/21/2018 04:57 PM, Ming Lei wrote:

On Tue, Aug 21, 2018 at 04:45:41PM +0300, Jarkko Nikula wrote:

On 08/21/2018 04:03 PM, Adrian Hunter wrote:

On 21/08/18 15:37, Jarkko Nikula wrote:

Hi

I bisected some kind of SDHCI regression to commit 6ce3dd6eec11 ("blk-mq:
issue directly if hw queue isn't busy in case of 'none'") causing dumps
below and one or more systemd-udevd processes being in uninterruptible sleep
state preventing safe reboot/shutdown.

This is from an Intel Baytrail based tablet with integrated eMMC but my
up-to-date Debian/testing rootfs (with systemd) is on USB stick.

It doesn't revert cleanly on today's head 778a33959a8a but issue is gone if
I go to a commit before 6ce3dd6eec11 and occurs at 6ce3dd6eec11.


This was discussed here:

https://marc.info/?l=linux-block=153334717506073=2

Coincidentally, I just sent the fix patch:

https://marc.info/?l=linux-mmc=153485326025301=2


Cool, it fixed my regression. I tested both on top of 6ce3dd6eec11 and head
778a33959a8a. Maybe you would like to add into your patch another fixes tag
and my tested by:

Fixes: 6ce3dd6eec11 ("blk-mq: issue directly if hw queue isn't busy in case
of 'none'")


If you read the above links carefully, you'd see it is wrong to add the tag of
'Fixes: 6ce3dd6eec11'.

Hmm... why? That commit 6ce3dd6eec11 was clearly regressing on my setup 
while Adrian's fix for 81196976ed94 that has been present since v4.16 
fixes my finding too.


I don't know well enough MMC and block layer but if commit 6ce3dd6eec11 
revealed an issue from MMC under my configuration I'd call it still a 
regression.


--
Jarkko


Re: SDHCI Regression with 6ce3dd6eec11 ("blk-mq: issue directly if hw queue isn't busy in case of 'none'")

2018-08-21 Thread Jarkko Nikula

On 08/21/2018 04:03 PM, Adrian Hunter wrote:

On 21/08/18 15:37, Jarkko Nikula wrote:

Hi

I bisected some kind of SDHCI regression to commit 6ce3dd6eec11 ("blk-mq:
issue directly if hw queue isn't busy in case of 'none'") causing dumps
below and one or more systemd-udevd processes being in uninterruptible sleep
state preventing safe reboot/shutdown.

This is from an Intel Baytrail based tablet with integrated eMMC but my
up-to-date Debian/testing rootfs (with systemd) is on USB stick.

It doesn't revert cleanly on today's head 778a33959a8a but issue is gone if
I go to a commit before 6ce3dd6eec11 and occurs at 6ce3dd6eec11.


This was discussed here:

https://marc.info/?l=linux-block=153334717506073=2

Coincidentally, I just sent the fix patch:

https://marc.info/?l=linux-mmc=153485326025301=2

Cool, it fixed my regression. I tested both on top of 6ce3dd6eec11 and 
head 778a33959a8a. Maybe you would like to add into your patch another 
fixes tag and my tested by:


Fixes: 6ce3dd6eec11 ("blk-mq: issue directly if hw queue isn't busy in 
case of 'none'")

Tested-by: Jarkko Nikula 


SDHCI Regression with 6ce3dd6eec11 ("blk-mq: issue directly if hw queue isn't busy in case of 'none'")

2018-08-21 Thread Jarkko Nikula

Hi

I bisected some kind of SDHCI regression to commit 6ce3dd6eec11 
("blk-mq: issue directly if hw queue isn't busy in case of 'none'") 
causing dumps below and one or more systemd-udevd processes being in 
uninterruptible sleep state preventing safe reboot/shutdown.


This is from an Intel Baytrail based tablet with integrated eMMC but my 
up-to-date Debian/testing rootfs (with systemd) is on USB stick.


It doesn't revert cleanly on today's head 778a33959a8a but issue is gone 
if I go to a commit before 6ce3dd6eec11 and occurs at 6ce3dd6eec11.


# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_DEADLINE is not set
CONFIG_IOSCHED_CFQ=y
# CONFIG_CFQ_GROUP_IOSCHED is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"

[   15.722769] WARNING: CPU: 1 PID: 156 at drivers/mmc/host/sdhci.c:1239 
sdhci_send_command+0x673/0xb40
[   15.733094] Modules linked in: wdat_wdt regmap_i2c video lpc_ich 
sysfillrect sysimgblt fb_sys_fops processor_thermal_device i2c_hid 
intel_soc_dts_iosf int3403_thermal drm int340x_thermal_zone 
int3400_thermal acpi_thermal_rel i2c_designware_platform 
i2c_designware_core i2c_core button loop
[   15.761805] CPU: 1 PID: 156 Comm: systemd-udevd Not tainted 
4.18.0-rc4+ #23

[   15.769602] RIP: 0010:sdhci_send_command+0x673/0xb40
[   15.775155] Code: 18 48 c7 c6 38 16 ea 81 48 c7 c7 20 57 0e 82 e8 43 
1f d8 ff eb 9e 66 8b 40 0c 83 e0 f3 48 8b 53 18 66 89 42 0c e9 68 fd ff 
ff <0f> 0b e9 5a fa ff ff 0f 0b 0f 0b e9 a9 fa ff ff 0f 0b 0f 0b 0f 0b

[   15.796611] RSP: 0018:c93877e0 EFLAGS: 00010086
[   15.802464] RAX: 1fff RBX: 88003676a7c0 RCX: 
001095761c20
[   15.810448] RDX: 00145650 RSI: 0001 RDI: 
0014564b
[   15.818432] RBP: c9387850 R08: 7915b4a3 R09: 

[   15.826415] R10: 0002 R11: 880035865180 R12: 
880035e98e10
[   15.834398] R13: 880035e98e90 R14: 0003 R15: 
88003676a7c0
[   15.842382] FS:  () GS:88003c48(0063) 
knlGS:f7b91800

[   15.851434] CS:  0010 DS: 002b ES: 002b CR0: 80050033
[   15.857852] CR2: 57b55000 CR3: 3503d000 CR4: 
001006e0

[   15.865833] Call Trace:
[   15.868574]  sdhci_request+0xb2/0x100
[   15.872674]  __mmc_start_request+0x7e/0x270
[   15.877354]  mmc_start_request+0x90/0xb0
[   15.881743]  mmc_blk_mq_issue_rq+0x2d0/0x824
[   15.886520]  mmc_mq_queue_rq+0x12c/0x240
[   15.890911]  __blk_mq_try_issue_directly+0x11e/0x1c0
[   15.896465]  blk_mq_request_issue_directly+0x60/0x90
[   15.902020]  blk_mq_try_issue_list_directly+0x3f/0x80
[   15.907672]  blk_mq_sched_insert_requests+0x87/0xa0
[   15.913130]  blk_mq_flush_plug_list+0x1ab/0x450
[   15.918200]  blk_flush_plug_list+0xe2/0x240
[   15.922880]  blk_finish_plug+0x21/0x2f
[   15.927074]  read_pages+0x7d/0x160
[   15.930880]  __do_page_cache_readahead+0x2af/0x2d0
[   15.936240]  force_page_cache_readahead+0x93/0xf0
[   15.941503]  page_cache_sync_readahead+0x211/0x220
[   15.946863]  generic_file_buffered_read+0x486/0x6f0
[   15.952320]  generic_file_read_iter+0xc6/0x130
[   15.957292]  blkdev_read_iter+0x30/0x40
[   15.961584]  __vfs_read+0x11e/0x160
[   15.965486]  vfs_read+0x9a/0x150
[   15.969098]  ksys_read+0x53/0xc0
[   15.972708]  __ia32_sys_read+0x13/0x20
[   15.976903]  do_fast_syscall_32+0x95/0x2d0
[   15.981487]  entry_SYSENTER_compat+0x6d/0x7c
[   15.986263] RIP: 0023:0xf7f03b29
[   15.989863] Code: 55 08 8b 88 5c cd ff ff 8b 98 60 cd ff ff 89 c8 85 
d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 1c 24 c3 51 52 55 89 e5 0f 34 cd 
80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
[   16.011274] RSP: 002b:fff26f90 EFLAGS: 0246 ORIG_RAX: 
0003
[   16.019746] RAX: ffda RBX: 000f RCX: 
57b14dac
[   16.027727] RDX: 0561 RSI: 57b0c1a8 RDI: 
0561
[   16.035708] RBP:  R08:  R09: 

[   16.043688] R10:  R11:  R12: 

[   16.051669] R13:  R14:  R15: 


[   16.059651] irq event stamp: 47406
[   16.063457] hardirqs last  enabled at (47405): [] 
_raw_spin_unlock_irqrestore+0x46/0x60
[   16.074160] hardirqs last disabled at (47406): [] 
_raw_spin_lock_irqsave+0x13/0x50
[   16.084370] softirqs last  enabled at (47180): [] 
__do_softirq+0x27f/0x50b
[   16.093811] softirqs last disabled at (47161): [] 
irq_exit+0x97/0xd0

[   16.102667] ---[ end trace c6109d18f8ad2675 ]---
[   16.107856] WARNING: CPU: 1 PID: 156 at drivers/mmc/host/sdhci.c:890 
sdhci_send_command+0x67c/0xb40
[   16.117967] Modules linked in: wdat_wdt regmap_i2c video lpc_ich 
sysfillrect sysimgblt fb_sys_fops processor_thermal_device i2c_hid 
intel_soc_dts_iosf int3403_thermal drm int340x_thermal_zone 
int3400_thermal acpi_thermal_rel i2c_designware_platform