From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2]irqchip/irq-gic-v3:Avoid a waste of LPI resource
Date: Fri, 1 Jun 2018 13:56:59 +0100 [thread overview]
Message-ID: <31bede40-dbc5-0a88-d12c-5fc79ea02391@arm.com> (raw)
In-Reply-To: <8898674D84E3B24BA3A2D289B872026A69F3004A@G01JPEXMBKW03>
Hi Lei,
On 01/06/18 13:44, Zhang, Lei wrote:
> Hi Marc
>
> I have reviewed your patch.
> I think the approach is same between your patch and mine.
> Your patch is simpler and more beautiful, and match our bus's requirement.
>
> I have only one question.
> According your patch, if there are no enough lpis, amount of lpis required
> will be divide by 2. it means someone want 16 lpis, maybe they can only get 8?
> I don?t' understand why we need it.
That's the way the MSI allocation works in the kernel.
A driver asks a number of MSIs (let's imagine, for example, one MSI per
CPU in the system), but the underlying HW can only provide a smaller number.
Instead of failing and just returning an error, we reduce the allocation
in order to provide the driver with something. If that's not enough,
well, the driver itself will have the opportunity to give up.
See pci_alloc_irq_vectors_affinity(), which takes a min and a max number
of vectors, for example.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2018-06-01 12:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-25 12:45 [PATCH v2]irqchip/irq-gic-v3:Avoid a waste of LPI resource Zhang, Lei
2018-05-27 17:20 ` Marc Zyngier
2018-06-01 12:44 ` Zhang, Lei
2018-06-01 12:56 ` Marc Zyngier [this message]
2018-06-01 13:47 ` Zhang, Lei
2018-06-04 23:58 ` Zhang, Lei
2018-06-05 8:36 ` Marc Zyngier
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=31bede40-dbc5-0a88-d12c-5fc79ea02391@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