[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5f4bfd8b-8699-4bef-bf49-f29965e95ca4@redhat.com>
Date: Mon, 12 Jan 2026 12:14:30 -0500
From: Waiman Long <llong@...hat.com>
To: Thomas Gleixner <tglx@...nel.org>, Waiman Long <llong@...hat.com>,
Marc Zyngier <maz@...nel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Clark Williams <clrkwllms@...nel.org>, Steven Rostedt <rostedt@...dmis.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-rt-devel@...ts.linux.dev
Subject: Re: [PATCH] irqchip/gic-v3-its: Don't acquire rt_spin_lock in
allocate_vpe_l1_table()
On 1/12/26 10:09 AM, Thomas Gleixner wrote:
> On Sun, Jan 11 2026 at 18:02, Waiman Long wrote:
>> On 1/11/26 5:38 AM, Marc Zyngier wrote:
>>>> Also that patch seems to be incomplete because there is another
>>>> allocation further down in allocate_vpe_l1_table()....
>>> Yeah, I wondered why page allocation wasn't affected by this issue,
>>> but didn't try to find out.
>> The use of GFP_ATOMIC flag in the page allocation request may help it to
>> dip into the reserved area and avoid taking any spinlock. In my own
>> test, just removing the kzalloc() call is enough to avoid any invalid
>> context warning. In the page allocation code, there is a zone lock and a
>> per_cpu_pages lock. They were not acquired in my particular test case,
>> though further investigation may be needed to make sure it is really safe.
> They might be acquired though. Only alloc_pages_nolock() guarantees that
> no lock is taken IIRC.
Thanks for the suggestion. I will look into using that for page
allocation. I had actually attempt to use kmalloc_nolock() to replace
kzalloc() initially. Even though it removed the call to rmqueue(), but
there were other spinlocks in the slub code that were still being
acquired like the local_lock() or the spinlock in the get_random() code.
So I gave up using that. Anyway, kmalloc_nolock() doesn't seem to be
fully working yet.
Cheers,
Longman
Powered by blists - more mailing lists