lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<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

Powered by Openwall GNU/*/Linux Powered by OpenVZ