[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241120080521.ynDZpGQd@linutronix.de>
Date: Wed, 20 Nov 2024 09:05:21 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Huacai Chen <chenhuacai@...nel.org>
Cc: Huacai Chen <chenhuacai@...ngson.cn>, loongarch@...ts.linux.dev,
Clark Williams <clrkwllms@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
linux-rt-devel@...ts.linux.dev, Xuerui Wang <kernel@...0n.name>,
Jiaxun Yang <jiaxun.yang@...goat.com>, linux-kernel@...r.kernel.org,
loongson-kernel@...ts.loongnix.cn
Subject: Re: [PATCH V2 2/4] LoongArch: Fix sleeping in atomic context for
PREEMPT_RT
On 2024-11-20 15:46:08 [+0800], Huacai Chen wrote:
> > > diff --git a/arch/loongarch/mm/tlb.c b/arch/loongarch/mm/tlb.c
> > > index 5ac9beb5f093..3b427b319db2 100644
> > > --- a/arch/loongarch/mm/tlb.c
> > > +++ b/arch/loongarch/mm/tlb.c
> > > @@ -289,7 +289,7 @@ static void setup_tlb_handler(int cpu)
> > > /* Avoid lockdep warning */
> > > rcutree_report_cpu_starting(cpu);
> > >
> > > -#ifdef CONFIG_NUMA
> > > +#if defined(CONFIG_NUMA) && !defined(CONFIG_PREEMPT_RT)
> > > vec_sz = sizeof(exception_handlers);
> >
> > How does this work with NUMA and RT? You don't allocate memory and
> > everything is fine? Couldn't you pre-allocate the memory on the boot CPU
> > before kicking the CPU to boot? And then just assign the memory here.
> Allocating percpu exception pages on the own node is just an
> optimization, everything can work without this optimization.
> Preallocation is meaningless because all pages come from Node-0.
Don't you have alloc_pages_node() where you can set the node?
And I mean pre-allocation so you don't have to allocate memory here but
already have it ready.
> Huacai
Sebastian
Powered by blists - more mailing lists