On Mon, 13 Jul 2020 17:56:05 +0300 Itai Handler <itai.handler@xxxxxxxxx> wrote: > Hi, > > I observed that aarch64 boot time increases considerably with rt > (PREEMPT_RT_FULL=y). You mean compared to non PREEMPT_RT_FULL of the same kernel? > This is observable also in latest 4.19 rt (4.19.127-rt55). > Following is a fragment from kernel log (with rt) which shows that > bringing up 4 CPUs takes about 210 ms: I'd suggest trying 5.4 or even 5.6-rt. > > [ 0.120951] smp: Bringing up secondary CPUs ... > [ 0.184860] Detected VIPT I-cache on CPU1 > [ 0.187344] CPU1: Booted secondary processor 0x0000000001 [0x410fd034] > [ 0.262931] Detected VIPT I-cache on CPU2 > [ 0.263390] CPU2: Booted secondary processor 0x0000000002 [0x410fd034] > [ 0.329296] Detected VIPT I-cache on CPU3 > [ 0.329872] CPU3: Booted secondary processor 0x0000000003 [0x410fd034] > [ 0.331557] smp: Brought up 1 node, 4 CPUs > > Note that these times are from qemu, however the problem is also > noticeable on real hardware. > > I traced the code and found that the slow down is caused in > workqueue_prepare_cpu(). > This function creates the worker threads. > > On real hardware, it takes about 8 ms to create each worker thread. > Before digging into it in more detail, I would like to hear your opinion. > > Steven, what ftrace command line parameters do you recommend to use in > this case? Well, you could try: ftrace=function_graph ftrace_graph_filter workqueue_prepare_cpu If workqueue_prepare_cpu is a traceable function (not inlined nor notrace set). -- Steve