[lkml]   [2020]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH v3 0/2] irqchip/gic-v3-its: Balance LPI affinity across CPUs
Hi Marc,

> But I would also like to report some other unexpected behaviour for
> managed interrupts in this series - I'll reply directly to the specific
> patch for that.

So I made this change:

diff --git a/drivers/irqchip/irq-gic-v3-its.c
index 9199fb53c75c..ebbfc8d44d35 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1539,6 +1539,8 @@ static int its_set_affinity(struct irq_data *d,
const struct cpumask *mask_val,
if (irqd_is_forwarded_to_vcpu(d))
return -EINVAL;

+ its_dec_lpi_count(d, its_dev->event_map.col_map[id]);
if (!force)
cpu = its_select_cpu(d, mask_val);
@@ -1549,14 +1551,14 @@ static int its_set_affinity(struct irq_data *d,
const struct cpumask *mask_val,

/* don't set the affinity when the target cpu is same as
current one */
if (cpu != its_dev->event_map.col_map[id]) {
- its_inc_lpi_count(d, cpu);
- its_dec_lpi_count(d, its_dev->event_map.col_map[id]);
target_col = &its_dev->its->collections[cpu];
its_send_movi(its_dev, target_col, id);
its_dev->event_map.col_map[id] = cpu;
irq_data_update_effective_affinity(d, cpumask_of(cpu));

+ its_inc_lpi_count(d, cpu);

Results look ok:
nvme.use_threaded_interrupts=1 =0*
Before 950K IOPs 1000K IOPs
After 1100K IOPs 1150K IOPs
* as mentioned before, this is quite unstable and causes lockups. JFYI,
there was an attempt to fix this:


 \ /
  Last update: 2020-04-01 13:34    [W:0.092 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site