From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: xen-devel@lists.xenproject.org, keir@xen.org
Subject: Re: [Patch v5 2/5] x86/hpet: Use singe apic vector rather than irq_descs for HPET interrupts
Date: Thu, 28 Nov 2013 15:06:55 +0000 [thread overview]
Message-ID: <52975C0F.6090503@citrix.com> (raw)
In-Reply-To: <5297542502000078000A800E@nat28.tlf.novell.com>
On 28/11/13 14:33, Jan Beulich wrote:
>>>> Andrew Cooper <andrew.cooper3@citrix.com> 11/27/13 11:37 PM >>>
>> On 27/11/2013 08:35, Jan Beulich wrote:
>>>>>> On 26.11.13 at 19:32, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>>>> There is no safe scenario (given Xen's handling of line level interrupt)
>>>> for timer interrupts to be lower priority than the highest possible line
>>>> level priority.
>>> That's true for the "new ack" model, but not the "old" one (which is
>>> in particular also being used when using directed EOI). Which may
>>> in turn be an argument to consider whether the vector selection
>>> (low or high priority) shouldn't depend on the IO-APIC ack model.
>> How would you go about allocating vectors then? All IRQs are allocated
>> randomly between vector 0x21 and 0xdf. You can certainly preferentially
>> prefer lower vectors for line level interrupts, but the only way to
>> guarantee that the HPET vector is greater than line level interrupts is
>> to have it higher than 0xdf.
> I'm not proposing any change to vector allocation. Once again, with the
> new ack model I agree that the HPET one must be high priority. With the
> old ack model, however, it could be low priority (and we might consider
> putting it at 0x20, preventing it from being used in dynamic allocation, or
> even at 0x1f - that ought to work as long as there's no CPU exception at
> that vector, since only the range 0x00...0x0f is reserved in the APIC
> architecture).
Because of XSA-3, the TPR settings block any external vectors below
0x20, to protect from external devices trying to trigger exceptions
(Alignment check specifically which expects to have an error code on the
stack)
0x20 is currently the dynamic irq cleanup vector, but as it is only used
with "int 0x20", it could be moved into the reserved region. (Not that I
suggest we do use the reserved region)
>
>> I do think that allocating line level vectors lower is a good idea,
>> given how long they remain outstanding. I also think that a useful
>> performance tweak would be for device driver domains to be able to
>> request a preferentially higher vector for their interrupts.
> I'm not sure about this one.
>
> >From a pragmatic point of view, there are plenty of spare high priority
>> vectors for use, where as we at XenServer already have usecases where we
>> are running out of free vectors in the range 0x21 -> 0xdf due to shear
>> quantities of SRIOV. I already have half a mind to see whether I can
>> optimise the current allocation of vectors to make the dynamic range larger.
> Growing that range will only be possible by a small amount anyway, so this
> won't buy you much (you'll run out of vectors very quickly again). But then
> again - with the vector ranges being available once per CPU, are there
> really setups where the requirements exceed the vectors * CPUs value?
>
> Jan
Netscalar MPX systems have (off the top of my head)
24x 10GB network cards with 64 functions and 3 interrupts per function
4x SSL offload cards with 64 functions and 2 interrupts per function
On a dual Sandy-bridge server with 32 cores in total.
That comes to 160 of the 189 available entries in the dynamic region
used before the consideration of other dom0 interrupts, and the fact
that irq migration logic needs to reserve a vector in the target IDT
before starting the move.
Even a fractional increase in available space will have a large impact
on the contention.
~Andrew
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2013-11-28 15:07 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 17:59 [RFC v4 0/5] HPET fix interrupt logic Andrew Cooper
2013-11-13 17:59 ` [Patch v4 1/5] x86/hpet: Pre cleanup Andrew Cooper
2013-11-13 17:59 ` [Patch v4 2/5] x86/hpet: Use singe apic vector rather than irq_descs for HPET interrupts Andrew Cooper
2013-11-14 15:52 ` Tim Deegan
2013-11-14 15:56 ` Andrew Cooper
2013-11-14 16:01 ` [Patch v5 " Andrew Cooper
2013-11-22 15:45 ` Jan Beulich
2013-11-22 16:23 ` Andrew Cooper
2013-11-22 16:49 ` Jan Beulich
2013-11-22 17:38 ` Andrew Cooper
2013-11-25 7:52 ` Jan Beulich
2013-11-25 7:50 ` Jan Beulich
2013-11-26 18:32 ` Andrew Cooper
2013-11-27 8:35 ` Jan Beulich
2013-11-27 22:37 ` Andrew Cooper
2013-11-28 14:33 ` Jan Beulich
2013-11-28 15:06 ` Andrew Cooper [this message]
2013-11-13 17:59 ` [Patch v4 3/5] x86/hpet: Post cleanup Andrew Cooper
2013-11-13 17:59 ` [Patch v4 4/5] x86/hpet: Debug and verbose hpet logging Andrew Cooper
2013-11-13 17:59 ` [Patch v4 5/5] x86/hpet: debug keyhandlers Andrew Cooper
-- strict thread matches above, loose matches on Subject: below --
2014-03-05 15:43 [RFC v5 0/5] HPET fix interrupt logic Andrew Cooper
2014-03-05 15:43 ` [PATCH v5 2/5] x86/hpet: Use singe apic vector rather than irq_descs for HPET interrupts Andrew Cooper
2014-03-06 14:11 ` Tim Deegan
2014-03-06 14:33 ` Jan Beulich
2014-03-06 14:40 ` Andrew Cooper
2014-03-06 15:38 ` Jan Beulich
2014-03-06 16:08 ` Jan Beulich
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=52975C0F.6090503@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@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.