[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260129155315.5897a90efedbc6988ebb3708@linux-foundation.org>
Date: Thu, 29 Jan 2026 15:53:15 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Matteo Croce <technoboy85@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KUnit: memcpy: add benchmark
On Fri, 30 Jan 2026 00:36:30 +0100 Matteo Croce <technoboy85@...il.com> wrote:
> > Is cond_resched() inside preempt_disable() actually legal?
> >
> > Might be, but it doesn't make a lot of sense, does it?
> >
> > > + }
> > > + preempt_enable();
> > > +
> >
>
> Right. In a previous version I was doing
> preempt_disable()/preempt_enable() around the two ktime_get_ns(), but
> then I thought that enabling and disabling preemption 100 time was too
> much.
> I'll restore the preempt macros around the actual copy and remove
> cond_resched().
OK.
local_irq_save() would be more accurate.
Does it really need to copy 4MB? Smaller would make
local_irq_disable() more viable.
kmalloc(4MB) does seem to be pushing our luck. I'm spotting
./arch/arm/configs/pxa_defconfig:CONFIG_ARCH_FORCE_MAX_ORDER=8
which is 1MB?
Powered by blists - more mailing lists