Go to file
Zhang Zekun a4ae0ae208 iommu/iova: avoid softlockup in fq_flush_timeout
hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8ZE0I
CVE: NA

--------------------------------

There is a softlockup undering cpu pressure test.
...
pc : _raw_spin_unlock_irqrestore+0x14/0x78
lr : fq_flush_timeout+0x94/0x118
...
Call trace:
 _raw_spin_unlock_irqrestore+0x14/0x78
 call_timer_fn+0x3c/0x1d0
 expire_timers+0xcc/0x190
 run_timer_softirq+0xfc/0x268
 __do_softirq+0x128/0x3dc
 ____do_softirq+0x18/0x30
 call_on_irq_stack+0x24/0x30
 do_softirq_own_stack+0x24/0x38
 irq_exit_rcu+0xc0/0xe8
 el1_interrupt+0x48/0xc0
 el1h_64_irq_handler+0x18/0x28
 el1h_64_irq+0x78/0x80
 __schedule+0xf28/0x12a0
 schedule+0x3c/0x108
 schedule_timeout+0xa0/0x1d0
 pktgen_thread_worker+0x1180/0x15d0
 kthread+0x120/0x130
 ret_from_fork+0x10/0x20

This is because the timer callback fq_flush_timeout may run more than
10ms, and timer may be processed continuously in the softirq so trigger
softlockup. We can use work to deal with fq_ring_free for each cpu which
may take long time, that to avoid triggering softlockup.

Signed-off-by: Li Bin <huawei.libin@huawei.com>
Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
Signed-off-by: Zihao Xue <xuezihao@huawei.com>
2024-04-12 21:00:46 +08:00
Documentation Documentation: KVM: Add hypercall for LoongArch 2024-04-12 20:59:06 +08:00
LICENSES LICENSES: Add the copyleft-next-0.3.1 license 2022-11-08 15:44:01 +01:00
arch LoongArch: KVM: Add PMU support 2024-04-12 20:59:07 +08:00
block Merge branch 'linux-6.6.y' 2024-03-04 10:25:33 +08:00
certs certs: Reference revocation list for all keyrings 2023-08-17 20:12:41 +00:00
crypto crypto: algif_hash - Remove bogus SGL free on zero-length error path 2024-02-23 09:25:11 +01:00
dist dist: loongarch: add make dist support for loongarch 2024-04-12 20:49:37 +08:00
drivers iommu/iova: avoid softlockup in fq_flush_timeout 2024-04-12 21:00:46 +08:00
fs Merge branch 'linux-6.6.y' 2024-03-04 16:09:50 +08:00
include iommu/dma: Allow a single FQ in addition to per-CPU FQs 2024-04-12 21:00:46 +08:00
init Merge remote-tracking branch 'stable/linux-6.6.y' into ocks-2401 2024-03-01 17:21:23 +08:00
io_uring io_uring/net: fix multishot accept overflow handling 2024-02-23 09:25:10 +01:00
ipc Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
kernel LoongArch: Remove generic irq migration 2024-03-21 19:07:30 +08:00
lib lib/Kconfig.debug: TEST_IOV_ITER depends on MMU 2024-03-01 13:34:59 +01:00
mm Merge branch 'linux-6.6.y' 2024-03-04 10:25:33 +08:00
net Makefile: fix compile error when make allmodconfig 2024-03-04 19:56:58 +08:00
rust rust: upgrade to Rust 1.73.0 2024-02-16 19:10:43 +01:00
samples work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:24:47 +01:00
scripts modpost: Optimize symbol search from linear to binary search 2024-03-21 19:07:31 +08:00
security Merge remote-tracking branch 'stable/linux-6.6.y' into ocks-2401 2024-03-01 17:21:23 +08:00
sound anolis: ALSA: hda: Add support of Zhaoxin NB HDAC codec 2024-03-21 19:07:27 +08:00
tools KVM: x86: Introduce support for Zhaoxin ZXPAUSE instruction 2024-04-12 20:42:02 +08:00
usr initramfs: Encode dependency on KBUILD_BUILD_TIMESTAMP 2023-06-06 17:54:49 +09:00
virt ARM: 2023-09-07 13:52:20 -07:00
.clang-format iommu: Add for_each_group_device() 2023-05-23 08:15:51 +02:00
.cocciconfig
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes dist: initial support 2023-12-12 15:56:34 +08:00
.gitignore dist: initial support 2023-12-12 15:56:34 +08:00
.mailmap 20 hotfixes. 12 are cc:stable and the remainder address post-6.5 issues 2023-10-24 09:52:16 -10:00
.rustfmt.toml rust: add `.rustfmt.toml` 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS USB: Remove Wireless USB and UWB documentation 2023-08-09 14:17:32 +02:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig tkernel: netatop: add netatop module in kernel/tkernel/ 2023-12-12 15:56:47 +08:00
MAINTAINERS LoongArch: KVM: Add maintainers for LoongArch KVM 2024-04-12 20:49:43 +08:00
Makefile Merge branch 'linux-6.6.y' 2024-03-04 16:09:50 +08:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
config-readme Makefile, dist: add "make tencentconfig" support 2024-03-04 13:25:26 +08:00

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.