All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: [Xen-devel] [PATCH 3/6] x86/IRQ: simplify pending EOI stack logic for internally used IRQs
Date: Fri, 20 Dec 2019 14:29:41 +0100	[thread overview]
Message-ID: <b916a5d3-2ce0-4232-fa42-33ea02bf655f@suse.com> (raw)
In-Reply-To: <20efd995-9346-4b0c-f927-ad1152f6ccfe@suse.com>

In 5655ce8b1ec2 ("x86/IRQ: make internally used IRQs also honor the
pending EOI stack") it was mentioned that both the check_eoi_deferral
per-CPU variable and the cpu_has_pending_apic_eoi() were added just to
have as little impact on existing behavior as possible, to reduce the
risk of a last minute regression in 4.13.

Upon closer inspection, dropping the variable is an option only if all
callers of ->end() would assume the responsibility of also calling
flush_ready_eoi(). Therefore only drop the cpu_has_pending_apic_eoi()
guard now.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
TBD: In the end I'm not sure this is really worth it then.

--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1991,18 +1991,13 @@ void do_IRQ(struct cpu_user_regs *regs)
          * If higher priority vectors still have their EOIs pending, we may
          * not issue an EOI here, as this would EOI the highest priority one.
          */
-        if ( cpu_has_pending_apic_eoi() )
-        {
-            this_cpu(check_eoi_deferral) = true;
-            desc->handler->end(desc, vector);
-            this_cpu(check_eoi_deferral) = false;
-
-            spin_unlock(&desc->lock);
-            flush_ready_eoi();
-            goto out_no_unlock;
-        }
-
+        this_cpu(check_eoi_deferral) = true;
         desc->handler->end(desc, vector);
+        this_cpu(check_eoi_deferral) = false;
+
+        spin_unlock(&desc->lock);
+        flush_ready_eoi();
+        goto out_no_unlock;
     }
 
  out_no_end:


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2019-12-20 13:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20 13:27 [Xen-devel] [PATCH 0/6] x86: IRQ handling adjustments Jan Beulich
2019-12-20 13:29 ` [Xen-devel] [PATCH 1/6] x86/IRQ: move do_IRQ() Jan Beulich
2019-12-20 13:35   ` Andrew Cooper
2019-12-20 13:29 ` [Xen-devel] [PATCH 2/6] x86/IRQ: move and rename __do_IRQ_guest() Jan Beulich
2019-12-20 13:38   ` Andrew Cooper
2019-12-20 13:29 ` Jan Beulich [this message]
2019-12-20 13:51   ` [Xen-devel] [PATCH 3/6] x86/IRQ: simplify pending EOI stack logic for internally used IRQs Andrew Cooper
2019-12-20 13:29 ` [Xen-devel] [PATCH 4/6] x86/IRQ: flip legacy and dynamic vector ranges Jan Beulich
2019-12-20 14:01   ` Andrew Cooper
2019-12-20 13:30 ` [Xen-devel] [PATCH 5/6] x86/IRQ: re-use legacy vector ranges on APs Jan Beulich
2019-12-20 14:34   ` Andrew Cooper
2019-12-20 14:45     ` Jan Beulich
2019-12-20 13:31 ` [Xen-devel] [PATCH 6/6] x86: move and rename NR_VECTORS Jan Beulich
2019-12-20 13:48   ` Andrew Cooper

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=b916a5d3-2ce0-4232-fa42-33ea02bf655f@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.