From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH]irqchip/irq-gic-v3:Avoid a waste of LPI resource
Date: Mon, 30 Apr 2018 11:20:22 +0100 [thread overview]
Message-ID: <7862f544-cd4f-8c48-ee04-fa8c628354ea@arm.com> (raw)
In-Reply-To: <8898674D84E3B24BA3A2D289B872026A69EF9AF9@G01JPEXMBKW03>
Hi Lei,
On 30/04/18 08:53, Zhang, Lei wrote:
> Hi Marc
>
> thanks for your opinions.
>
>> How many is many? Are they PCI? Or something else?
>
>> As it is, this patch will break Multi-MSI and some other platforms that
>> do require a higher allocation granule.
>>
>> Depending on whether you're using PCI or some other bus, we can probably
>> come up with a solution that works for everyone. But I need more
>> information on this.
>
> Actually it is our original interconnect device not on PCI but on our
> original bus. This device has many sub devices around one thousand,
> and each sub device requires only a few LPIs.
OK. Have you implemented your own glue layer for this (like we already
have for PCI, platform and FSL-MC)? Or are you directly using the
platform MSI infrastructure?
> As I explained in point1, each Device ID can still allocate enough
> LPIs more than IRQS_PER_CHUNK by increasing chunks. So I couldn't
> understand why this patch will break Multi-MSI.
Unfortunately, Multi-MSI has more requirements than just allocating
multiple MSIs. The allocated MSIs must be allocated as a contiguous
range, be a power of two, aligned on the size of the range, with a
maximum of 32 interrupts. Your approach breaks the alignment requirement.
> By the way, 32 seems a good default value for IRQS_PER_CHUNK.
> So, I want to write another patch to make IRQ_PER_CHUNK a variable
> which can be changed by kernel parameter.
> What do you think of this idea?
It is not great, because it prevents two buses with different
requirements from being used concurrently in the same system. It may not
be an issue for you right now, but I want the ITS driver to be
independent of the bus requirements.
Another, more involved (but also more correct) approach would be to
teach the various glue layers about the requirements of the bus they
support, and pass on the allocation requirements to the core ITS driver.
That way, we would keep the heterogeneous case working.
I can probably help you with that, but this assumes that you've
implemented support for your own bus by providing a glue layer
equivalent to the one we have for other buses.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2018-04-30 10:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8898674D84E3B24BA3A2D289B872026A69EECF90@G01JPEXMBKW03>
2018-04-27 14:12 ` [PATCH]irqchip/irq-gic-v3:Avoid a waste of LPI resource Marc Zyngier
2018-04-30 7:53 ` Zhang, Lei
2018-04-30 10:20 ` Marc Zyngier [this message]
2018-05-03 6:46 ` Zhang, Lei
2018-05-09 14:32 ` Mark Langsdorf
2018-05-10 13:09 ` Zhang, Lei
2018-05-10 14:12 ` Marc Zyngier
2018-05-12 1:47 ` Zhang, Lei
2018-05-18 9:49 ` Zhang, Lei
2018-05-21 6:12 ` Zhang, Lei
2018-04-27 14:00 Zhang, Lei
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=7862f544-cd4f-8c48-ee04-fa8c628354ea@arm.com \
--to=marc.zyngier@arm.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox