All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Increase the number of IRQ descriptors for SPARSEIRQ
@ 2023-01-30  0:57 Shanker Donthineni
  2023-01-30  0:57 ` [PATCH 1/5] genirq: Use hlist for managing resend handlers Shanker Donthineni
                   ` (4 more replies)
  0 siblings, 5 replies; 33+ messages in thread
From: Shanker Donthineni @ 2023-01-30  0:57 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier, Michael Walle
  Cc: Sebastian Andrzej Siewior, Hans de Goede, Wolfram Sang,
	Shanker Donthineni, linux-kernel

The ARM64 architecture uses SPARSEIRQ with a default value of NR_IRQS,
which is set to 64. This means that only 64+8192 IRQ descriptors are
allowed, which may not be sufficient for modern ARM64 servers that
have a large number of IO devices and GIC hardware that supports
direct vSGI and vLPI injection features.

This limitation has caused issues when attempting to launch multiple
virtual machines with GICv4.1 features, resulting in the error message
'kvm_err("VPE IRQ allocation failure\n")'. The root cause of this issue
is the ~8K IRQ descriptor limit.

To address this issue, an initial proposal was made to define NR_IRQS
to 2^19 for ARM64. However, Marc Zyngier suggested implementing a
generic solution instead of hard-coded values. Thomas Gleixner advised
to use the maple tree data structure and provided most of the necessary
functions.

For more information, refer to the discussion thread at
https://lore.kernel.org/linux-arm-kernel/20230104023738.1258925-1-sdonthineni@nvidia.com/.

This patch series converts the static memory allocation to dynamic using
the maple tree, and increases the maximum number of IRQ descriptors to
INT_MAX from NR_IRQS+8192. This change has been tested on an ARM64 server
with CONFIG_SPARSE_IRQ=y, where 256 virtual machines were launched,
creating a total of 128K+ IRQ descriptors, and IRQ injection was verified.

Tested with v6.2-rc5 along with Maple-Tree RCU mode bug fixes, as per the
information available at this link: 
 https://lore.kernel.org/all/20230109205336.3665937-1-surenb@google.com/

 [PATCH 1/41]  maple_tree: Be more cautious about dead nodes
 [PATCH 2/41]  maple_tree: Detect dead nodes in mas_start()
 [PATCH 3/41]  maple_tree: Fix freeing of nodes in rcu mode
 [PATCH 4/41]  maple_tree: remove extra smp_wmb() from mas_dead_leaves()
 [PATCH 5/41]  maple_tree: Fix write memory barrier of nodes once dead for RCU mode
 [PATCH 6/41]  maple_tree: Add smp_rmb() to dead node detection

Shanker Donthineni (5):
  genirq: Use hlist for managing resend handlers
  genirq: Allocate IRQ descriptors at boot time for !SPARSEIRQ
  genirq: Introduce two helper functions
  genirq: Use the common function irq_expand_nr_irqs()
  genirq: Use the maple tree for IRQ descriptors management

 include/linux/irqdesc.h |   3 ++
 kernel/irq/chip.c       |   1 +
 kernel/irq/internals.h  |   5 +-
 kernel/irq/irqdesc.c    | 117 ++++++++++++++++++++++------------------
 kernel/irq/resend.c     |  36 +++++++------
 5 files changed, 94 insertions(+), 68 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2023-02-09 23:19 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30  0:57 [PATCH 0/5] Increase the number of IRQ descriptors for SPARSEIRQ Shanker Donthineni
2023-01-30  0:57 ` [PATCH 1/5] genirq: Use hlist for managing resend handlers Shanker Donthineni
2023-01-31  8:59   ` Thomas Gleixner
2023-01-31 16:17     ` Shanker Donthineni
2023-01-31 17:06       ` Shanker Donthineni
2023-01-30  0:57 ` [PATCH 2/5] genirq: Allocate IRQ descriptors at boot time for !SPARSEIRQ Shanker Donthineni
2023-01-31  9:16   ` Thomas Gleixner
2023-01-31 16:41     ` Shanker Donthineni
2023-02-07 10:28       ` Thomas Gleixner
2023-01-30  0:57 ` [PATCH 3/5] genirq: Introduce two helper functions Shanker Donthineni
2023-01-31  9:20   ` Thomas Gleixner
2023-01-31 16:42     ` Shanker Donthineni
2023-01-30  0:57 ` [PATCH 4/5] genirq: Use the common function irq_expand_nr_irqs() Shanker Donthineni
2023-01-31  9:35   ` Thomas Gleixner
2023-01-31 16:43     ` Shanker Donthineni
2023-02-07 10:29       ` Thomas Gleixner
2023-01-30  0:57 ` [PATCH 5/5] genirq: Use the maple tree for IRQ descriptors management Shanker Donthineni
2023-01-31  9:52   ` Thomas Gleixner
2023-01-31 16:45     ` Shanker Donthineni
2023-02-01  6:02   ` kernel test robot
2023-02-01 13:27     ` Thomas Gleixner
2023-02-06 14:24       ` Vlastimil Babka
2023-02-06 18:10         ` Thomas Gleixner
2023-02-07 10:30         ` Thomas Gleixner
2023-02-07 14:16           ` mm, slab/slub: Ensure kmem_cache_alloc_bulk() is available early Thomas Gleixner
2023-02-07 14:45             ` Vlastimil Babka
2023-02-07 14:47               ` Vlastimil Babka
2023-02-07 18:20                 ` Thomas Gleixner
2023-02-08  9:15                   ` Vlastimil Babka
2023-02-08 20:46                     ` Thomas Gleixner
2023-02-09 20:28                       ` Matthew Wilcox
2023-02-09 23:19                         ` Thomas Gleixner
2023-02-08 13:20             ` Hyeonggon Yoo

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.