All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add machanism to limit msi allocation for Loongson
@ 2023-05-27  5:46 Huacai Chen
  2023-05-27  5:46 ` [PATCH 1/2] genirq/msi, platform-msi: Adjust return value of msi_domain_prepare_irqs() Huacai Chen
  2023-05-27  5:46 ` [PATCH 2/2] irqchip/loongson-pch-msi: Add machanism to limit msi allocation Huacai Chen
  0 siblings, 2 replies; 17+ messages in thread
From: Huacai Chen @ 2023-05-27  5:46 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier, Bjorn Helgaas
  Cc: linux-kernel, loongson-kernel, Xuefeng Li, Huacai Chen,
	Jiaxun Yang, Huacai Chen, Juxin Gao

Loongson machines can have as many as 256 logical cpus, but the maximum
of msi vectors in one irqchip is also 256 (practically that is less than
256, because pch-pic consumes some of them). Even on a 64-core machine,
256 irqs can be easily exhausted if there are several NICs (NICs usually
allocate msi irqs depending on the number of online cpus). So we want to
limit the msi allocation.

Patch-1 adjusts the return value semanteme of msi_domain_prepare_irqs(),
allowing us to modify the input "nvec" by overriding the msi_domain_ops
::msi_prepare().
    
Patch-2 adds a machanism to limit msi allocation:
1, Modify input "nvec" by overriding the msi_domain_ops::msi_prepare();
2, The default limit is 256, which is compatible with the old behavior;
3, Add a cmdline parameter "loongson_msi_limit=xxx" to control the limit.

Huacai Chen and Juxin Gao(2):
 PCI: Omit pci_disable_device() in .shutdown().
 PCI: loongson: Improve the MRRS quirk for LS7A.

Signed-off-by: Juxin Gao <gaojuxin@loongson.cn> 
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
---
2.27.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-06-02  1:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-27  5:46 [PATCH 0/2] Add machanism to limit msi allocation for Loongson Huacai Chen
2023-05-27  5:46 ` [PATCH 1/2] genirq/msi, platform-msi: Adjust return value of msi_domain_prepare_irqs() Huacai Chen
2023-05-27 14:03   ` Thomas Gleixner
2023-05-28  3:42     ` Huacai Chen
2023-05-29  7:44       ` Thomas Gleixner
2023-05-29  9:35         ` Huacai Chen
2023-05-28  7:47     ` Marc Zyngier
2023-05-28 12:07       ` Huacai Chen
2023-05-29  9:27         ` Thomas Gleixner
2023-05-29  9:36           ` Huacai Chen
2023-05-29 20:19             ` Thomas Gleixner
2023-05-30  8:34               ` Huacai Chen
2023-05-30 12:22                 ` Thomas Gleixner
2023-05-30 15:03                 ` Thomas Gleixner
2023-06-01 15:18                   ` Huacai Chen
2023-06-02  1:10                   ` bibo, mao
2023-05-27  5:46 ` [PATCH 2/2] irqchip/loongson-pch-msi: Add machanism to limit msi allocation Huacai Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.