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: <20081205.123202.98853955.davem@davemloft.net>
Date:	Fri, 05 Dec 2008 12:32:02 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	dada1@...mosbay.com
Cc:	akpm@...ux-foundation.org, a.p.zijlstra@...llo.nl, travis@....com,
	linux-kernel@...r.kernel.org, cl@...ux-foundation.org,
	linux-ext4@...r.kernel.org
Subject: Re: [PATCH] percpu_counter: FBC_BATCH might be too big

From: Eric Dumazet <dada1@...mosbay.com>
Date: Fri, 05 Dec 2008 17:05:16 +0100

> For NR_CPUS >= 16 values, FBC_BATCH is 2*NR_CPUS
> 
> Considering more and more distros are using high NR_CPUS values,
> it makes sense to use a more sensible value for FBC_BATCH.
> 
> A sensible value is 2*num_online_cpus(), with a minimum value of 32
> (This minimum value helps branch prediction in __percpu_counter_add())
> 
> We already have a hotcpu notifier, so we can adjust FBC_BATCH dynamically.
> 
> Signed-off-by: Eric Dumazet <dada1@...mosbay.com>

The downside is now we must load this value in these common
routines.  But I think the gain outweights the loss so:

Acked-by: David S. Miller <davem@...emloft.net>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ