# git rev-parse -q --verify 3c53776e29f81719efcf8f7a6e30cdf753bee94d^{commit} 3c53776e29f81719efcf8f7a6e30cdf753bee94d already have revision, skipping fetch # git checkout -q -f -B kisskb 3c53776e29f81719efcf8f7a6e30cdf753bee94d # git clean -qxdf # < git log -1 # commit 3c53776e29f81719efcf8f7a6e30cdf753bee94d # Author: Linus Torvalds # Date: Mon Jan 8 11:51:04 2018 -0800 # # Mark HI and TASKLET softirq synchronous # # Way back in 4.9, we committed 4cd13c21b207 ("softirq: Let ksoftirqd do # its job"), and ever since we've had small nagging issues with it. For # example, we've had: # # 1ff688209e2e ("watchdog: core: make sure the watchdog_worker is not deferred") # 8d5755b3f77b ("watchdog: softdog: fire watchdog even if softirqs do not get to run") # 217f69743681 ("net: busy-poll: allow preemption in sk_busy_loop()") # # all of which worked around some of the effects of that commit. # # The DVB people have also complained that the commit causes excessive USB # URB latencies, which seems to be due to the USB code using tasklets to # schedule USB traffic. This seems to be an issue mainly when already # living on the edge, but waiting for ksoftirqd to handle it really does # seem to cause excessive latencies. # # Now Hanna Hawa reports that this issue isn't just limited to USB URB and # DVB, but also causes timeout problems for the Marvell SoC team: # # "I'm facing kernel panic issue while running raid 5 on sata disks # connected to Macchiatobin (Marvell community board with Armada-8040 # SoC with 4 ARMv8 cores of CA72) Raid 5 built with Marvell DMA engine # and async_tx mechanism (ASYNC_TX_DMA [=y]); the DMA driver (mv_xor_v2) # uses a tasklet to clean the done descriptors from the queue" # # The latency problem causes a panic: # # mv_xor_v2 f0400000.xor: dma_sync_wait: timeout! # Kernel panic - not syncing: async_tx_quiesce: DMA error waiting for transaction # # We've discussed simply just reverting the original commit entirely, and # also much more involved solutions (with per-softirq threads etc). This # patch is intentionally stupid and fairly limited, because the issue # still remains, and the other solutions either got sidetracked or had # other issues. # # We should probably also consider the timer softirqs to be synchronous # and not be delayed to ksoftirqd (since they were the issue with the # earlier watchdog problems), but that should be done as a separate patch. # This does only the tasklet cases. # # Reported-and-tested-by: Hanna Hawa # Reported-and-tested-by: Josef Griebichler # Reported-by: Mauro Carvalho Chehab # Cc: Alan Stern # Cc: Greg Kroah-Hartman # Cc: Eric Dumazet # Cc: Ingo Molnar # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/br-xtensa-full-2016.08-613-ge98b4dd/bin/xtensa-linux-gcc --version # < git log --format=%s --max-count=1 3c53776e29f81719efcf8f7a6e30cdf753bee94d # < make -s -j 8 ARCH=xtensa O=/kisskb/build/linus_xtensa-allmodconfig_xtensa CROSS_COMPILE=/opt/cross/kisskb/br-xtensa-full-2016.08-613-ge98b4dd/bin/xtensa-linux- allmodconfig drivers/staging/mt7621-dts/Kconfig:4:warning: 'BUILTIN_DTB' has wrong type. 'select' only accept arguments of bool and tristate type # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_SAMPLES=n # yes \n | make -s -j 8 ARCH=xtensa O=/kisskb/build/linus_xtensa-allmodconfig_xtensa CROSS_COMPILE=/opt/cross/kisskb/br-xtensa-full-2016.08-613-ge98b4dd/bin/xtensa-linux- oldconfig yes: standard output: Broken pipe yes: write error # make -s -j 8 ARCH=xtensa O=/kisskb/build/linus_xtensa-allmodconfig_xtensa CROSS_COMPILE=/opt/cross/kisskb/br-xtensa-full-2016.08-613-ge98b4dd/bin/xtensa-linux- drivers/staging/mt7621-dts/Kconfig:4:warning: 'BUILTIN_DTB' has wrong type. 'select' only accept arguments of bool and tristate type :1332:2: warning: #warning syscall io_pgetevents not implemented [-Wcpp] :1335:2: warning: #warning syscall rseq not implemented [-Wcpp] /kisskb/src/arch/xtensa/kernel/pci.c:45:32: warning: 'pci_ctrl_tail' defined but not used [-Wunused-variable] static struct pci_controller **pci_ctrl_tail = &pci_ctrl_head; ^ /kisskb/src/lib/test_kasan.c: In function 'use_after_scope_test': /kisskb/src/lib/test_kasan.c:504:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=] } ^ /kisskb/src/drivers/char/tpm/tpm2-cmd.c: In function 'tpm2_unseal_trusted': /kisskb/src/drivers/char/tpm/tpm2-cmd.c:730:2: warning: 'blob_handle' may be used uninitialized in this function [-Wmaybe-uninitialized] tpm2_flush_context_cmd(chip, blob_handle, TPM_TRANSMIT_UNLOCKED); ^ In file included from /kisskb/src/arch/xtensa/include/asm/atomic.h:21:0, from /kisskb/src/include/linux/atomic.h:5, from /kisskb/src/include/linux/debug_locks.h:6, from /kisskb/src/include/linux/lockdep.h:28, from /kisskb/src/include/linux/spinlock_types.h:18, from /kisskb/src/include/linux/spinlock.h:82, from /kisskb/src/include/linux/wait.h:9, from /kisskb/src/include/linux/wait_bit.h:8, from /kisskb/src/include/linux/fs.h:6, from /kisskb/src/fs/ocfs2/file.c:27: /kisskb/src/fs/ocfs2/file.c: In function 'ocfs2_file_write_iter': /kisskb/src/arch/xtensa/include/asm/cmpxchg.h:139:3: warning: value computed is not used [-Wunused-value] ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) ^ /kisskb/src/fs/ocfs2/file.c:2386:3: note: in expansion of macro 'xchg' xchg(&iocb->ki_complete, saved_ki_complete); ^ /kisskb/src/drivers/input/joystick/analog.c:176:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp] #warning Precise timer not defined for this architecture. ^ /kisskb/src/drivers/net/usb/rtl8150.c:30:0: warning: "RSR" redefined #define RSR 0x0133 ^ In file included from /kisskb/src/arch/xtensa/include/asm/bitops.h:22:0, from /kisskb/src/include/linux/bitops.h:38, from /kisskb/src/include/linux/kernel.h:11, from /kisskb/src/include/asm-generic/bug.h:18, from ./arch/xtensa/include/generated/asm/bug.h:1, from /kisskb/src/include/linux/bug.h:5, from /kisskb/src/include/linux/signal.h:5, from /kisskb/src/drivers/net/usb/rtl8150.c:9: /kisskb/src/arch/xtensa/include/asm/processor.h:221:0: note: this is the location of the previous definition #define RSR(v,sr) __asm__ __volatile__ ("rsr %0,"__stringify(sr) : "=a"(v)); ^ In file included from /kisskb/src/arch/xtensa/include/asm/atomic.h:21:0, from /kisskb/src/include/linux/atomic.h:5, from /kisskb/src/include/linux/debug_locks.h:6, from /kisskb/src/include/linux/lockdep.h:28, from /kisskb/src/include/linux/spinlock_types.h:18, from /kisskb/src/include/linux/spinlock.h:82, from /kisskb/src/include/linux/seqlock.h:36, from /kisskb/src/include/linux/time.h:6, from /kisskb/src/include/linux/stat.h:19, from /kisskb/src/include/linux/module.h:10, from /kisskb/src/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:12: /kisskb/src/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c: In function 'ixgbevf_xdp_setup': /kisskb/src/arch/xtensa/include/asm/cmpxchg.h:139:3: warning: value computed is not used [-Wunused-value] ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) ^ /kisskb/src/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:4448:4: note: in expansion of macro 'xchg' xchg(&adapter->rx_ring[i]->xdp_prog, adapter->xdp_prog); ^ In file included from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_glue.h:64:0, from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_fw.c:40: /kisskb/src/drivers/scsi/sym53c8xx_2/sym_defs.h:109:0: warning: "WSR" redefined #define WSR 0x01 /* sta: wide scsi received [W]*/ ^ In file included from /kisskb/src/arch/xtensa/include/asm/bitops.h:22:0, from /kisskb/src/include/linux/bitops.h:38, from /kisskb/src/include/linux/kernel.h:11, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/wait.h:7, from /kisskb/src/include/linux/completion.h:12, from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_glue.h:43, from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_fw.c:40: /kisskb/src/arch/xtensa/include/asm/processor.h:220:0: note: this is the location of the previous definition #define WSR(v,sr) __asm__ __volatile__ ("wsr %0,"__stringify(sr) :: "a"(v)); ^ In file included from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_glue.h:64:0, from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_glue.c:50: /kisskb/src/drivers/scsi/sym53c8xx_2/sym_defs.h:109:0: warning: "WSR" redefined #define WSR 0x01 /* sta: wide scsi received [W]*/ ^ In file included from /kisskb/src/arch/xtensa/include/asm/bitops.h:22:0, from /kisskb/src/include/linux/bitops.h:38, from /kisskb/src/include/linux/kernel.h:11, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/module.h:9, from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_glue.c:42: /kisskb/src/arch/xtensa/include/asm/processor.h:220:0: note: this is the location of the previous definition #define WSR(v,sr) __asm__ __volatile__ ("wsr %0,"__stringify(sr) :: "a"(v)); ^ In file included from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_glue.h:64:0, from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_hipd.c:44: /kisskb/src/drivers/scsi/sym53c8xx_2/sym_defs.h:109:0: warning: "WSR" redefined #define WSR 0x01 /* sta: wide scsi received [W]*/ ^ In file included from /kisskb/src/arch/xtensa/include/asm/bitops.h:22:0, from /kisskb/src/include/linux/bitops.h:38, from /kisskb/src/include/linux/kernel.h:11, from /kisskb/src/include/asm-generic/bug.h:18, from ./arch/xtensa/include/generated/asm/bug.h:1, from /kisskb/src/include/linux/bug.h:5, from /kisskb/src/include/linux/mmdebug.h:5, from /kisskb/src/include/linux/gfp.h:5, from /kisskb/src/include/linux/slab.h:15, from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_hipd.c:41: /kisskb/src/arch/xtensa/include/asm/processor.h:220:0: note: this is the location of the previous definition #define WSR(v,sr) __asm__ __volatile__ ("wsr %0,"__stringify(sr) :: "a"(v)); ^ In file included from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_glue.h:64:0, from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_malloc.c:40: /kisskb/src/drivers/scsi/sym53c8xx_2/sym_defs.h:109:0: warning: "WSR" redefined #define WSR 0x01 /* sta: wide scsi received [W]*/ ^ In file included from /kisskb/src/arch/xtensa/include/asm/bitops.h:22:0, from /kisskb/src/include/linux/bitops.h:38, from /kisskb/src/include/linux/kernel.h:11, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/wait.h:7, from /kisskb/src/include/linux/completion.h:12, from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_glue.h:43, from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_malloc.c:40: /kisskb/src/arch/xtensa/include/asm/processor.h:220:0: note: this is the location of the previous definition #define WSR(v,sr) __asm__ __volatile__ ("wsr %0,"__stringify(sr) :: "a"(v)); ^ In file included from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_glue.h:64:0, from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_nvram.c:40: /kisskb/src/drivers/scsi/sym53c8xx_2/sym_defs.h:109:0: warning: "WSR" redefined #define WSR 0x01 /* sta: wide scsi received [W]*/ ^ In file included from /kisskb/src/arch/xtensa/include/asm/bitops.h:22:0, from /kisskb/src/include/linux/bitops.h:38, from /kisskb/src/include/linux/kernel.h:11, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/wait.h:7, from /kisskb/src/include/linux/completion.h:12, from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_glue.h:43, from /kisskb/src/drivers/scsi/sym53c8xx_2/sym_nvram.c:40: /kisskb/src/arch/xtensa/include/asm/processor.h:220:0: note: this is the location of the previous definition #define WSR(v,sr) __asm__ __volatile__ ("wsr %0,"__stringify(sr) :: "a"(v)); ^ ./usr/include/asm/setup.h:17: userspace cannot reference function or variable defined in the kernel Completed OK # rm -rf /kisskb/build/linus_xtensa-allmodconfig_xtensa # Build took: 0:17:16.844216