From: Shanker Donthineni <sdonthineni@nvidia.com>
To: Thomas Gleixner <tglx@linutronix.de>, Marc Zyngier <maz@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, James Morse <james.morse@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] arm64: gic: increase the number of IRQ descriptors
Date: Sun, 29 Jan 2023 19:32:18 -0600 [thread overview]
Message-ID: <76781bc7-ba6c-db6d-2ed0-3aa0e53053e2@nvidia.com> (raw)
In-Reply-To: <875ydej9ur.ffs@tglx>
Hi Thomas & Marc,
On 1/10/23 16:36, Thomas Gleixner wrote:
> You can simply use a maple_tree for this.
>
> static MTREE_INIT_EXT(sparse_irqs, MT_FLAGS_ALLOC_RANGE | MT_FLAGS_LOCK_EXTERN,
> sparse_irq_lock);
>
> And the functions become:
>
> static int irq_find_free_area(unsigned int from, unsigned int cnt)
> {
> MA_STATE(mas, &sparse_irqs, 0, 0);
>
> if (mas_empty_area(&mas, from, MAX_SPARSE_IRQS, cnt))
> return -ENOSPC;
> return mas.index;
> }
>
> static unsigned int irq_find_next_irq(unsigned int offset)
> {
> MA_STATE(mas, &sparse_irqs, offset, nr_irqs);
> struct irq_desc *desc = mas_next(&mas, nr_irqs);
>
> return desc ? irq_desc_get_irq(desc) : nr_irqs;
> }
>
> static int irq_insert_desc(irq, desc)
> {
> MA_STATE(mas, @sparse_irqs, irq, irq);
>
> return mas_store_gfp(&mas, desc, GFP_KERNEL);
> }
>
> static void irq_remove_desc(irq)
> {
> MA_STATE(mas, @sparse_irqs, irq, irq);
>
> return mas_erase(&mas);
> }
Thank you for providing the necessary functions, they have been extremely
useful in getting started with implementing patches. However, I have encountered
corruption in the maple data structure within mtree_load() when multiple virtual
machines are being shut down simultaneously. To address this, I have added the
flag MT_FLAGS_USE_RCU to ensure safe concurrent access during reads and writes.
Please review patch series https://lore.kernel.org/all/20230130005725.3517597-1-sdonthineni@nvidia.com/
I have applied 6 patches from
https://lore.kernel.org/all/20230109205336.3665937-2-surenb@google.com/#r
to resolve RCU mode issues. The patches were tested on an ARM64 server and
underwent several hours of evaluation with multiple virtual machines, yielding
positive results.
Thanks,
Shanker
next prev parent reply other threads:[~2023-01-30 1:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 2:37 Shanker Donthineni
2023-01-04 9:14 ` Marc Zyngier
2023-01-04 13:47 ` Shanker Donthineni
2023-01-05 10:59 ` Marc Zyngier
2023-01-05 14:47 ` Shanker Donthineni
2023-01-09 16:41 ` Marc Zyngier
2023-01-09 16:57 ` Shanker Donthineni
2023-01-09 17:13 ` Shanker Donthineni
2023-01-10 8:20 ` Marc Zyngier
2023-01-10 14:22 ` Shanker Donthineni
2023-01-10 22:36 ` Thomas Gleixner
2023-01-30 1:32 ` Shanker Donthineni [this message]
2023-01-10 17:17 ` Shanker Donthineni
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=76781bc7-ba6c-db6d-2ed0-3aa0e53053e2@nvidia.com \
--to=sdonthineni@nvidia.com \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
--cc=will@kernel.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
Powered by JetHome