[PATCH v2] powerpc/smp: poll cpu_callin_map more aggressively in __cpu_up()

Nathan Lynch nathanl at linux.ibm.com
Thu Jun 30 13:51:30 AEST 2022


Nathan Lynch <nathanl at linux.ibm.com> writes:
>
> Without the msleep(1) in the hotplug path, the time it takes to online a
> CPU on a P9 PowerVM LPAR goes from roughly 30ms to 4ms or less when
> exercised via thaw_secondary_cpus().

I need to reword this part. More testing shows that the time for
_cpu_up() to complete increases with the number of CPUs online, with or
without this change. The patch eliminates the msleep() penalty (roughly
20ms) but does not provide a consistent order-of-magnitude improvement,
unfortunately.

That is, even with this change, the time to online creeps back up
into the tens of milliseconds after a few dozen CPUs:

# dmesg --reltime | grep -A88 'Enabling non'
[  +5.000006] Enabling non-boot CPUs ...
[  +0.000894] CPU1 is up
[  +0.000613] CPU2 is up
[  +0.000697] CPU3 is up
[  +0.000894] CPU4 is up
[  +0.000956] CPU5 is up
[  +0.001110] CPU6 is up
[  +0.001497] CPU7 is up
[  +0.001606] CPU8 is up
[  +0.001841] CPU9 is up
[  +0.001998] CPU10 is up
[  +0.002229] CPU11 is up
[  +0.002488] CPU12 is up
[  +0.002618] CPU13 is up
[  +0.002767] CPU14 is up
[  +0.002931] CPU15 is up
[  +0.003283] CPU16 is up
[  +0.003220] CPU17 is up
[  +0.003427] CPU18 is up
[  +0.003648] CPU19 is up
[  +0.003870] CPU20 is up
[  +0.004044] CPU21 is up
[  +0.004246] CPU22 is up
[  +0.004420] CPU23 is up
[  +0.008634] CPU24 is up
[  +0.006166] CPU25 is up
[  +0.006373] CPU26 is up
[  +0.006603] CPU27 is up
[  +0.006913] CPU28 is up
[  +0.007031] CPU29 is up
[  +0.007287] CPU30 is up
[  +0.007570] CPU31 is up
[  +0.008670] CPU32 is up
[  +0.007793] CPU33 is up
[  +0.008104] CPU34 is up
[  +0.008440] CPU35 is up
[  +0.008358] CPU36 is up
[  +0.008386] CPU37 is up
[  +0.008696] CPU38 is up
[  +0.009104] CPU39 is up
[  +0.009676] CPU40 is up
[  +0.009687] CPU41 is up
[  +0.009761] CPU42 is up
[  +0.010089] CPU43 is up
[  +0.010362] CPU44 is up
[  +0.010683] CPU45 is up
[  +0.011054] CPU46 is up
[  +0.011399] CPU47 is up
[  +0.012013] CPU48 is up
[  +0.011597] CPU49 is up
[  +0.011791] CPU50 is up
[  +0.012115] CPU51 is up
[  +0.012415] CPU52 is up
[  +0.012954] CPU53 is up
[  +0.013131] CPU54 is up
[  +0.013244] CPU55 is up
[  +0.013775] CPU56 is up
[  +0.013599] CPU57 is up
[  +0.013867] CPU58 is up
[  +0.014255] CPU59 is up
[  +0.014563] CPU60 is up
[  +0.014904] CPU61 is up
[  +0.015125] CPU62 is up
[  +0.015360] CPU63 is up
[  +0.015923] CPU64 is up
[  +0.015721] CPU65 is up
[  +0.016026] CPU66 is up
[  +0.016395] CPU67 is up
[  +0.016811] CPU68 is up
[  +0.017045] CPU69 is up
[  +0.017270] CPU70 is up
[  +0.017613] CPU71 is up
[  +0.018072] CPU72 is up
[  +0.017913] CPU73 is up
[  +0.018184] CPU74 is up
[  +0.018519] CPU75 is up
[  +0.018929] CPU76 is up
[  +0.019179] CPU77 is up
[  +0.019470] CPU78 is up
[  +0.019766] CPU79 is up
[  +0.020331] CPU80 is up
[  +0.020244] CPU81 is up
[  +0.020464] CPU82 is up
[  +0.020876] CPU83 is up
[  +0.021229] CPU84 is up
[  +0.021542] CPU85 is up
[  +0.021903] CPU86 is up
[  +0.022062] CPU87 is up



More information about the Linuxppc-dev mailing list