[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ed4mgyam.ffs@tglx>
Date: Fri, 11 Oct 2024 22:49:37 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: "Leizhen (ThunderTown)" <thunder.leizhen@...wei.com>, LKML
<linux-kernel@...r.kernel.org>
Cc: Waiman Long <longman@...hat.com>
Subject: Re: [patch 24/25] debugobjects: Refill per CPU pool more agressively
On Thu, Oct 10 2024 at 18:02, Leizhen wrote:
> On 2024/10/8 0:50, Thomas Gleixner wrote:
>> + /*
>> + * If this emptied a batch try to refill from the
>> + * free pool. Don't do that if this was the top-most
>> + * batch as pcpu_free() expects the per CPU pool
>> + * to be less than ODEBUG_POOL_PERCPU_SIZE.
>> + */
>> + if (unlikely(pcp->cnt < (ODEBUG_POOL_PERCPU_SIZE - ODEBUG_BATCH_SIZE) &&
>> + !(pcp->cnt % ODEBUG_BATCH_SIZE))) {
>
> It seems better to swap the contents on both sides of &&. Because the probability
> of the current right side is lower.
Good point!
Thanks,
tglx
Powered by blists - more mailing lists