All of lore.kernel.org
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: Christian Borntraeger <borntraeger@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: KVM <kvm@vger.kernel.org>, David Hildenbrand <david@redhat.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	linux-s390@vger.kernel.org
Subject: Re: [PATCH] KVM: s390: Don't kick vcpus for floating IRQs that are no longer pending
Date: Mon, 30 Nov 2026 14:45:25 +0100	[thread overview]
Message-ID: <12ca1b57-87aa-44b0-beca-531fb0b037bf@linux.ibm.com> (raw)
In-Reply-To: <20261130091704.1566209-1-borntraeger@linux.ibm.com>

On 11/30/26 10:17 AM, Christian Borntraeger wrote:
> kick_cpu_irq() searches for a vcpu that can take the injected floating
> IRQ, starting with last_sleep_cpu, and, if it does not find one that
> is suitable it wakes up all vcpus to avoid starvation.
> 
> For GISA interrupts, __inject_io() only sets the IPM bit and the
> hardware may deliver the interrupt to a vcpu running in SIE before
> kick_cpu_irq() looks at it. The IPM bit is then already clear, so
> deliverable_irqs() returns 0 for every vcpu and all vcpus are woken up
> for an interrupt that has already been delivered.
> 
> Whenever a candidate vcpu cannot take the IRQ, check whether the IRQ is
> still pending for the VM at all and skip the kick if it is not. The
> common case, where the last_sleep_cpu guess works, is not affected:
> deliverable_irqs() has already looked at the pending IRQs then.
> 
> Measured with a 12 vcpu guest doing 4k random reads (4 jobs, iodepth
> 32) on a host NVMe attached as virtio-blk with 4 queues mapped to 2
> iothreads, all QEMU threads pinned to vertical high/medium CPUs of a
> shared LPAR (function profile via ftrace, so absolute times include
> tracing overhead):
We're getting closer to a sensible solution :)
My tests are green, I've pushed the patch for CI coverage.

Reviewed-by: Janosch Frank <frankja@linux.ibm.com>

      parent reply	other threads:[~2026-11-30 13:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  9:17 [PATCH] KVM: s390: Don't kick vcpus for floating IRQs that are no longer pending Christian Borntraeger
2026-11-30  9:22 ` sashiko-bot
2026-11-30 13:45 ` Janosch Frank [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12ca1b57-87aa-44b0-beca-531fb0b037bf@linux.ibm.com \
    --to=frankja@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=svens@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.