From: Andi Kleen <ak@linux.intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: acme@kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2 05/13] x86/irq: Reserve a per CPU IDT vector for posted MSIs
Date: Fri, 19 Apr 2024 07:24:33 -0700 [thread overview]
Message-ID: <875xwdbfby.fsf@linux.intel.com> (raw)
In-Reply-To: <87jzkuxaqv.ffs@tglx> (Thomas Gleixner's message of "Fri, 19 Apr 2024 06:00:24 +0200")
Thomas Gleixner <tglx@linutronix.de> writes:
Dropping CC of a bazillion people and adding Arnaldo who owns perf trace
which has the vector decoding code.
> On Mon, Apr 15 2024 at 13:43, Jacob Pan wrote:
>> On Mon, 15 Apr 2024 11:53:58 -0700, Jacob Pan <jacob.jun.pan@linux.intel.com> wrote:
>>> On Thu, 11 Apr 2024 18:51:14 +0200, Thomas Gleixner <tglx@linutronix.de> wrote:
>>> > If we really care then we do it proper for _all_ of them. Something like
>>> > the uncompiled below. There is certainly a smarter way to do the build
>>> > thing, but my kbuild foo is rusty.
>>> I too had the concern of the wasting system vectors, but did not know how
>>> to fix it. But now your code below works well. Tested without KVM in
>>> .config to show the gaps:
>>>
>>> In VECTOR IRQ domain.
>>>
>>> BEFORE:
>>> System: 46: 0-31,50,235-236,244,246-255
>>>
>>> AFTER:
>>> System: 46: 0-31,50,241-242,245-255
>>>
>>> The only gap is MANAGED_IRQ_SHUTDOWN_VECTOR(243), which is expected on a
>>> running system.
>>>
>>> Verified in irqvectors.s: .ascii "->MANAGED_IRQ_SHUTDOWN_VECTOR $243
>>>
>>> POSTED MSI/first system vector moved up from 235 to 241 for this case.
>>>
>>> Will try to let tools/arch/x86/include/asm/irq_vectors.h also use it
>>> instead of manually copy over each time. Any suggestions greatly
>>> appreciated.
>>>
>> On a second thought, if we make system IRQ vector determined at compile
>> time based on different CONFIG options, will it break userspace tools such
>> as perf? More importantly the rule of not breaking userspace.
>
> tools/arch/x86/include/asm/irq_vectors.h is only used to generate the
> list of system vectors for pretty output. And your change already broke
> that.
>
> The obvious solution to that is to expose that list in sysfs for
> consumption by perf.
>
> But we don't have to do any of that right away. It's an orthogonal
> issue. Just waste the extra system vector to start with and then we can
> add the compile time dependend change on top if we really care about
> gaining back the vectors.
>
> Thanks,
>
> tglx
next parent reply other threads:[~2024-04-19 14:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87jzkuxaqv.ffs@tglx>
2024-04-19 14:24 ` Andi Kleen [this message]
2024-04-19 16:50 ` [PATCH v2 05/13] x86/irq: Reserve a per CPU IDT vector for posted MSIs Thomas Gleixner
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=875xwdbfby.fsf@linux.intel.com \
--to=ak@linux.intel.com \
--cc=acme@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).