Bug#1021315: Linux kernel very slow to boot

2022-12-06 Thread eHenry Berg
Hi,

The reason why it was very slow to boot up, was because of the file
system check.

# nano /boot/firmware/cmdline.txt
dwc_otg.lpm_enable=0 console=tty0 root=/dev/mmcblk0p3 rootfstype=f2fs
elevator=deadline fsck.repair=yes rootwait cma=416M
->
dwc_otg.lpm_enable=0 console=tty0 root=/dev/mmcblk0p3 rootfstype=f2fs
elevator=deadline rootwait cma=416M

I erased "fsck.repair=yes" from the cmdline.txt above and now it boots up fast.

Please close this bug.

Best Regards,
Evald



Bug#1021315: Linux kernel very slow to boot

2022-10-05 Thread eHenry Berg
Package: linux-image-5.19.0-2-arm64
Version: 5.19.0-2

Computer:   Raspberry Pi 3b
Environment:Debian Unstable arm64
uname -a:   Linux atlas 5.19.0-2-arm64 #1 SMP Debian 5.19.11-1
(2022-09-24) aarch64 GNU/Linux

2022-07-26 If I have noted right, the slowness began when I upgraded
linux version from 5.18.0-2 to 5.18.0-3.
2022-10-04 I updated firmware from 2019-08-18 to 2022-10-04 (from
master). Still very slow to boot.

# cat /boot/firmware/cmdline.txt
dwc_otg.lpm_enable=0 console=tty0 root=/dev/mmcblk0p3 rootfstype=f2fs
elevator=deadline fsck.repair=yes rootwait cma=416M

# cat /boot/firmware/config.txt
arm_64bit=1
#device_tree=bcm2837-rpi-3-b-plus.dtb.5.19
device_tree=bcm2837-rpi-3-b.dtb.5.19
kernel=vmlinuz-5.19.0-2-arm64
initramfs initrd.img-5.19.0-2-arm64 followkernel

# cat /etc/initramfs-tools/modules
crc32
crc32c
f2fs

# cat /etc/modules
vc4

# cat /etc/dphys-swapfile
CONF_SWAPSIZE=1024

# cat /etc/fstab
#
proc/proc   procdefaults  0   0
/dev/mmcblk0p1  /boot/firmware  vfatnoauto,noatime0   2
/dev/mmcblk0p2  /boot   ext2defaults,noatime  0   0
/dev/mmcblk0p3  /   f2fsdefaults,noatime  0   0

# cat /etc/apt/sources.list
deb http://ftp.fi.debian.org/debian sid main contrib non-free

# systemd-analyze time
Startup finished in 5min 50.088s (kernel) + 21.179s (userspace) = 6min 11.268s
graphical.target reached after 21.110s in userspace.

# dmesg -T > dmesg_5.19.0-2.txt
I attach the whole file dmesg_5.19.0-2.txt.

dmesg_5.19.0-2.txt:
[Wed Oct  5 15:49:10 2022] rc rc0: vc4 as
/devices/platform/soc/3f902000.hdmi/rc/rc0
[Wed Oct  5 15:49:10 2022] input: vc4 as
/devices/platform/soc/3f902000.hdmi/rc/rc0/input14
[Wed Oct  5 15:54:48 2022] F2FS-fs (mmcblk0p3): recover fsync data on
readonly fs
[Wed Oct  5 15:54:48 2022] F2FS-fs (mmcblk0p3): Mounted with
checkpoint version = 1ba098

Why is it delayed from clock 15:49:10 to 15:54:48 in dmesg?

The kernel boot time has been fast for years. The kernel startup time
has been around 10 seconds and now it is almost 6 minutes.

Best Regards,
Evald
[Wed Oct  5 15:48:59 2022] Booting Linux on physical CPU 0x00 
[0x410fd034]
[Wed Oct  5 15:48:59 2022] Linux version 5.19.0-2-arm64 
(debian-ker...@lists.debian.org) (gcc-11 (Debian 11.3.0-6) 11.3.0, GNU ld (GNU 
Binutils for Debian) 2.39) #1 SMP Debian 5.19.11-1 (2022-09-24)
[Wed Oct  5 15:48:59 2022] random: crng init done
[Wed Oct  5 15:48:59 2022] Machine model: Raspberry Pi 3 Model B Rev 1.2
[Wed Oct  5 15:48:59 2022] efi: UEFI not found.
[Wed Oct  5 15:48:59 2022] Reserved memory: bypass linux,cma node, using 
cmdline CMA params instead
[Wed Oct  5 15:48:59 2022] OF: reserved mem: node linux,cma compatible matching 
fail
[Wed Oct  5 15:48:59 2022] NUMA: No NUMA configuration found
[Wed Oct  5 15:48:59 2022] NUMA: Faking a node at [mem 
0x-0x3b3f]
[Wed Oct  5 15:48:59 2022] NUMA: NODE_DATA [mem 0x3b20d940-0x3b20]
[Wed Oct  5 15:48:59 2022] Zone ranges:
[Wed Oct  5 15:48:59 2022]   DMA  [mem 
0x-0x3b3f]
[Wed Oct  5 15:48:59 2022]   DMA32empty
[Wed Oct  5 15:48:59 2022]   Normal   empty
[Wed Oct  5 15:48:59 2022] Movable zone start for each node
[Wed Oct  5 15:48:59 2022] Early memory node ranges
[Wed Oct  5 15:48:59 2022]   node   0: [mem 
0x-0x3b3f]
[Wed Oct  5 15:48:59 2022] Initmem setup node 0 [mem 
0x-0x3b3f]
[Wed Oct  5 15:48:59 2022] On node 0, zone DMA: 19456 pages in unavailable 
ranges
[Wed Oct  5 15:48:59 2022] cma: Reserved 416 MiB at 0x1260
[Wed Oct  5 15:48:59 2022] percpu: Embedded 30 pages/cpu s83176 r8192 d31512 
u122880
[Wed Oct  5 15:48:59 2022] pcpu-alloc: s83176 r8192 d31512 u122880 alloc=30*4096
[Wed Oct  5 15:48:59 2022] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[Wed Oct  5 15:48:59 2022] Detected VIPT I-cache on CPU0
[Wed Oct  5 15:48:59 2022] CPU features: kernel page table isolation forced ON 
by KASLR
[Wed Oct  5 15:48:59 2022] CPU features: detected: Kernel page table isolation 
(KPTI)
[Wed Oct  5 15:48:59 2022] CPU features: detected: ARM erratum 843419
[Wed Oct  5 15:48:59 2022] CPU features: detected: ARM erratum 845719
[Wed Oct  5 15:48:59 2022] Fallback order for Node 0: 0 
[Wed Oct  5 15:48:59 2022] Built 1 zonelists, mobility grouping on.  Total 
pages: 238896
[Wed Oct  5 15:48:59 2022] Policy zone: DMA
[Wed Oct  5 15:48:59 2022] Kernel command line: video=HDMI-A-1:1920x1080M@60 
dma.dmachans=0x7ff5 bcm2709.boardrev=0xa02082 bcm2709.serial=0x3f3d54e2 
bcm2709.uart_clock=4800 smsc95xx.macaddr=B8:27:EB:3D:54:E2 
vc_mem.mem_base=0x3ec0 vc_mem.mem_size=0x4000  dwc_otg.lpm_enable=0 
console=tty0 root=/dev/mmcblk0p3 rootfstype=f2fs elevator=deadline 
fsck.repair=yes rootwait cma=416M
[Wed Oct  5 15:48:59 2022] Kernel parameter elevator= does not have any effect 
anymore.
   Please use sysfs to set IO scheduler for