On Mon, 2008-03-17 at 10:32 -0700, Christoph Lameter wrote:
I used 8-core stoakley to do testing, and tried boot kernel with maxcpus=4 and 2.
Just ran ./hackbench 100 process 2000.
processor number\slub_min_objects | slub_min_objects=8 | 16 | 32 | 64
--------------------------------------------------------------------------------------------
8p | 60second | 30 | 28.5 | 26.5
--------------------------------------------------------------------------------------------
4p | 50second | 43 | 42 |
--------------------------------------------------------------------------------------------
2p | 92second | 79 | |
As stoakley is just multi-core machine and hasn't hyper-threading, I also tested it on an old
harwich machine which has 4 physical processors and 8 logical processors with hyperthreading.
processor number\slub_min_objects | slub_min_objects=8 | 16 | 32 | 64
--------------------------------------------------------------------------------------------
8p | 78.7second | 77.5| |
num_online_cpus as the input parameter is ok. A potential issue is how to consider cpu hot-plug.
When num_online_cpus()=16, fls(num_online_cpus())=5.
So slub_min_objects= 8 + (1 + fls(num_online_cpus())) * 4.
--